PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

How to force currency switch based on user's shipping address at checkout when using Amazon Pay?

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 please
If 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.

Hi Pablo,

The following code works fine with WC's standard checkout (PayPal/Stripe). However, it doesn't seem to work with Amazon Pay.

Code reference: https://currency-switcher.com/possible-delivery-country-change-currency/

add_action('woocommerce_checkout_update_order_review', function($data) {

global $WOOCS;

if (is_string($data)) {
parse_str($data, $data);
}

$_currency_billing = $WOOCS->get_currency_by_country($data['billing_country']);

if (!empty($_currency_billing)) {
$WOOCS->set_currency($_currency_billing);
} 

}, 9999);

We use GBP as our base currency and if Amazon Pay is enabled then the currency always reverts back to GBP at the checkout despite the delivery/billing address is USA... Is there anyway round it?

Do you have a snippet we can use so we can disable Amazon Pay payment gateway when user's shipping address is not in the UK?

Thank you for your help.

 

Hello

Unfortunately, we do not have such a code.

https://wordpress.org/plugins/woocommerce-country-based-payments/ - Maybe this third party plugin will help you

Okay, thanks for the link. :)

Hello

Welcome;)