Change Currency by Delivery Country in WooCommerce
add_action('woocommerce_checkout_update_order_review', function($data) {
global $WOOCS;
if (is_string($data)) {
parse_str($data, $data);
}
//***
$_currency = $WOOCS->get_currency_by_country($data['shipping_country']);
if (!empty($_currency)) {
$WOOCS->set_currency($_currency);
}
}, 9999);
Do not forget to set in tab "GeoIP rules" currency rules for countries as that rules uses in the billing on the script above
Customer request:
Is it possible that Delivercountry change the Curreny? Deliver to US change to $ Deliver to DE/AT change to EUR Deliver to CH cgange to CHF .... that would be nice! Otherwise a user can cheat and buy in the cheepest Currency THX StephanAlso read: /force-currency-on-checkout-page/