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

Is multiple allowed - No - currency does not switch back to geoip detected currency after checkout.

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.

Use case:  shoppers can see product prices in currency based on geoip rules, but all payments are in shop currency, so on checkout they see all prices in AUD.

I have the"Is multiple allowed" set to NO

All works fine transitioning to checkout,   USD prices are converted to AUD,

After transition to cart or product page, the currency remain to base (AUD) and does not switch back to the geoip currency.

After a while it eventually switches back.

I have a workaround, but it uses details of the internal implementation.

In a wp_head action

$WOOCS->storage->set_val('woocs_first_unique_geoip', 0);
$WOOCS->init_geo_currency();

Ilian

 

 

 

 

Hello Ilian

does not switch back to the geoip currency. - This is the correct behavior of the plugin. GeoIP only works for the first visit

 

Hi Pablo,

this can not be the correct behaviour.

The geoip correctly detects USD based on user country

Shop and Cart correctly display prices in USD

Checkout switches the currency to AUD (shop currency) - again correct, as the setting"is multiple allowed" = NO.

The shop currency AUD should only be active on the Checkout Page.

When users goes back to shop, you should switch back to the geoip detected currency, not leave it to AUD.

This is an oversight which can easily be fixed.

Ilian

 

Hello Ilian

When users goes back to shop, you should switch back to the geoip detected currency, not leave it to AUD. - It works differently - https://share.pluginus.net/image/i20211028112521.png

And I repeat again, this is the correct behavior. The currency is switched on on the checkout page (this is your setting). Next, the user sees his last currency

If you want to change this behavior, you need to customize the code - https://currency-switcher.com/function/woocs-get_currency_by_country

An example:

add_action('wp_head', function(){

if(class_exists('WOOCS') && !is_checkout() ){

global $WOOCS; //$customer_country = 'ES';

$customer_country = $this->storage->get_val('woocs_user_country') ;

$currency = $WOOCS->get_currency_by_country($customer_country);

$WOOCS->set_currency($currency);

}

});