Unable to change currency based on Shipping destination
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from Codeaxia on July 5, 2022, 06:30Hi,
I tried using various codes provided on this forum but I am still unable to change currency based on the shipping country. My case is as follows -
If the user only enters the billing country, then the currency gets changed fine.
However, if the user enters both billing & shipping country, it still changes the currency based on the billing country.
Please help me fix this.
Hi,
I tried using various codes provided on this forum but I am still unable to change currency based on the shipping country. My case is as follows -
If the user only enters the billing country, then the currency gets changed fine.
However, if the user enters both billing & shipping country, it still changes the currency based on the billing country.
Please help me fix this.
Quote from Pablo Borysenco on July 5, 2022, 11:00Hello
what code are you using? Please drop me this code
Hello
what code are you using? Please drop me this code
Quote from Codeaxia on July 5, 2022, 12:27Have tried using the codes provided here -
https://currency-switcher.com/possible-delivery-country-change-currency
https://pluginus.net/support/topic/autoupdate-the-currency-on-checkout-depending-the-shipping-country/
Have tried using the codes provided here -
https://currency-switcher.com/possible-delivery-country-change-currency
Quote from Pablo Borysenco on July 6, 2022, 12:13Hello
Great! Please drop me the specific code that you are using, the code that you have added to your file and do the test
and drop me a link to your site
Hello
Great! Please drop me the specific code that you are using, the code that you have added to your file and do the test
and drop me a link to your site
Quote from Codeaxia on July 6, 2022, 12:18Hi,
The codes provided in the links were the ones that we used but have removed them for now since it's a live site and we don't have a staging.
Site url - https://bit.ly/3bHU2SS
Hi,
The codes provided in the links were the ones that we used but have removed them for now since it's a live site and we don't have a staging.
Site url - https://bit.ly/3bHU2SS
Quote from Pablo Borysenco on July 7, 2022, 09:43Hello
Ok! Please paste your license key here - https://share.pluginus.net/image/i20210618130558.png -> https://share.pluginus.net/image/i20210618130614.png and wp-admin access - https://share.pluginus.net/image/i20210618130637.png
Hello
Ok! Please paste your license key here - https://share.pluginus.net/image/i20210618130558.png -> https://share.pluginus.net/image/i20210618130614.png and wp-admin access - https://share.pluginus.net/image/i20210618130637.png
Quote from Codeaxia on July 7, 2022, 10:53Hi,
Have done the same, please check & let us know.
Hi,
Have done the same, please check & let us know.
Quote from Pablo Borysenco on July 7, 2022, 12:36Hello
Please check your access - https://c2n.me/4g5YN1Y.png
Try to do a test with this code:
add_action('woocommerce_checkout_update_order_review', function($data) {
global $WOOCS;if (is_string($data)) {
parse_str($data, $data);
}
//***
$country = $data['billing_country'];
if(isset($data['shipping_country']) AND $data['shipping_country']){
$country = $data['shipping_country'];
}
$_currency = $WOOCS->get_currency_by_country($country);
if (!empty($_currency)) {
$WOOCS->set_currency($_currency);
}
}, 9999);
Hello
Please check your access - https://c2n.me/4g5YN1Y.png
Try to do a test with this code:
add_action('woocommerce_checkout_update_order_review', function($data) {
global $WOOCS;
if (is_string($data)) {
parse_str($data, $data);
}
//***
$country = $data['billing_country'];
if(isset($data['shipping_country']) AND $data['shipping_country']){
$country = $data['shipping_country'];
}
$_currency = $WOOCS->get_currency_by_country($country);
if (!empty($_currency)) {
$WOOCS->set_currency($_currency);
}
}, 9999);
Quote from Codeaxia on July 7, 2022, 12:56Hi,
It works for the shipping country only now.
With this code, it doesn't work if the customer enters only the billing country and not the shipping country.
Also, have reset your user's password, please check now.
I have commented the shipping country part of the code for now so that the user doesn't face this issue.
Hi,
It works for the shipping country only now.
With this code, it doesn't work if the customer enters only the billing country and not the shipping country.
Also, have reset your user's password, please check now.
I have commented the shipping country part of the code for now so that the user doesn't face this issue.
Quote from Pablo Borysenco on July 8, 2022, 10:29Hello
Ok! Try this code:
add_action('woocommerce_checkout_update_order_review', function($data) {
global $WOOCS;if (is_string($data)) {
parse_str($data, $data);
}
//***
$country = $data['billing_country'];
if(isset($data['shipping_country']) AND isset($data['ship_to_different_address']) AND $data['ship_to_different_address']){
$country = $data['shipping_country'];
}
$_currency = $WOOCS->get_currency_by_country($country);
if (!empty($_currency)) {
$WOOCS->set_currency($_currency);
}
}, 9999);
Hello
Ok! Try this code:
add_action('woocommerce_checkout_update_order_review', function($data) {
global $WOOCS;
if (is_string($data)) {
parse_str($data, $data);
}
//***
$country = $data['billing_country'];
if(isset($data['shipping_country']) AND isset($data['ship_to_different_address']) AND $data['ship_to_different_address']){
$country = $data['shipping_country'];
}
$_currency = $WOOCS->get_currency_by_country($country);
if (!empty($_currency)) {
$WOOCS->set_currency($_currency);
}
}, 9999);
Quote from Codeaxia on July 8, 2022, 10:37Thanks for sharing, we are checking this at our end.
Thanks for sharing, we are checking this at our end.