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 changes 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.

Hi there,

I am forced to use a base currency of ZAR, but I want to display all my prices in USD. I've set all countries in GeoIP to USD, I understand that when it comes to the checkout it will be in the base currency of ZAR.

The plugin worked perfectly, everything displays in USD until I view my checkout which is in ZAR. But after I've looked at my checkout and return to the site, everything has reverted to the base currency (ZAR) - which is not what my client wants.

Is there something I'm doing wrong?

Kind regards,

Brad

Hello

I am forced to use a base currency of ZAR - What do you use for this behavior?

The payment gateway I use will only allow ZAR, so I set that as the base currency in my Woocommerce settings.

Edit: But we need to all prices to display in USD only if possible

Hello

I am forced to use a base currency of ZAR - What do you use for this behavior? - Do uoy  use  this  settings - https://share.pluginus.net/image/i20210603111949.png OR  https://currency-switcher.com/force-currency-on-checkout-page/ ?

 

 

I have set 'is multiple allowed' as"no" because my payment gateway only allows one currency (ZAR)

Ok! You need code customization. An  example:

add_filter('wp_head',function(){

if (class_exists('WOOCS')){

global $WOOCS;
if(is_checkout()){

$WOOCS->storage->set_val('woocs_current_currency_tmp',$WOOCS->current_currency);

$WOOCS->reset_currency();
}else{

$curr_c = $WOOCS->storage->get_val('woocs_current_currency_tmp');

if($curr_c){

$WOOCS->set_currency($curr_c);

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

}

}

}
});

Oh ok, thanks very much - where do I place this?

Edit: In my theme header?

I added it to my functions.php file and it seems to have done the trick! Thanks very much for all your help.

Hello

Welcome;)