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

Forcing currency to my local currency on checkout is not working :(

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, I have ZAR (South African Rands), USD and EURO on my site, however my payment gateway can only process Rands. So I followed the FAQ advice to add the following code to my theme's functions.php file:

add_filter('wp_head',function(){
if(is_checkout()){
global $WOOCS;
$WOOCS->set_currency('ZAR');
}
});
However when I test a visit from the US by VPN the currency stays US Dollars on the checkout page.
Please help!

Hello

However when I test a visit from the US by VPN the currency stays US Dollars on the checkout page. - Yes, of course, this is correct behavior!  you made this setting - https://clip2net.com/s/49VMWHz - please  disable  it  and  do a test

Hi there!

I switched off the 'Checkout by GeoIP rules' setting and tried accessing the site from USA and UK, and now the prices are showing in ZAR instead of Dollars or Euros. What I need is for prices on product pages and in the cart to display in the visitor's own currency--USD or EUR--and when they checkout it charges them in Rands. Right now it looks like I can have either all ZAR or all USD/EUR, when what I actually need is USD/EUR on product pages and cart and ZAR for checkout. Is that possible?

I see if I start off in a new private browsing session that the currency is dollars, and then it goes to ZAR at checkout, but if I navigate back to the product page or cart then the currency stays ZAR. Do you have a code to switch back to the geo-detected currency on other pages except checkout, please?

Hello

Try  to  add this  code

add_action('wp_head', function() {
if(class_exists(WOOCS)  AND !is_checkout()){
global $WOOCS;
$country = $WOOCS ->storage->get_val('woocs_user_country');
$user_currency = $WOOCS ->get_currency_by_country($country);
if (!empty($user_currency)) {
//$user_currency is empty its mean that current country is not in geo ip rules
$WOOCS ->set_currency($user_currency);
}
}
}

That's fantastic, thanks so much!!

Hello

Welcome;)

http://codecanyon.net/downloads - rate please the plugin if you liked it ...