fbpx

WooCommerce Currency Exchange Rates

Overview #

Imagine having a multi-location/global eCommerce store with multiple currencies enabled for it. Great, isn’t it?! You have the chance to sell to more people, serve more domains, and earn more through it.

Though it is all good, large online shops have complex operations and troubles of their own.

One such complexity is handling currency conversion rates. They literally change every single second. If your team had to fetch information on currency rates and edit details for your store, it would be exhausting. 

Thanks to the WordPress plugins like the Booster module – WooCommerce Currency Exchange Rates that you can automate the currency exchange data fetching and updates. 

Information on the Source of Currency Exchange Rates for this module

This module will let you use rates declared by the European Central Bank exchange (ECB), Bank of England (BOE), TCMB, or as fetched by The Free Currency Converter API. If you are allowing cryptocurrency transactions in your store, you may also fetch rates from Coinbase-like exchange platforms and CoinmarketCap-like reliable crypto price-tracking sites.

All-in-all, you need not worry about the authenticity of fetched currency exchange prices while using the  WooCommerce Currency Exchange Rates feature of Booster and having configured it right.

Main Features of the WooCommerce Currency Exchange Rates

  • Exchange rates for all enabled currencies in the store
  • Exchange rate updates frequency (how many times to update the rates per day)
  • Exchange rate rounding
  • Percentage-based exchange rate offset
  • Fixed-rate exchange rate offset
  • Currency inversion
  • Currency rate updates through API keys
  • Custom currency exchange rate updates

Why MUST you NOT Edit the Currency Exchange Rates in WooCommerce Manually? #

Costly and Prone to Errors

As exchange rates in the international market are updated every minute in general, not automating exchange rate updates will be your biggest mistake. It will not only require 5 to 6 additional resources in the organization but also invite manual errors in the calculation due to the monotonous nature of this job. So, there are two takeaways for you from here:

  1. More resources translate to more expenditure.
  2. If there are errors, either this method will cost you on the higher side or it will affect your reputation and trustworthiness in the market.

Updating the Exchange Rate Occasionally is a really bad idea!

Are you thinking, “How about, I will edit exchange rates every 3 days or so!”

Well, do not do that. Let us explain the reason to you through an example. 

Let’s say your store has a USD-EUR (US Dollar and Euro) exchange rate, with your country’s currency as EUR and the exchange rate as:

1 USD = 0.88 EUR

Now, there is a sudden change in the exchange rates to:

1 USD = 0.78 EUR

This means that you were getting 440 EUR for each $500 paid by customers. But due to this big price change, you are now getting just 390 EUR per $500. And if it goes on for 1 to 2 days while your store makes a sale of $3000-$5000 in this duration, you will lose $300 to $500 for exactly no reason!

WooCommerce Currency Exchange Rates – Installation Guide #

  1. Download, install and activate the Booster for WooCommerce plugin by Pluggabl LLC.
  1. Open your WordPress administrator dashboard and go to WooCommerce > Settings > Booster.
  1. In the Pricing & Currencies section of the Booster settings, scroll down to the Currency Exchange Rates row, and click on the Settings link.
  1. In the Currency Exchange Rates Module Options section, select the Enable Module checkbox, and click on the Save Changes button.

WooCommerce Currency Exchange Rates – Features Settings   #

General Options

Note: These settings will work for all currencies for the modules with Currency Exchange Rates set for Automatic Updates.

  • Select the frequency of Currency Exchange Rates Updates.

You may set this configuration to every minute, hourly, twice a day, daily,  or weekly. Also, you may click on the Update all rates now link to update your shop’s exchange rates to the real-time currency values.

  • Choose your Exchange Rates Server among your options: European Central Bank exchange (ECB), Bank of England (BOE), TCMB, Coinbase, or CoinmarketCap.
  • Enable Exchange Rates Rounding and set the rounding precision (number of decimals) details if you want.
  • Set Exchange Rates Offset in the percentage or fixed rate format. The offset determines the percent increment or decrement to be done in the conversion rate.
    • Offset in Percent: It can be positive as well as negative.  

For example, if the USDEUR pair has an exchange value of 0.875 and your set offset (percentage) is 9, then the exchange value will be 0.963. 

  • Offset in Fixed Amount: The fixed increment or decrement during the exchange rate can be done by entering your value here.
  • For example, if the USDEUR pair has an exchange value of 0.875 and your set offset (fixed) is 0.15, then the exchange value will be 1.03. 

Note: Offset Amount is generally set in order to cover currency conversion expenses and related costs.

  • Inverting the exchange rate implies considering the final conversion rate as the inverse of the real-time exchange rate, i.e. 1/(Exchange Rate). So, if your currency pair has a super-tiny exchange rate, you may Enable the Calculate with Inversion option.
  • Enable the Force Point as Decimal Separator feature if required.

Note: In case you have the WooCommerce Price Formats enabled for your store, and still want to use “.” (Decimal) as the separator in your store, this option will help you out.

  • Click the Reset Settings to restore default settings for this module.

API Keys

When you use an API like Free Currency Converter API for exchange rate fetching, enter the related API keys here.

Custom Currencies Options

While the Currency Exchange Rates feature will work for all currencies that are set through modules with Automatic Updates enabled. However, you may still have automatic updates disabled for some modules or some currencies coming through the modules that are not working in synchronization with the WooCommerce Currency Exchange Rates

For the above-explained scenarios, you may create Custom Currencies using the options in this section.

  • Set a value (in digits) for the Total Custom Currencies field. Save changes to load new fields created due to this field’s value.
  • Select different custom currencies from the dropdown list for each field. Save Changes.
  • For each currency pair (custom currency and your store’s default currency), you may set a current exchange rate value, exchange rates server, offset type, and offset value. If you provide these details (optionally), global settings will be overridden with local details.
  • Press the button (e.g., USD/AED) near each currency pair to grab the current rate.
  • Save Changes.

For Developers (Shortcodes and more) #

  • Use this shortcode to display the currency exchange rate table:
[wcj_currency_exchange_rates_table]

Output:

  • Use this shortcode to display the currency exchange rate for the currency store currency:
[wcj_currency_exchange_rate]

  • Use this function to add a custom currency exchange rate server:

‘wcj_currency_exchange_rates_servers’

An example code snippet that you can add to your ‘functions.php’ file is shown below:

add_filter( ‘wcj_currency_exchange_rates_servers’, ‘booster_add_exchange_server’ );<br />
if ( ! function_exists( ‘booster_add_exchange_server’ ) ) {<br />
    function booster_add_exchange_server( $servers ) {<br />
        $servers[‘your_server_id’] = ‘Your server title’;<br />
        return $servers;<br />
    }<br />
}<br />
add_filter( ‘wcj_currency_exchange_rate’, ‘booster_get_exchange_server_rate’, 10, 4 );<br />
if ( ! function_exists( ‘booster_get_exchange_server_rate’ ) ) {<br />
    function booster_get_exchange_server_rate( $rate, $server, $currency_from, $currency_to ) {<br />
        if ( ‘your_server_id’ === $server ) {<br />
            // TODO: calculate $rate here (using $currency_from and $currency_to)<br />
        }<br />
        return $rate;<br />
    }<br />
}

Powered by BetterDocs