Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function site_woocommerce_get_price($price, $product) {
- $decimal_sep = wp_specialchars_decode(stripslashes(get_option('woocommerce_price_decimal_sep')), ENT_QUOTES);
- if ($decimal_sep != '.') {
- $thousands_sep = wp_specialchars_decode(stripslashes(get_option( 'woocommerce_price_thousand_sep')), ENT_QUOTES);
- $price = str_replace($thousands_sep, '', $price);
- $price = str_replace($decimal_sep, '.', $price);
- }
- return $price;
- }
- add_filter('woocommerce_get_price', 'site_woocommerce_get_price', 10, 2);
Add Comment
Please, Sign In to add comment