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

Currency Not Switching Back

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.

I have set up the plugin the allow multiple currencies and have added snippet code to force the base currency on the checkout page. That works.

However, when you leave the checkout page the currency remains set at the default rather than switching back to the originally selected currency. How do I set up so that the customer's selected currency is always displayed except on the checkout page?

 

 

Hello

You need code customization

AN  Example:

add_filter('wp_head',function(){

global $WOOCS;
if(is_checkout()){

$WOOCS->storage->set_val('woocs_last_currency', $WOOCS->current_currency);
$WOOCS->set_currency('USD');
}else{

$curr = $WOOCS->storage->get_val('woocs_last_currency');

if($curr){

$WOOCS->set_currency($curr);

}

$WOOCS->storage->set_val('woocs_last_currency', false);

}
});

Thank you. This does work.

Shouldn't this really be a plugin option rather than custom code?

 

Hello

Shouldn't this really be a plugin option rather than custom code? -  not sure if this should be part of the plugin code.  In the five years that this plugin has been in operation, you are the second person to ask for such functionality. But I will pass this to the developers

Interesting. We have had our current e-commerce platform set up this way for many years and is the default way that dynamicconverter.com (used for currency switching in 3dCart) works.

In any case, the solution you provided does work.

Thanks!

Hello

Welcome;)