Helper of currencies for user selections (in new admin panel)
Field 'interest' works with percentage also. Example: 20%
New hooks: 'woocs_price_thousand_sep' + 'woocs_price_decimal_sep' which allows you to manipulate by price thousand and decimal separators according to business logic (example is countries). Example:
add_filter('woocs_price_thousand_sep', function($separator, $currency) {
$wcgi = WC_Geolocation::geolocate_ip(); //woocommerce API
//UPPERCASE for country code!
switch ($wcgi['country']) {
case 'US':
$separator = '.';
break;
case 'GB':
$separator = ',';
break;
case 'JP':
$separator = ' ';
break;
}
return $separator;
},10,2);
add_filter('woocs_price_decimal_sep', function($separator, $currency) {
$wcgi = WC_Geolocation::geolocate_ip(); //woocommerce API
//UPPERCASE for country code!
switch ($wcgi['country']) {
case 'US':
$separator = ',';
break;
case 'GB':
$separator = '.';
break;
case 'JP':
$separator = '';
break;
}
return $separator;
},10,2);
🌸
Shortcodes, functions, actions and filters reference for FOX WooCommerce Currency Switcher
Codex — FOX Currency Switcher
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.