WooCommerce Currency Switcher v.2.2.8

Flexible WooCommerce Currency Switcher

Thanks you for buying of my plugin. I hope its will give for your site more power and more fun for your clients =)


Before upgrading free version to the premium one on your site - uninstall completely free version, and do not worry about settings as they are keeped in the Data Base of the site.

Also read: I just bought the plugin and cant install it. Error!!

  1. At the end we have to get something like this on the plugin settings page:
  2. Install and activate the plugin
  3. Go to WooCommerce settings -> tab "Currencies"
  4. There will be 2 currencies installed by default: USD and EUR
  6. Check radio button to set your site basic currency
  7. Press 'Add currency' to add new one if you need this
    1. check left radio button to set this currency as base IF ITS REALLY BASIC CURRENCY
    2. enter currency code as described here
    3. select currency sign
    4. select currency sign position
    5. select currency decimals
    6. enter currency rate relative to the base OR press finance agregator button
    7. enter any description text (better do that)
    8. click on empty flag image and select the flag image. Take some free flags here
    9. press 'Save changes'
  8. Check left radio button to set any currency as basic (default) - it is very important:
  9. Hint: For each currency you can hide cents on the front of your site. By default JPY cents are always hidden!
  10. Hint: if you want to update all currencies from the current aggregator for one time - press radio button of the basic currency
  11. Hint: if you not found money sign you need you can always add it in the tab Options -> Custom money signs
  12. Hint: if you want let your customers pay in their selected currency in tab Advanced set the option Is multiple allowed to Yes.
  13. You can set currencies rate by hands, or by with aggregators functionality:
  14. No GET data in link - Switches currency without GET properties (?currency=USD) in the link
  15. Show money signs - Show/hide money signs on the front drop-down
  16. Show price info icon - Show info icon near the price on the front of the product which on hover shows prices of products in all another currencies exept of current one.
  17. Welcome currency - In wich currency show prices for first visit of your customer on your site:
  18. Currency aggregator - Currency aggregators which allows to get currency rates automatically!
  19. Currency storage - sometimes some servers doesn allow keep data in the session on site front for non-logged users. So just set it to transient!
  20. Rate auto update - You can set rate auto update for your currencies by wp cron - hourly, twice daily, daily, weekly, monthly.
    Before using this feature - check is current aggregator works fine -> backend by pressing 'finance.aggregator' button. The rate of the currency must be updated with normal value.
    Sometimes for some countries or servers no one aggregator works!
  21. Email notice about "Rate auto update" results - After cron done - new currency rates will be sent on the site admin email. ATTENTION: if you not got emails - it is mean that PHP function mail() doesnt work on your server or sending emails by this function is locked.
  22. Hide switcher on checkout page - Hide switcher on checkout page for any of your reason. Better restrike for users change currency on checkout page in multiple mode.
  23. Payments rules - Hide/Show payment systems on checkout page depending on the current currency
  24. Show approx. amount - Show approximate amount on the checkout and the cart page with currency of user defined by IP in the GeoIp rules tab.
    Show approx. amoun
  25. Show approx. price - Show approximate price on the shop and the single product page with currency of user defined by IP in the GeoIp rules tab. Works only with currencies rates data and NOT with fixed prices rules and geo rules.
  26. I am using cache plugin on my site - Set Yes here ONLY if you are REALLY use cache plugin for your site, for example like 'Super cache' or 'Hiper cache' plugins (doesn matter which). + Important: Set "Custom price format", for example: __PRICE__ (__CODE__). After enabling this feature - clean your cache to make it works. It will allow show prices in selected currency on all pages of the site. Fee for this feature: additional AJAX queries for prices redrawing.
  27. Hint: If you want to use links for different pages with content where currency already pre-selected use link with GET data in it:
  28. Custom money signs: Sometimes count of standard currencies symbols is not enough. You can add your own symbol using simple syntax! Look next screen please:
  29. Custom price format - if you want to change view of the price on the site front you can use this option. Example: __PRICE__ (__CODE__) - means that first will be price-amount then currency code of it. There is 2 special words for this manipulation:
    • __PRICE__ - price-number
    • __CODE__ - code of the current currency
  30. Prices without cents - Recount prices without cents everywhere like in JPY and TWD which by its nature have not cents. Use comma. Example: UAH,RUB. Test it for checkout after set!
  31. After installing data in WOOCS Settings next step is widget installation
  32. You have 7 aggregators, and after selection of one of them press 'Save changes' button before using it
    Sometimes aggregators fails - in such case just select another one, press save changes button, and try to work with it again!
  33. There is 6 currency drop-down skins:
  34. There is possible to hide flags by default on site front:
  35. There is possible to hide money signs on the site front:

Added in v.2.1.8/1.1.8

  1. If you want let your customers pay with their selected currency - you should set multiple mode to 'Yes':
  2. Individual fixed prices rules for each product - You will be able to set FIXED prices for simple and variable products. ATTENTION: 'Is multiple allowed' should be enabled!
  3. Checkout by GeoIP rules - Force the customers to pay on checkout page by rules defined in 'GeoIP rules' tab. ATTENTION: this feature has logical sense if you enabled 'Enable fixed pricing' and also installed fixed prices rules in the products for different currencies!
  4. Individual GeoIP rules for each product - You will be able to set different prices for each product (in BASIC currency) for different countries
  5. Video: Individual GeoIP rules AND Individual fixed prices

From WooCommerce version 2.3.0 it is possible to define from which country is your customer from by IP.
This usefull functionality is using by the plugin to show your site customers currency which you decided to show them in their firts visit. backend
Here is all simple: add countries to the currencies using drop-down. And that is all. For example as on the screen: USD -> selected United States -> this means that for all customers from USA will be set USD on their first vistit to your site.

