
ahmadtello95@gmail.com(@ahmadtello95-gmail-com)
4 Posts
Customers
Quote from ahmadtello95@gmail.com on May 5, 2021, 02:20
I have multi-currencies but I want the checkout to be in only two currencies.
I have multi-currencies but I want the checkout to be in only two currencies.

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on May 5, 2021, 11:34
Hello
Unfortunately the plugin does not have this feature.
You need code customization - https://currency-switcher.com/force-currency-on-checkout-page/
An example for USD and EUR
add_filter('wp_head',function(){
if(is_checkout()){
global $WOOCS;
if($WOOCS->current_currency!='USD' || $WOOCS->current_currency!='EUR' ){
$WOOCS->set_currency('USD');
}
}
});
Hello
Unfortunately the plugin does not have this feature.
You need code customization - https://currency-switcher.com/force-currency-on-checkout-page/
An example for USD and EUR
add_filter('wp_head',function(){
if(is_checkout()){
global $WOOCS;
if($WOOCS->current_currency!='USD' || $WOOCS->current_currency!='EUR' ){
$WOOCS->set_currency('USD');
}
}
});

ahmadtello95@gmail.com(@ahmadtello95-gmail-com)
4 PostsTopic Author
Customers
Quote from ahmadtello95@gmail.com on May 7, 2021, 12:58
this code will make the checkout only in USD, right?
lets say I have 10 currencies on my website, and I want the checkout to be only in USD or EUR how would that be done? same code?
add_filter('wp_head',function(){
if(is_checkout()){
global $WOOCS;
if($WOOCS->current_currency!='X' || $WOOCS->current_currency!='Y' ){
$WOOCS->set_currency('USD');
}
}
});
this code will make the checkout only in USD, right?
lets say I have 10 currencies on my website, and I want the checkout to be only in USD or EUR how would that be done? same code?
add_filter('wp_head',function(){
if(is_checkout()){
global $WOOCS;
if($WOOCS->current_currency!='X' || $WOOCS->current_currency!='Y' ){
$WOOCS->set_currency('USD');
}
}
});

ahmadtello95@gmail.com(@ahmadtello95-gmail-com)
4 PostsTopic Author
Customers
Quote from ahmadtello95@gmail.com on May 8, 2021, 00:24
I tried your code but it's breaking the website.
I tried to edit it to suit my website like this
add_filter('wp_head',function(){
if(is_checkout()){
global $WOOCS;
if($WOOCS->current_currency=='USD' || $WOOCS->current_currency=='EUR' || $WOOCS->current_currency=='JOD' || $WOOCS->current_currency=='iqd' || $WOOCS->current_currency=='SAR' || $WOOCS->current_currency=='Aed'){
$WOOCS->set_currency('USD');
}
}
});
But its not working too
I tried your code but it's breaking the website.
I tried to edit it to suit my website like this
add_filter('wp_head',function(){
if(is_checkout()){
global $WOOCS;
if($WOOCS->current_currency=='USD' || $WOOCS->current_currency=='EUR' || $WOOCS->current_currency=='JOD' || $WOOCS->current_currency=='iqd' || $WOOCS->current_currency=='SAR' || $WOOCS->current_currency=='Aed'){
$WOOCS->set_currency('USD');
}
}
});
But its not working too

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on May 10, 2021, 11:24
Hello
Paste your license key here - https://c2n.me/43SC6rb.png -> https://c2n.me/42HBIt7.png
this code will make the checkout only in USD, right? - NO!My code allows you to pay in two currencies USD EUR
Hello
Paste your license key here - https://c2n.me/43SC6rb.png -> https://c2n.me/42HBIt7.png
this code will make the checkout only in USD, right? - NO!My code allows you to pay in two currencies USD EUR