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 Change to "Leones" at Checkout

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 want my customers to shop with ease using their default currency based on their Geo-Location. However, on checkout, I want to force the currency change from whatever they were using to my default currency which is Leones, as this is the only currency my payment gateway supports.

How do I achieve that please, as I have no idea what the currency code for leones is? Is it SLL, LE, SLE? The country is"Sierra Leone".

Please help with the instructions on how to achieve this. I saw this on the Q&A, how do I customize it to work as I have explained?

 

How to force any currency on the checkout page

Sometimes its necessary force on checkout page any currency by logic of business.

  • open functions.php of the current wp theme and drop there next script:
  • add_filter('wp_head',function(){    
        if(is_checkout()){
            global $WOOCS;
            $WOOCS->set_currency('USD');
        }
    });
  • Change ‘USD‘ to any currency you need …

Notice: works only when “Is multiple allowed” option is enabled (Yes).

Hello

Please  watch  this  video - https://currency-switcher.com/video#video_1

Check currency  codes - http://en.wikipedia.org/wiki/ISO_4217#Active_codes

I added this code to the functions.php of my theme. It worked for some time then stopped later. It still shows USD on checkout. Site ( https://supportingafricanaid.org.sl/ )

I also added the same code to the plugin"Snippets" and activated nothing still works.

  • add_filter('wp_head',function(){    
        if(is_checkout()){
            global $WOOCS;
            $WOOCS->set_currency('SLL');
        }
    });

Continuing from my previous post, I tried updating the currency to"SLE". This is the new currency accepted in the country.

when the currency changes at checkout, and after clicking on place order it shows"invalid currency."

  • add_filter('wp_head',function(){    
        if(is_checkout()){
            global $WOOCS;
            $WOOCS->set_currency('SLE');
        }
    });
    
    

Hello

Please paste your license key here - https://share.pluginus.net/image/i20210618130558.png -> https://share.pluginus.net/image/i20210618130614.png

Are you sure that your payment system supports this currency

The license code has been attached. Hopefully, it is not a problem from Woocoomerce itself.

Hello

Ok! Try  in  file  - \wp-content\plugins\woocommerce\includes\wc-core-functions.php - add  code - https://c2n.me/4hFYr2y.png

'SLE' => __( 'Sierra Leonean leone', 'woocommerce' ),

and  do a test