Automattic\WooCommerce\Internal\Admin
Settings::get_currency_settings
Return an object defining the currency options for the site's current currency
Method of the class: Settings{}
Hooks from the method
Returns
Array. Settings for the current currency {
Array of settings.
@type string $code Currency code. @type string $precision Number of decimals. @type string $symbol Symbol for currency.
}
Usage
$result = Settings::get_currency_settings();
Settings::get_currency_settings() Settings::get currency settings code WC 10.3.3
public static function get_currency_settings() {
$code = get_woocommerce_currency();
/**
* The wc_currency_settings hook
*
* @since 6.5.0
*/
return apply_filters(
'wc_currency_settings',
array(
'code' => $code,
'precision' => wc_get_price_decimals(),
'symbol' => html_entity_decode( get_woocommerce_currency_symbol( $code ) ),
'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() ),
)
);
}