Update v.2.3.6/v.1.3.6
- new WOOCS admin panel
- Price thousand and decimal separators
- 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 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);