Currency Exchange Rates

WooCommerce Currency Exchange Rates

Automatic currency exchange rates for WooCommerce

Description

WooCommerce Currency Exchange Rates module lets you can setup exchange rates settings for currency pairs used in other Booster’s multicurrency modules

Currency Exchange Rates Module Options

General Options

All currencies from all enabled modules (with “Exchange Rates Updates” set to “Automatically via Currency Exchange Rates module”) will be automatically added to the list.

WooCommerce Currency Exchange Rates - Admin Settings - General Options

Exchange Rates Updates
Here you can select currency exchange rates update interval. Possible values: Update Every Minute; Update Hourly; Update Twice Daily; Update Daily; Update Weekly.

Default: Update Daily
Exchange Rates Server
Possible values: Yahoo; European Central Bank (ECB); TCMB; Fixer.io; Coinbase; CoinMarketCap.

Default: European Central Bank (ECB)
Exchange Rates Rounding
Enable this if you want currency exchange rates to be rounded.

Default: no
Rounding Precision
If rounding is enabled – set precision here.

Default:
Exchange Rates Offset – Percent
Here you can add a percent offset to the rates. Can be positive or negative. If both percent and fixed offsets are set – percent offset is applied first and fixed offset after that. For example, let’s say that currency exchange rate for USDEUR pair is 0.84. Then if you set percent offset to 10, resulting rate will be 0.924 (that is: 0.84 + 10%). Please note that this offset is only added on automatic rate updates (it’s not applied when you click “USD/EUR” button to grab rates in real time).

Default:
Exchange Rates Offset – Fixed
Here you can add a fixed offset to the rates. Can be positive or negative. If both percent and fixed offsets are set – percent offset is applied first and fixed offset after that.

Default:
Calculate with Inversion
If your currency pair have very small exchange rate, you may want to invert currencies before calculating the rate.

Default: no
Always Use cURL
If for some reason currency exchange rates are not updating, try enabling this option.

Default: no

Custom Currencies Options

You can add more currencies in this section. E.g. this can be used to display exchange rates with ,

USD / EUR0.924556
USD / AED3.673108
USD / CAD1.360207
USD / GBP0.792974
USD / BRL4.989746
USD / CNY7.228358
shortcodes.

WooCommerce Currency Exchange Rates - Admin Settings - Custom Currencies Options

Total Custom Currencies
Default:
Custom Currency #X
Select additional currency here.

Default: Disabled

Exchange Rates

WooCommerce Currency Exchange Rates - Admin Settings - Exchange Rates

Rate for Currency Pair
Currency exchange rate for the current pair. By pressing button near each currency pair, you can grab current exchange rate.

Default:
Exchange Rates Server
If you want use another (i.e. not default / selected above) currency exchange rate server for the current pair, you can set it here. Possible values: Use default; Yahoo; European Central Bank (ECB); TCMB; Fixer.io; Coinbase; CoinMarketCap.

Default: Use default

Developers

Adding Custom Exchange Server

If you wish to add custom exchange server, you need these filters:

  • wcj_currency_exchange_rates_servers and
  • wcj_currency_exchange_rate

For example, you could add something like this to your (child) theme’s functions.php file:

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

Accessible through:

  • WooCommerce > Settings > Booster > Prices & Currencies > Currency Exchange Rates

Tested on WooCommerce 4.0.0 and WordPress 5.3.2Plugin can be downloaded here. If there are any locked fields in the module, you will need to get Booster Plus to unlock them.

WooCommerce Booster ModulesWooCommerce CurrenciesWooCommerce Currency Exchange RatesWooCommerce MulticurrencyWooCommerce Prices

#comment>

#comment>

#comment>#comment>#comment>

Leave a Reply Click here to cancel reply.

#comment>

Comments

