ency_data() { $currency = get_woocommerce_currency(); return [ 'currency' => [ 'code' => $currency, 'precision' => wc_get_price_decimals(), 'symbol' => html_entity_decode( get_woocommerce_currency_symbol( $currency ) ), 'symbolPosition' => get_option( 'woocommerce_currency_pos' ), 'decimalSeparator' => wc_get_price_decimal_separator(), 'thousandSeparator' => wc_get_price_thousand_separator(), 'priceFormat' => html_entity_decode( get_woocommerce_price_format() ), ], ]; } /** * Get locale data to include in settings. * * @return array */ private static function get_locale_data() { global $wp_locale; return [ 'locale' => [ 'siteLocale' => get_locale(), 'userLocale' => get_user_locale(), 'weekdaysShort' => array_values( $wp_locale->weekday_abbrev ), ], ]; } /** * Add placeholder image. * * @param string $consent_statement - The consent statement string. */ public function placeholder_image( $consent_statement ) { self::check_consent( $consent_statement ); wp_interactivity_config( self::$settings_namespace, array( 'placeholderImgSrc' => wc_placeholder_img_src() ) ); } }