Currency Switcher for WooCommerce WordPress plugin extends WooCommerce by adding currency switcher to your shop’s frontend.
Main Features
- Automatic currency exchange rates updates.
- Prices on per product basis.
- Currency by country (i.e. customer’s IP).
- Currency by language (i.e. locale).
- Option to revert to original currency on checkout.
- Option to override currency by user selected billing or shipping country.
- Various currency switcher placement options.
- Price format options for each currency.
- Option to additionally change order currency by admin.
- Option to add country flags in currency switchers.
Settings
Plugin settings are located in “WooCommerce > Settings > Currency Switcher”. Plugin has seven settings sections:
General
First option in General setting section lets you enable/disable the plugin functionality. It may be helpful if you want to fill plugin’s settings without affecting your site’s frontend.
Next option lets you turn on per product pricing. After enabling the checkbox, new settings will be added to each product’s edit page. There you can set price directly for each product without using exchange rates.
If you need to revert to default currency on checkout, you can enable it here. That is, currency switcher will work as usual, until your customer reaches the checkout page, then currency will be changed back to you shop’s default. This is helpful if you want to display prices in different currencies, but need to charge customer in single currency only (for example, because of limitations of your payment gateway).
General section will also let you select if you want switcher to be placed on single product pages. You can choose between three different switcher looks – radio buttons, select dropdown or links. To put the currency switcher on frontend you can also use switcher widget, shortcodes or functions. Shortcodes:
[woocommerce_currency_switcher_radio_list]
[woocommerce_currency_switcher_drop_down_box]
[woocommerce_currency_switcher_link_list]
Corresponding switchers will look like this:
Next option lets you set rounding options. You can choose between no rounding, round, round up and round down. If rounding is enabled, you can also set rounding precision here.
Last option allows you to disable currency switcher functionality on some selected URI. Enter one URI per line. Leave blank if not sure.
Currencies
Currencies settings section lets you select which currencies you want to be in switcher. This is the settings section you should visit first. Shop’s default currency is added to switcher automatically, so you don’t need to select it. Number of additional currencies is limited to 2 additional currencies in free version (so 3 total with shop’s default currency) and is unlimited in Pro version. After you change the number of additional currencies, click Save changes button. After that new settings fields will appear, in which you can select which additional currencies to add. If, for example, you select 4 additional currencies, then your switcher will consist of 5 currencies total, that is, your shop’s default plus 4 additional currencies. If some currencies are missing from the list, we suggest using All Currencies for WooCommerce plugin.
In Pro version we’ve added Auto Generate PayPal Supported Currencies button, which will automatically add all 25 currencies supported by PayPal payment gateway (this number will be 24 if your shop’s default currency is supported by PayPal).
Exchange Rates
In exchange rates section you can set exchange rates and (optionally) time when the rates should be updated. You can choose between:
- Enter Rates Manually
- Update Automatically Every Minute
- Update Automatically Hourly
- Update Automatically Twice Daily
- Update Automatically Daily
- Update Automatically Weekly
If you have enabled Currency Switcher on per Product Basis in General section, products which have their pricing set on per product basis won’t use exchange rates. So if, for example, you are going to use per product pricing for all your products, you can leave exchange rates values set to default 1.
You can also Update All Exchange Rates Now or Reset All Rates with single button click.
Near each currency pair there is also button to grab current exchange rate for the pair. Don’t forget to Save changes if you click this button.
Exchange rates can be updated from these servers:
- Yahoo finance
- European Central Bank
- Fixer.io
- Coinbase
- CoinMarketCap
Countries
Currency Countries (by IP) section lets you display currency by customer’s country. Customer’s country is calculated by customer’s IP. That is, if new customer visits your shop from some country, corresponding currency is automatically selected. If you won’t display currency switcher on frontend, then your customer won’t be able to change the currency manually, so this Currency Switcher for WooCommerce plugin can be used as “price and currency by country” plugin.
You can also Auto Assign Countries or Reset Countries with single button click.
Languages
Currency Languages (Locales) section allows you to assign currencies based on customer’s language (i.e. locale). This can be very helpful if you have a multilingual WordPress site and using some additional plugin for this (e.g. Polylang).
You can use this in two modes: restrict currency by customer’s language, or assign currency by language only once, then allow customer to change currency via switcher. This can be changed with Always Use Locale to Assign Currency checkbox. If you restrict currency by customer’s language (checkbox enabled), then currency can be changed via language switcher (e.g. from Polylang plugin) and there is no need to output currency switcher at frontend.
With Enter Locales as Comma Separated Text checkbox you can choose if you want to select languages from our list, or enter it directly, e.g. en_CA,fr_CA
. Don’t forget to save changes after you set this option, to see different input fields.
Same as in Countries section, you can also Auto Assign Locales or Reset Locales with single button click.
Price Formats
Price Formats section allows you to set different price formats for each currency. Price formats include:
- Currency position
- Additional currency code position (optional)
- Thousand separator
- Decimal separator
- Number of decimals
- Currency Symbol
.Flags
Country Flags section allows you to display country flags in all types of currency switchers on frontend. Flags are assigned automatically for each currency, however you can change which country flag should be displayed for each currency manually.
Shortcodes
In addition to three currency switcher shortcodes described earlier, there are two more shortcodes that are designed to display product prices in converted currencies.
[woocommerce_currency_switcher_product_price_table]
shortcode will display product price table in all available currencies:
[woocommerce_currency_switcher_convert_price]
shortcode allows you to convert any price to selected currency. This can be used in two ways:
Calculate price in current (i.e. chosen by user) currency:
[woocommerce_currency_switcher_convert_price price="1.99" format_price="yes"]
Calculate price in selected currency:
[woocommerce_currency_switcher_convert_price price="1.99" currency="AUD" format_price="yes"]
If you prefer PHP function:
echo alg_convert_price( array( 'price' => 1.99, 'currency' => 'AUD', 'format_price' => 'yes' ) );
Tips & Tricks
All currency switchers can be styled on frontend with CSS (e.g. in “Appearance > Customize > Additional CSS”), e.g.:
Radio buttons:
#alg_currency_selector { width: 100%; } /* `form` element */ .alg_currency_radio { float: right; } /* `input` element */ #alg_currency_USD { float: right; } /* `input` element */ label[for=alg_currency_USD] { color: red; } /* `label` element */ label[for=alg_currency_EUR] { color: green; } /* `label` element */ label[for=alg_currency_GBP] { color: blue; } /* `label` element */
Drop down box:
#alg_currency_selector { width: 100%; } /* `form` element */ #alg_currency_select { width: 100%; } /* `select` element */ #alg_currency_USD { color: red; } /* `option` element */ #alg_currency_EUR { color: green; } /* `option` element */ #alg_currency_GBP { color: blue; } /* `option` element */
Links list:
#alg_currency_selector { text-align: center; } /* `div` element */ #alg_currency_USD { color: red; } /* `a` element */ #alg_currency_EUR { color: green; } /* `a` element */ #alg_currency_GBP { color: blue; } /* `a` element */
Displaying the converted price on a custom template
If you are trying to display the converted price on a custom template for example you can use our alg_get_product_price_by_currency() function. e.g
add_action('woocommerce_single_product_summary', function(){ if ( ! class_exists( 'Alg_WC_Currency_Switcher' ) ) { return; } global $product; $price = get_post_meta( get_the_ID(), '_regular_price', true); $converted_price = alg_get_product_price_by_currency( $price, alg_get_current_currency_code(), $product, true ); $converted_price_formatted = wc_price( $converted_price ); echo "{$converted_price}"; echo "{$converted_price_formatted}"; });
How to override rounding and pretty price per currency?
If you want for example to turn on the rounding for all products except for Bitcoin, supposing you’ve enabled rounding and pretty price on plugin’s settings:
add_filter( 'alg_wc_currency_switcher_correction', function ( $correction, $currency ) { if ( $currency == 'BTC' ) { $correction['rounding'] = 'no_round'; $correction['pretty_price'] = 'no'; } return $correction; }, 10, 2 );
Forcing currency by URL
If you want to set a currency just accessing an URL you can append the alg_currency
variable with the currency code you want.
e.g http://www.yoursite.com?alg_currency=USD
Free vs Pro
Free Version | Pro Version | |
---|---|---|
Switcher Placement and Format Options | ||
Revert Currency to Default on Checkout | ||
Exchange Rates Final Price Correction | ||
Currency Conversion for Fixed Amount Coupon | ||
Currency Conversion for Free Shipping Minimum Order Amount | ||
“Pretty Price” | ||
Prices on per Product Basis | ||
Prices via Automatic Exchange Rates | ||
Currency Countries (by IP) | ||
Currency Languages (Locales) | ||
Price Formats & Currency Symbols | ||
Currencies | Maximum 3 currencies (including shop’s default) | Unlimited |
Country Flags |
SleepBetter (verified owner) –
Anyone there? I will give a maximum star rating, but obviously need this issue sorting first.
SleepBetter (verified owner) –
Hi (I did post on your support page, but it wasn’t published??),
I have just purchased and installed your pro version of Currency Switcher Plugin, the website only has one product, so should be simple, but the product should be priced at £15.95 in the UK, but when looking at the home page from the UK, it doesn’t say that, it says ₹1,441.00 ? ? Can you help please?
The site is sleepbetterremedies.com
Thanks.
Chris.
abdul (verified owner) –
Some of the currency’s don’t get updated, can you fix it or refund me
eg: LKR, TWD
Please can you fix it.
Would rate more if this is fixed
rshdwork (verified owner) –
So far so good
rshdwork (verified owner) –
I bought this plugin order number #11255 but it does not show user country and the plugin does not work
as they stated in their feature list (Currency Countries (by IP) does not work properly)!
Can I ask for refund or is there any updates to fix this problem?
samira saadati –
hi
is it works with addons plugin?
I mean, is it change addons currency to?
George –
Very useful plugin! Developer is just great! He added special exchange rate for me :))
I am going to buy paid version for my current project! Thank you!
Rachel Mills –
Thanks a lot for the really good and prompt service lately… wasn’t always this easy to get responses.
I really appreciate the improvement in this area.
Thanks for helping in backend and coming up with solutions.
steve –
Are you kidding ?? WordPress CRASHES during activation of this plugin… Tried 2 times. Had to delete the plugin folder to resolve the problem…
Pablo Pacheco –
Hello Steve,
I’m sorry it didn’t work well for you. If you allow me I can try to help you.
Gennady –
Plugin (v. 2.9.0) doesn’t grab exchange rates from any financial server.
While switch to US dollars it wrong places the sale price equal to regular price and adds sale budget on product.
Pablo Pacheco –
Hello,
It should be working just fine. Please let me help you if something isn’t working well for you.
Please create a WordPress user for me using the email [email protected] and I will take a look at your site.
If you want, please contact us through our forums too. We will probably help you faster.
https://wpfactory.com/contact-us/
Olaotan Oladitan (verified owner) –
Great plugin. I tried some other plugins, but this was the best.
Works seamlessly, and they were very responsive when I wanted them to add a new feature.
Arek –
Like it!
Rachel –
plugin is causing major issues and no one responds to my questions…
my site is looping and gets frozen in back end if I try to change any settings now. Flags don’t work all of a sudden… No help??
Gukkie (verified owner) –
Plugin only works well with no page caching. Plugins like WP Rocket or any other caching plugins will not work well with this plugin as it seems to not support page caching. Support is 0/5 as seen in the “Support” section where no one responds to technical queries.
Algoritmika Ltd. –
Hi,
Sorry for not replying earlier. Could you please try selecting “Geolocate (with page caching support)” option for “Default customer location” in “WooCommerce > Settings > General” (this will add ?v=… to all you pages).
Best regards,
Tom
Gukkie (verified owner) –
Good plugin but does not work well with page caching,,
Paulo –
The plugin works alright. Had problems with CSS and need customisation. I’ve seen better ones for Opencart.
The only major downside of that there’s no support for the paid version.
Simon (verified owner) –
This is EASILY the best currency switcher plugin for WordPress and WooCommerce – and I’ve tried (and purchased…) them all.
Even better, the support is very responsive, with several features added upon request. Brilliant.
Tansu –
Hi there,
I use EURO as my main currency and I use manually entered values for my other currencies (Pound and Thai Baht). Now, I am planning to add Bitcoin as well. However, I cannot use manually entered values for Bitcoin since the value of BTC against other currencies changes so frequently. That means I will need to change BTC values every once in a while to keep up with the latest BTC values. Bitcoin should be automatically converted while other currencies have manually entered values. I checked every setting but I don’t think this is possible. I hope you will bring this feature with the following updates.
Thank you.
Ricardo –
Great plugin and great support!!!
Tom Anbinder –
Thank you!