32 Comments

  1. Jared December 20, 2019 at 11:29 pm#comment>

    I have another plugin that returns shipping values in a currency different from my store. I’d like to write a custom function in my child functions.php to convert that to my store currency if it is being shipped that method. Is there a way to leverage this plugin which already does currency converstion for me by calling something with the value and the currency to and from to convert?

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

  2. #comment>

  3. jorge November 14, 2019 at 12:07 pm#comment>

    Hi,

    in all your exchange rate servers, can’t retrieve the exchange rate for
    EUR > AOA
    give me empty value allways.

    Thank you

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • RokasJ November 15, 2019 at 5:51 pm#comment>

      Hi Jorge,

      It’s possible that none of the exchange servers support this currency pair. Please also try “Always Use cURL” option. If that doesn’t help the unfortunately you will have to resort to using a manually entered exchange rate for this currency pair.

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  4. #comment>

  5. Gonzalo September 16, 2019 at 12:26 pm#comment>

    hello how hidden the conversion USD /. This example (https://ibb.co/vhKpHW6

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

  6. #comment>

  7. Byron Hasegawa May 28, 2019 at 7:22 am#comment>

    I exchange my price from GBP to JPY
    I want my price ends in 0(zero) but, either I checked the “round” system still not working and not end in 0(zero)

    what can I do?

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • RokasJ May 28, 2019 at 1:46 pm#comment>

      Hi Byron,

      Rounding option allows rounding exchange rates, not the prices itself. This means that to make prices end in 0, your current prices should already end in 0 and exchange rates should be rounded to whole numbers which wouldn’t change the price at all if for example the exchange rate is usually >=05. and <1.5. We have added an option to round the final prices that were calculated using exchange rate to our todo list.

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  8. #comment>

  9. juanpablolaclau April 4, 2019 at 4:09 am#comment>

    Hi, the currencies are not updating, I need to set the price on us dollars and being able to have automatic transformation into ARS pesos argentine pesos

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • RokasJ April 4, 2019 at 9:55 am#comment>

      Hi,

      Not all exchange rate servers do might support this currency pair. If it’s not updating, I would recommend changing its server to some else and seeing if it works.

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    • gonzalo September 16, 2019 at 12:21 pm#comment>

      hola. pudiste hacerlo funcionar?

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  10. #comment>

  11. Aung April 1, 2019 at 7:58 pm#comment>

    Not updating the rates daily. How may I fix the issue?
    Thanks

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • RokasJ April 3, 2019 at 8:27 pm#comment>

      Hi,

      Could you contact us directly at support@booster.io? Thank you.

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  12. #comment>

  13. Chris November 14, 2018 at 8:03 pm#comment>

    Hi, no luck at all. I had already the cURL option enabled and checked with all the currency servers. Only the first 2 currencies get updated the rest have an empty value, even if I click the button to updat or if I try to update them all at once.

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • RokasJ November 14, 2018 at 9:23 pm#comment>

      Hi Chris,

      Could you contact us directly at support@booster.io? Thank you.

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  14. #comment>

  15. Chris November 14, 2018 at 6:33 am#comment>

    Hi,
    It seems that I am not possible to get more than 3 currencies updated. Even if I hit the button to individually update a currency, only the first 3 work and I need to have at least 15 currencies. Any help?

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • RokasJ November 14, 2018 at 2:52 pm#comment>

      Hi Chris,

      Can you try enabling “Always Use cURL” option in WooCommerce > Settings > Booster > Prices & Currencies > Currency Exchange Rates (module should be enabled as well)? If that still doesn’t work, can you try changing the exchange rates server and see if it works with a different one?

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  16. #comment>

  17. Sathya October 19, 2018 at 5:38 am#comment>

    Hi, Inversion doesn’t seem to work.

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • RokasJ October 20, 2018 at 9:05 pm#comment>

      Hi Sathya,

      Can you contact us at support@booster.io? Let us know why you think the inversion is not working for you.

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  18. #comment>

  19. Jorge Santos September 12, 2018 at 10:56 am#comment>

    Hi

    i don’t understand

    $servers[‘your_server_id’] = ‘The Free Currency Converter’;

    what is [your_server_id] ????

    Thank you

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

  20. #comment>

  21. Jorge Santos September 12, 2018 at 10:53 am#comment>

    Hi,
    how can i add “The Free Currency Converter” to exchange rates aggregator?

    Thank you

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

  22. #comment>

  23. satisfactum.ru September 5, 2018 at 6:39 am#comment>

    Good afternoon!
    Exchange rates have broken, it seems – the rates are not updated automatically. However, the courses of crypto currency are updated regularly.
    How do you know about the source of the error?

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • RokasJ September 6, 2018 at 1:11 pm#comment>

      Hi,

      Can you try changing the exchange server?

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  24. #comment>

  25. Jorge Santos August 16, 2018 at 9:25 am#comment>

    Hi,

    and great plugin you have.

    But now the automatic exchange rate stop working for me.
    I use the Yahoo server.

    Thank you

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

  26. #comment>

  27. Jorge Santos August 1, 2018 at 6:34 pm#comment>

    Hi,

    Don’t work with
    Flexible Shipping by WP Desk

    Any sugestion?

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

  28. #comment>

  29. Stuart Graham July 12, 2018 at 9:25 am#comment>

    After enabling the module and adding currencies it all works fine.

    However going buck to it later the currencies go back to the default 1/1 ratio which of course is not very good.

    Am I doing anything wrong here.

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • RokasJ July 12, 2018 at 5:45 pm#comment>

      Hi Stuart,

      Can you contact us at support@booster.io? Thanks.

      Best regards,
      Rokas – Support Team

      #comment>#comment>Avatar#comment>

    • #comment>

    #comment>

  30. #comment>

  31. onur April 11, 2018 at 7:53 am#comment>

    this feature dosen’t work. and support requests are not returning.

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

  32. #comment>

  33. Omar March 21, 2018 at 9:20 pm#comment>

    Need bank of england exchange rate, is it possible to automatically add that and it works?

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • Booster Support Team March 22, 2018 at 6:27 pm#comment>

      Hi Omar,

      I’ve just made some changes to the plugin. Please download the development version here – https://booster.io/dev/. You will need to uninstall the old plugin version first (don’t worry your saved settings won’t disappear). If you are a Booster Plus user – please let me know (on tom@booster.io) your order number, and I will send you the development version for Plus.

      Now I’ve added “Bank of England (BOE)” server option to “WooCommerce > Settings > Booster > Prices & Currencies > Currency Exchange Rates”. It is taking the rates from here. Needs more testing though…

      Hope that helps.

      P.S. If you like Booster, please leave us a rating

      Best regards,
      Tom

      #comment>#comment>Booster Support Team#comment>

    • #comment>

    #comment>

  34. #comment>

  35. handokogho November 18, 2017 at 10:51 pm#comment>

    hi
    how i set also set Currency Exchange Rates
    for shipping cost and uniq payment code can you explain thanks
    Really make me confused

    Regards

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

  36. #comment>

  37. Darwin Ramon October 3, 2017 at 4:10 pm#comment>

    Hi
    Could the bitpay exchange rate be added ? https://bitpay.com/bitcoin-exchange-rates for bitcoin the current options to have bitcoin exchange is Yahoo but it is not very realiable 🙁

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

  38. #comment>

  39. James February 15, 2017 at 3:35 am#comment>

    Hi,

    I am getting lots of php errors logged on my server that all look something like this:
    —————————-
    [03-Feb-2017 20:25:02 UTC] PHP Warning: file_get_contents(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/mysite/public_html/wp-content/plugins/woocommerce-jetpack/includes/exchange-rates/class-wcj-exchange-rates-crons.php on line 72
    —————————-

    It seems that some of your code uses the file_get_contents() function, but this requires allow_url_fopen to be on which, as I understand it, is a security risk. So having the allow_url_fopen function turned off (the recomended server config) seems to break something in your code. This website has details and suggests that “If you do need it, the curl module probably can do it better, and refactoring your application to use curl to disable allow_url_fopen may deter the least determined cracker.”

    Do you think you could update the code so it doesn’t require allow_url_fopen to be turned on? I don’t wish to enable this function for jsut one plugin when there are alternatives available that use more secure code.

    Regards, James

    Reply to thread

    #comment>#comment>#comment>Avatar#comment>

    • Booster Support Team February 15, 2017 at 7:58 am#comment>

      Hi James,

      I’ve just made the necessary changes to the plugin. Please download the development version here – http://booster.io/dev/. You will need to uninstall the old version first.

      I’ve added cURL as fallback only in “Currency Exchange Rates” module for now, will need some more time to check if there are more modules that needs fixing.

      If possible – please let me know if it works fine now.

      P.S. I saw your other messages in “Prices and Currencies by Country” module – will reply to you there shortly.

      Best regards,
      Tom

      #comment>#comment>Booster Support Team#comment>

    • #comment>

    #comment>

  40. #comment>

#comment>#comment>#comment>#comment>

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

This site uses Akismet to reduce spam. Learn how your comment data is processed.