How to switch price to country delivery
-
Hi,
I need any WPML multi-currency function (hook), to switch price to country delivery.
I use this code bellow to switch currency symbol when I change country delivery on checkout page. It is works fine, but this switch only currency symbol, not price. Does WPML have any hooks to change prices?
add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2); function change_existing_currency_symbol( $currency_symbol, $currency ) { if ( ! is_admin() ) { global $woocommerce; $my_country = $woocommerce->customer->get_shipping_country(); if( $my_country == 'SK') { $currency_symbol = '€'; } else { $currency_symbol = 'Kč'; } return $currency_symbol; } }
Regards,
Steve
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘How to switch price to country delivery’ is closed to new replies.