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

how to make checkout only in two currencies not multi nor one

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.

I have multi-currencies but I want the checkout to be in only two currencies.

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');

}
}
});

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');

}
}
});

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

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