change decimal number in “visual only”
-
Hi! I need to apply different decimal numbers to USD and CLP. But can’t find the option neither filter hook. I see there is a currency_exchange.js but no hook.
Regards,
FranciscoEdit:
I did it this way:add_filter( 'wc_get_price_thousand_separator', 'custom_price_separator' ); function custom_price_separator($separator) { $BeRocket_CE = BeRocket_CE::getInstance(); return $BeRocket_CE::woocommerce_currency(null)=='USD'?$separator:'.'; } add_filter( 'wc_get_price_decimals', 'custom_price_decimals', 9999, 1 ); function custom_price_decimals( $decimals ) { $BeRocket_CE = BeRocket_CE::getInstance(); return $BeRocket_CE::woocommerce_currency(null)=='USD'?$decimals:0; }
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘change decimal number in “visual only”’ is closed to new replies.