frankebailey@gmail.com(@frankebailey-gmail-com)
8 Posts
Customers
Quote from frankebailey@gmail.com on November 20, 2020, 16:43
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!
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!
Pablo Borysenco(@pavlo_borysenco)
29,364 Posts
Quote from Pablo Borysenco on November 23, 2020, 12:02
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
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
frankebailey@gmail.com(@frankebailey-gmail-com)
8 PostsTopic Author
Customers
Quote from frankebailey@gmail.com on November 23, 2020, 14:02
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?
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?
frankebailey@gmail.com(@frankebailey-gmail-com)
8 PostsTopic Author
Customers
Quote from frankebailey@gmail.com on November 23, 2020, 14:11
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?
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?
Pablo Borysenco(@pavlo_borysenco)
29,364 Posts
Quote from Pablo Borysenco on November 24, 2020, 11:41
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);
}
}
}
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);
}
}
}
frankebailey@gmail.com(@frankebailey-gmail-com)
8 PostsTopic Author
Customers
Quote from frankebailey@gmail.com on November 24, 2020, 11:53
That's fantastic, thanks so much!!
That's fantastic, thanks so much!!
Pablo Borysenco(@pavlo_borysenco)
29,364 Posts
Quote from Pablo Borysenco on November 25, 2020, 11:59
Hello
Welcome;)
http://codecanyon.net/downloads - rate please the plugin if you liked it ...
Hello
Welcome;)
http://codecanyon.net/downloads - rate please the plugin if you liked it ...