WC_REST_General_Settings_V4_Controller::get_currency_options
Get currency options.
Method of the class: WC_REST_General_Settings_V4_Controller{}
No Hooks.
Returns
Array. Currency options.
Usage
// private - for code of main (parent) class only $result = $this->get_currency_options();
WC_REST_General_Settings_V4_Controller::get_currency_options() WC REST General Settings V4 Controller::get currency options code WC 10.3.6
private function get_currency_options() {
$currency_options = array();
$currencies = get_woocommerce_currencies();
foreach ( $currencies as $code => $name ) {
$label = wp_specialchars_decode( (string) $name );
$symbol = wp_specialchars_decode( (string) get_woocommerce_currency_symbol( $code ) );
$currency_options[ $code ] = $label . ' (' . $symbol . ') — ' . $code;
}
return $currency_options;
}