Currency
Last updated
Last updated
WooCommerce allows only one base currency.
To set the currency for your store, go to WooCommerce > Settings > General > Currency Options
.
Target websites may have prices in a different currency from your store's currency. If you import products as simple products, the plugin will try to convert prices to the default currency.
For External/Affiliate products, you can either convert prices or keep the original currency. For settings, go to External Importer > Settings > Import > Currency
.
Actually, selecting 'Add original' doesn't make your website multicurrency. This feature replaces the currency symbol at the frontend part of your WooCommerce catalog. Because External products can't be added to the cart, that's usually enough.
To convert currencies, External Importer will use European Central Bank exchange rates. This service doesn't require sign-up, but the set of currencies for which rates are provided is limited. If the desired currency is not listed, you can use Fixer.io as an alternative.
Fixer API has a free plan, but you have to sign up to get your own API access key.
To set your key, go to External Importer > Settings > General > Fixer API key
.
You can set the exchange rate manually. Add the following code to functions.php of your theme or child theme:
Some target websites can display prices in different currencies. That usually depends on the visitor's IP. For example, if your server is located in the United States, prices will be extracted in USD.
A site visitor can select website currency and language. These settings are usually saved in cookies.
To get prices in the selected currency, we must send a request with preset cookies. To do so, complete the following steps (we use Firefox in this example):
Go to a website and select a currency. If the desired currency is the default, select any other currency, then select the desired currency again.
Press Ctrl + Shift + K
(Command + Option + K
on Mac) to open the browser console.
Press Ctrl + R
(Command + R
on Mac) to refresh the page.
Go to the Network tab
in the browser console. Click the first URL on the left side of the window, then go to Headers > Request Headers > Cookie
.
Copy the cookie value and add it to External Importer > Settings > Extractor > Custom cookies
.
Note: this method doesn't work for all websites.
Some China online marketplaces (such as bangproduct.com, geekbuying.com, gearbest.com) also support changing the currency in the address bar settings. To do so, add the currency=EUR
parameter to the product URL.