WOOCS - WooCommerce Currency Switcher


This function allows to set currency by your logic.

Actual from: v.2.1.8/1.1.8  


Useful function when you want to convert any amount in non-basic currency into basic currency amount. For example you have 40GBP. Basic currency of your shop is EUR, to convert that 40GBP into XX EUR you are need do next:

40 – amount in GBP 0.8343 – rate of 1 GBP relatively to 1 […]


Converts any value which is in the shop default currency into amount of the current selected currency. For example, we get from any place of the site price/amount (70 for example) which keeps in meta field for example as decimal value in the default currency. But we want to recount this value for our purposes according to […]


This function will help you to define checkout page. Use it to define that current page is checkout.

Better use in your site header.php OR in wp_head hook callback  


This function created to define what currency is “welcome” in WOOCS settings.

Welcome currency is currency which will be set for the first visit of any unique visitor to your site if its not redefined by GEO IP rules on the settings page of the plugin.  


Will return TRUE if GEO IP option is enabled on the plugin settings page


This function returns array of GEO IP rules which are uses in WOOCS



This function reset current selected currency to default currency

You can use it by your own logic for any customization of behavior on checkout page with this function https://currency-switcher.com/function/woocs-get_checkout_page_id/  


Works when GEO IP option is enabled in the plugin settings. This function returns currency which is set in the GEO IP rules of the plugin

Here you can get country codes: https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes (use Alpha-2 code) Use next code if you want to get full name of the country by its code:



Returns count of decimals for any currency code which is defined on the plugin settings page

$currency – is any currency code, for example ‘EUR’