Quote from shiran on November 15, 2021, 13:41
Hi,
My client site's shipping is not working properly when I switch currency.
We have New Zealand shipping set for NZD 5 and Australian for AUD10
When you switch it doesn't get updated. this is in both cart and checkout.
The checkout page has a bug after adding the below code, you need to pick both billing and shipping countries the same.
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);
Please help. I have purchased this plugin. I can share the details.
Also, I have a staging site for this, I can share the login credentials.
How do I safely share?
Thanks in advance
Shiran
Hi,
My client site's shipping is not working properly when I switch currency.
We have New Zealand shipping set for NZD 5 and Australian for AUD10
When you switch it doesn't get updated. this is in both cart and checkout.
The checkout page has a bug after adding the below code, you need to pick both billing and shipping countries the same.
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);
Please help. I have purchased this plugin. I can share the details.
Also, I have a staging site for this, I can share the login credentials.
How do I safely share?
Thanks in advance
Shiran