Force Currency on Checkout 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 pleaseIf 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.
Quote from PetrusV on October 5, 2021, 11:37Hi there,
I want to force currency to ZAR on checkout as no other currency is supported in my PayGate.
I have "Is Multiple Allowed" set to yes
I have the code added to my child theme (I use child) functions.php
add_filter('wp_head',function(){ if(is_checkout()){ global $WOOCS; $WOOCS->set_currency('ZAR'); } });The price still shows as USD on checkout:
Hi there,
I want to force currency to ZAR on checkout as no other currency is supported in my PayGate.
I have"Is Multiple Allowed" set to yes
I have the code added to my child theme (I use child) functions.php
add_filter('wp_head',function(){
if(is_checkout()){
global $WOOCS;
$WOOCS->set_currency('ZAR');
}
});
The price still shows as USD on checkout:Quote from Pablo Borysenco on October 5, 2021, 12:24Hello
I checked your site.
I cannot switch to USD on the checkout page - https://share.pluginus.net/video/v20211005132300.mp4
And please disable this option - https://c2n.me/4dysDNW.png - It doesn't make sense with this code
Hello
I checked your site.
I cannot switch to USD on the checkout page - https://share.pluginus.net/video/v20211005132300.mp4
And please disable this option - https://c2n.me/4dysDNW.png - It doesn't make sense with this code
Quote from PetrusV on October 5, 2021, 14:11I disabled the GEOIP option... cleared cache but still having problems
Sorry for sounding like a total noob, this is really messing with my brain. I do not understand how to achieve the following.
I want two different prices:
1. One price in ZAR for people in South Africa
2. One prince in USD for people outside South AfricaI also want to people to see the currency applied already. So people visiting from South Africa see the ZAR currency and price, and people outside see the USD currency and price.
Then I want the USD to convert to ZAR on checkout because my paygate only accepts ZAR.
I have defined two prices on the product.
Can you please help me? What am I doing wrong?
I disabled the GEOIP option... cleared cache but still having problems
Sorry for sounding like a total noob, this is really messing with my brain. I do not understand how to achieve the following.
I want two different prices:
1. One price in ZAR for people in South Africa
2. One prince in USD for people outside South Africa
I also want to people to see the currency applied already. So people visiting from South Africa see the ZAR currency and price, and people outside see the USD currency and price.
Then I want the USD to convert to ZAR on checkout because my paygate only accepts ZAR.
I have defined two prices on the product.
Can you please help me? What am I doing wrong?
Quote from Pablo Borysenco on October 6, 2021, 09:47Hello
Please watch a video - https://currency-switcher.com/video#video_1
Add this code:
add_filter('wp_head',function(){
if(is_checkout()){
global $WOOCS;
$WOOCS->set_currency('ZAR');} else{
global $WOOCS;
$customer_country = $this->storage->get_val('woocs_user_country');
$currency = $WOOCS->get_currency_by_country($customer_country);
$WOOCS->set_currency($currency);
}});
Delete this - https://share.pluginus.net/image/i20211006104559.png
Hello
Please watch a video - https://currency-switcher.com/video#video_1
Add this code:
add_filter('wp_head',function(){
if(is_checkout()){
global $WOOCS;
$WOOCS->set_currency('ZAR');
} else{
global $WOOCS;
$customer_country = $this->storage->get_val('woocs_user_country');
$currency = $WOOCS->get_currency_by_country($customer_country);
$WOOCS->set_currency($currency);
}
});
Delete this - https://share.pluginus.net/image/i20211006104559.png
Quote from PetrusV on October 18, 2021, 08:01Something wrong with the new code, cause I get this error when I add it:It works on the checkout page, but there is a problem. The code simply switches to ZAR price. The problem is, I have a different price for South Africa ZAR and United States USDExample:(I charge $10 for South Africa and $20 for the United States)
USD Price is $20.00 (+- ZAR R300)
South African price is ZAR R150 (which is $10.00)
On the checkout page, the code does not convert the USD $20.00 to ZAR R300, it simply switches to ZAR R150.So basically the USD price gets ignored, and it simply takes the ZAR price on checkout.How can I 'do the conversion' on the checkout page?
USD Price is $20.00 (+- ZAR R300)
South African price is ZAR R150 (which is $10.00)
On the checkout page, the code does not convert the USD $20.00 to ZAR R300, it simply switches to ZAR R150.
Quote from Pablo Borysenco on October 18, 2021, 11:43Hello
Please use this code:
add_filter('wp_head',function(){
if(is_checkout()){
global $WOOCS;
$WOOCS->set_currency('ZAR');} else{
global $WOOCS;
$customer_country = $WOOCS->storage->get_val('woocs_user_country');
$currency = $WOOCS->get_currency_by_country($customer_country);
$WOOCS->set_currency($currency);
}});
Hello
Please use this code:
add_filter('wp_head',function(){
if(is_checkout()){
global $WOOCS;
$WOOCS->set_currency('ZAR');
} else{
global $WOOCS;
$customer_country = $WOOCS->storage->get_val('woocs_user_country');
$currency = $WOOCS->get_currency_by_country($customer_country);
$WOOCS->set_currency($currency);
}
});