FOX - WooCommerce Currency Switcher Professional

woocs_price_decimal_sep

Allows to manipulate by woocommerce price decimal separator according to the business logic (example is countries). Example:

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);

Works in pair with: woocs_price_thousand_sep

From v.2.3.6/v.1.3.6