If you have troubles with this feature read this article please.

This tab functionality allows you to set currency switcher as static block on the right or left side of the site page.
There is 3 skins you can use:

Next options:

  1. Go to the widgets pages
  2. Find 'WooCommerce Currency Switcher' widget and drop it any sidebar you want
  3. Enter any title in the widget or leave it empty
  4. Enter width of currencies drop-down in such manners: 300px, 100%
  5. Check 'Show flags' if you need this
  6. Select flag position IF switcher skin is ddslick
  7. Drop-down options text type - set what you want to show on the front: currency code and its sign, OR its description from the plugin options.
    • code
    • desc

The plugin has 2 additional widgets:

The plugin has shortcode which you can drop anywhere:
[woocs show_flags=1 width='300px' flag_position='right' txt_type='desc']

  1. show_flags - show flags: 1 or 0
  2. width - width. Set it like:300px,150px,75%,100%
  3. flag_position - flag position. You can set left or right (for ddslick skin only)
  4. txt_type - 2 values: desc and code. desc - on the front will be shown currency description in the drop-down options. code - will be shown currency code and its sign.
    • code
    • desc

If you want to set switcher in your wp theme header.php or footer.php use next code:
                <?php echo do_shortcode('[woocs]'); ?>

The plugin has some additioanal shortcodes:

!!Visible only if multiple mode is activated!!

Recalculate order - The plugin provides functionality to recount order to values IN the basic currency. This feature is useful for woo statistic which doesn work in multiple mode and cant operate wit amounts in different currencies. BUT it's recommended test this feature with clone of the site which can be created for 10 minutes by this plugin on your localhost. This will avoid any issues related with software incompatibility!

On page orders you can find button "Recalculate all orders" which allows recalculate all orders to basic currency in one click

Change order currency - In some cases users need ability to create orders by hands. In such case they have to select currency of order.
Just look on the screens below to understand how to to that:


Depends of the plugin settings you can show your currencies drop-down as:

simply drop-down:
as flag images:

Simple drop-down has CSS class woocommerce-currency-switcher which you can use in your customization if you need it.

  1. woocs_price_format - any manipulations with price format
                                add_filter('woocs_price_format', 'my_woocs_custom_format', 999, 2);
                                function my_woocs_custom_format($format, $currency_pos)
                                    return 'ANY_STRING_HERE ' . $format . ' OR_HERE';

    1 - $format (string)
    2 - $currency position (string)
  2. woocs_currency_data_manipulation - If you need manipulate with currency rate, for example with rate of any currency on the fly
                                add_filter('woocs_currency_data_manipulation', 'my_woocs_currency_data_manipulation');
                                function my_woocs_currency_data_manipulation($currencies)
                                    foreach ($currencies as $key => $value)
                                        if($key == 'GBP'){
                                    return $currencies;

    1 - $currencies (array)
    Its possible to change on the fly next currency data:
    Do it by your own logic and be attentive!
  3. woocs_exchange_value - Convert value. For example some plugins get values of the products directly from its meta value without woocommerce hooks, in such case currency switching doesn work. Its just an example, but in this case it is possible use next wordpress filter
                                $value = apply_filters('woocs_exchange_value', $value);

    1 - $value (float)
    Useful for fixing incompatibility in some plugin as this example
  4. woocs_currency_symbols - Add more currency symbols into woo-shop
                                add_filter('woocs_currency_symbols', 'my_woocs_currency_symbols', 999);
                                function my_woocs_currency_symbols($symbols)
                                    return $symbols;

    1 - $symbols (array)
    This can be realized with the plugin settings: tab Options -> 'Custom money signs'
  5. woocs_drop_down_view - possible to change drop-down skin on different pages of the site if its necessary
    Possible values: no,ddslick,chosen,chosen_dark,wselect,flags
                                add_filter('woocs_drop_down_view', 'my_woocs_drop_down_view', 1);
                                function my_woocs_drop_down_view($default_view)
                                    if ($_SERVER['REQUEST_URI'] == '/shop/clothing/happy-ninja-2/')
                                            $default_view = 'chosen';
                                    return $default_view;

    1 - $default_view (string)
    Use $_SERVER['REQUEST_URI'] because function is_page() doesn work there.
    This feature is presented in: tab Options -> 'Drop-down view'
  6. woocs_price_format - possible to change price format. Presented in index.php -> public function woocommerce_price_format()
  7. woocs_price_html_tail - use this to add any info blocks after price html
                                add_filter('woocs_price_html_tail', 'my_woocs_price_html_tail', 999);
                                function my_woocs_price_html_tail($price_html)
                                    if (defined('DOING_AJAX') && DOING_AJAX)
                                            $price_html.="Hello World 2016!!";
                                    return $price_html;

    1 - $price_html (string)
    Combinate it with CSS (in style.css) code if its necessary
                                    display: none;
                                body.single-product .woocs_price_html_tail{
                                    display: block;
                                body.single-product .related .woocs_price_html_tail{
                                    display: none;
  8. woocs_get_approximate_amount_text - works if option 'Show approx. amount' is enabled and replaces word "Approx." to any you want!
                                add_filter('woocs_get_approximate_amount_text', 'my_woocs_get_approximate_amount_text', 999);
                                function my_woocs_get_approximate_amount_text($approx_word, $wc_price)
                                    return sprintf(__('(MY-Approx-any-word. %s)'), $wc_price);

    1 - $approx_word (string)
    2 - $wc_price (string)

Here is described some plugin functionality which can be useful for site development.