Currency

Base currency

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.

Automatic exchange rates

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:

function my_ei_currency_rate ($rate, $from, $to)
{
if ($from == 'USD' && $to == 'KES')
return 100.15; // <--- rate
if ($from == 'KES' && $to == 'USD')
return 0.01; // <--- rate
}
add_filter( 'ei_currency_rate', 'my_ei_currency_rate', 0, 3 );

How to change the currency when extracting products

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):

  1. 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.

  2. Press Ctrl + Shift + K (Command + Option + K on Mac) to open the browser console.

  3. Press Ctrl + R (Command + R on Mac) to refresh the page.

  4. 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.

  5. 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.