Title: Euro FxRef Currency Converter (by DKZR)
Author: joost de keijzer
Published: <strong>1. Oktober 2012</strong>
Last modified: 3. September 2026

---

Search plugins

![](https://ps.w.org/euro-fxref-currency-converter/assets/icon-128x128.png?rev=3314337)

# Euro FxRef Currency Converter (by DKZR)

 By [joost de keijzer](https://profiles.wordpress.org/joostdekeijzer/)

[Download](https://downloads.wordpress.org/plugin/euro-fxref-currency-converter.2.0.4.zip)

 * [Details](https://de-ch.wordpress.org/plugins/euro-fxref-currency-converter/#description)
 * [Reviews](https://de-ch.wordpress.org/plugins/euro-fxref-currency-converter/#reviews)
 *  [Installation](https://de-ch.wordpress.org/plugins/euro-fxref-currency-converter/#installation)
 * [Development](https://de-ch.wordpress.org/plugins/euro-fxref-currency-converter/#developers)

 [Support](https://wordpress.org/support/plugin/euro-fxref-currency-converter/)

## Description

Using the `[currency]` shortcode you can convert one currency to another. The conversion
is based on the rates published by the ECB. You can change from and to any of the
supported currencies.

The `[currency_legal]` shortcode outputs a disclaimer text and a link to the ECB
eurofxref page.

#### Important!

ECB advices against using their rates for transaction purposes. From their site:«
The reference rates are published for information purposes only. Using the rates
for transaction purposes is strongly discouraged.»

The reference rates are usually updated by ECB at around 16:00 CET every working
day, except on [TARGET closing days](https://www.ecb.europa.eu/services/contacts/working-hours/html/index.en.html).

Go to the [ECB site](https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html)
for more information and disclaimers.

Also note that conversion from non-Euro to non-Euro is done through the Euro, so
GBP to USD is calculated as GBP → EUR → USD (converted 2 times).

This plugin is based on a plugin by [Xclamation](http://www.xclamationdesign.co.uk/free-currency-converter-shortcode-plugin-for-wordpress/).

Also see [wp_eurofxref on GitHub](https://github.com/joostdekeijzer/wp_eurofxref)
where development takes place.

### Shortcode usage & examples

#### currency_legal shortcode

This shortcode returns the string ‚* For informational purposes only. Exchange rates
may vary. Based on [ECB reference rates](https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/).‘

The prepended ‚* ‚ (the same string as the [currency] append string) can be changed
using the ‚prepend‘ attribute.

For example: `[currency_legal prepend='Please note: ']`

If you want to change the default prepent string for your whole site you can use
the default `shortcode_atts_currency_legal` filter.
 See the [shortcode_atts_{$shortcode} reference](https://developer.wordpress.org/reference/hooks/shortcode_atts_shortcode/)
for more information about this.

#### currency shortcode

Attributes:

 * `from`: currency code (default: EUR)
 * `to`: currency code (default: USD)
 * `amount`: number of «from» currency (default: 1)
 * `iso`: boolean (default false); use ISO currency formatting.»€ 1″ would become«
   1 EUR» in ISO notation.
 * `show_from`: boolean (default true); show from amount in output
 * `between`: string (default ‚&nbsp;/&nbsp;‘ which is displayed as ‚ / ‚ in the
   browser); string between from and to amounts
 * `append`: string (default ‚&nbsp;_‚ which is displayed as ‚ _‚ in the browser);
   string put after conversion. The * references the disclaimer text, see [currency_legal]
   shortcode.
 * `round: boolean` (default true); Round numbers to whole units.
 * `round_append`: string (default ‚=‘); replaces decimals
 * `no_from_show_rate`: boolean (default true); when from amount is hidden in the
   output the «to» text gets a tooltip that displays the exchange rate. The <span
   > element with this tooltip is styled with the `to_style` css string below. Set
   the `no_from_show_rate` option to false to disable the <span> and tooltip.
 * `to_style`: css string (default ‚cursor:help;border-bottom:1px dotted gray;‘);
   styling of «to» text <span> wrapper.

If you want to change the defaults for your whole site you can use the default `
shortcode_atts_currency` filter. See the [shortcode_atts_{$shortcode} reference](https://developer.wordpress.org/reference/hooks/shortcode_atts_shortcode/)
for more information about this.

#### Examples

 * `[currency amount="875" from="EUR" to="GBP"]`
    becomes «€ 875,= / £ 697.= *»
 * `[currency amount="875" from="GBP" to="USD" iso=true between=" converts to " 
   append="" round_append=""]`
    becomes «875 GBP converts to 1,418 USD»
 * `[currency amount="875" from="GBP" to="USD" show_from=false round=false]`
    becomes«
   $ 1,130.15 *»

### Static method usage & examples

#### `legal_string` method

The legal string can also be retrieved in PHP

_Usage_

    ```
    <?php echo EuroFxRef::legal_string( &#36;prepend ) ?>
    ```

_Parameters_

 * $prepend (string) The string to prepend the legal text with, default ‚* ‚

_Return Value_

(string) Legal text prepended with $prepend string.

#### `convert` method

Since v1.3, you can call the convertor staticly from PHP in your code.

_Usage_

    ```
    <?php EuroFxRef::convert( &#36;amount, &#36;from, &#36;to ); ?>
    ```

_Parameters_

 * $amount (float) The amount of currency you want to convert.
 * $from (string) The currency code the amount is in, default EUR.
 * $to (string) The currency code the amount must be converted to, default USD

_Return Value_

(float) the converted value or 0 (zero) if any of the currency code’s are not available.

#### Examples

 * `<?php &#36;process_later = EuroFxRef::convert( 10, 'USD', 'GBP' ); ?>`
    will
   return the raw numeric (float) value without formatting: `6.01877256317689468545495401485823094844818115234375`

### Currently available currencies

 * `AUD` – Australian dollar ($)
 * `BGN` – Bulgarian lev (лв.)
 * `BRL` – Brasilian real (R$)
 * `CAD` – Canadian dollar ($)
 * `CHF` – Swiss franc (CHF)
 * `CNY` – Chinese yuan (¥)
 * `CZK` – Czech koruna (Kč)
 * `DKK` – Danish krone (kr.)
 * `EUR` – Euro (€)
 * `GBP` – Pound sterling (£)
 * `HKD` – Hong Kong dollar ($)
 * `HUF` – Hungarian forint (Ft)
 * `IDR` – Indonesian rupiah (Rp)
 * `ILS` – Israeli new sheqel (₪)
 * `INR` – Indian rupee (₹)
 * `ISK` – Icelandic króna (kr.)
 * `JPY` – Japanese yen (¥)
 * `KRW` – South Korean won (₩)
 * `MXN` – Mexican peso ($)
 * `MYR` – Malaysian ringgit (RM)
 * `NOK` – Norwegian krone (kr)
 * `NZD` – New Zealand dollar ($)
 * `PHP` – Philippine peso (₱)
 * `PLN` – Polish złoty (zł)
 * `RON` – Romanian leu (lei)
 * `SEK` – Swedish krona (kr)
 * `SGD` – Singapore dollar ($)
 * `THB` – Thai baht (฿)
 * `TRY` – Turkish lira (₺)
 * `USD` – United States (US) dollar ($)
 * `ZAR` – South African rand (R)

LTL and LVL are not published any more at least since 2-jan-2020.
 RUB is not published
since 1-jun-2022 and HRK since 2-jan-2023.

## Installation

Installation is easiest through the WordPress «New Plugin» button and search for«
Euro FxRef Currency Converter».

But you can also manually:

 * Download the plugin
 * Uncompress it with your preferred unzip application
 * Copy the entire directory in your plugin directory of your WordPress blog (/wp-
   content/plugins)
 * Activate the plugin

## FAQ

Development takes place at [https://github.com/joostdekeijzer/wp_eurofxref](https://github.com/joostdekeijzer/wp_eurofxref)

### Where do the exchange rates come from?

The European Central Bank (ECB) daily publishes «foreign exchange reference rates»
against more than 30 other currencies. These rates are used by this plugin.

The rates are published for informational purposes only and exchange rates may vary.

See the [ECB site](https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/)
for more information.

### What styling options do I have?

When not showing the ‚from‘ value the converted amount is wrapped with a <span> 
with css styling that is configurable using the ‚to_style‘ attribute.

Since v2.0 of the plugin additionaly the following classes are available to style
using CSS:

 * ‚eurofxref-conversion-rate‘ to overrule the ‚to_style‘ attribute value of the`[
   currency]` shortcode.
 * ‚eurofxref-append-string‘ on a <span> wrapping the ‚ *‘ text of the `[currency]`
   shortcode.
 * ‚eurofxref-prepend-string‘ on a <span> wrapping the ‚* ‚ text of the `[currency_legal]`
   shortcode.

### What filters are available?

Since v2.0 the following filters are available:

 * ’shortcode_atts_currency‘ to modify the `[currency]` shortcode attributes.
 * ’shortcode_atts_currency_legal‘ to modify the `[currency_legal]` shortcode attributes.
 * ‚eurofxref_currency_symbols‘ to modify the currency symbols used in your site.
   The symbols are also run through the ‚woocommerce_currency_symbols‘ filter so
   you don’t need to use both.
 * ‚eurofxref_number_formats‘ to modify the currency number formatting used in your
   site.

## Reviews

![](https://secure.gravatar.com/avatar/465b70f34f4d6d9cac1365feb5803bce73f06f77a28bb8671378abf730566465?
s=60&d=retro&r=g)

### 󠀁[Amazing! Wow! Add converted currency in text](https://wordpress.org/support/topic/amazing-wow-add-converted-currency-in-text/)󠁿

 [roamingchile](https://profiles.wordpress.org/roamingchile/) 11. Februar 2021

Exactly what I needed for my client's tour website. The tour price is in euros but
many of the customers are British or American. Now we can give customers an idea
of the cost in their currencies. Thank you!

![](https://secure.gravatar.com/avatar/a85bc5afdc9ac3dd0a3b550eb91ab3dffd6959514a619042dd11021ba111b17e?
s=60&d=retro&r=g)

### 󠀁[Simple and efficient!](https://wordpress.org/support/topic/simple-and-efficient-172/)󠁿

 [herondino](https://profiles.wordpress.org/herondino/) 2. November 2017

Everything that we look for in a plugin. Congratulations!!

![](https://secure.gravatar.com/avatar/28e5df01ce35bd5580e00393857f5b4aa072850c4257a2dce9d34ff0a8b03f28?
s=60&d=retro&r=g)

### 󠀁[Fantastic, useful, easy to use](https://wordpress.org/support/topic/fantastic-useful-easy-to-use/)󠁿

 [a9fc](https://profiles.wordpress.org/a9fc/) 3. September 2016

Easiest way to add accurate and up to date converted amounts on your site

 [ Read all 6 reviews ](https://wordpress.org/support/plugin/euro-fxref-currency-converter/reviews/)

## Contributors & Developers

“Euro FxRef Currency Converter (by DKZR)” is open source software. The following
people have contributed to this plugin.

Contributors

 *   [ joost de keijzer ](https://profiles.wordpress.org/joostdekeijzer/)

[Translate “Euro FxRef Currency Converter (by DKZR)” into your language.](https://translate.wordpress.org/projects/wp-plugins/euro-fxref-currency-converter)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/euro-fxref-currency-converter/),
check out the [SVN repository](https://plugins.svn.wordpress.org/euro-fxref-currency-converter/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/euro-fxref-currency-converter/)
by [RSS](https://plugins.trac.wordpress.org/log/euro-fxref-currency-converter/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2.0.4

 * Modified attribute escaping from esc_html to wp_filter_post_kses so simple html
   is allowed

#### 2.0.3

 * Made all texts translatable
 * Escape (logged in) user shortcode attributes (CVE-2025-6257 kindly reported by
   Gilang via Wordfence)
 * Plugin icon!

#### 2.0.2

 * The plugin now tries to retrieve the new ECB rates around 17h00 CET. ECB updates
   their rates around 16h00 CET so updating an hour later should retreive the newest
   rates.

#### 2.0.1

 * Bugfix when `[currency_legal]` is called without attributes.

#### 2.0

 * Added `no_from_show_rate` shortcode attribute for the `[convert]` shortcode.
 * Added an option to hook into the default `shortcode_atts_{&#36;shortcode}` filter
   for both shortcodes. Those filters become ’shortcode_atts_currency‘ and ’shortcode_atts_currency_legal‘.
   Please see [shortcode_atts_{$shortcode} reference](https://developer.wordpress.org/reference/hooks/shortcode_atts_shortcode/)
   for more information.
 * Updated list of available currencies based on changes by the ECB (RUB and HRK
   where removed).
 * Refactor of currency symbols and number formats based on how WooCommerce does
   it.
 * Added filters to modify the currency symbols and the number formats: `eurofxref_currency_symbols`
   and `eurofxref_number_formats`.
 * The currency symbols are also run through the `woocommerce_currency_symbols` 
   filter so if you have WooCommerce you don’t need to use the `eurofxref_currency_symbols`
   filter.
 * Added styling options through classes for ‚eurofxref-prepend-string‘, ‚eurofxref-
   append-string‘ and ‚eurofxref-conversion-rate‘.

#### 1.5

 * ECB changed the currencies it publishes: ISK is published again but LTL and LVL
   were removed.

#### 1.4.2

 * Updated ECB url
 * Updated all links to https
 * Compatible with WordPress 5.3.2

#### 1.4.1

 * Updated PayPal donation link
 * Compatible with WordPress 5.2.3

#### 1.4

 * ECB seems to block requests from user-agent WordPress/, changed the user-agent
   string

#### 1.3

 * Rewrite, so now you can call the convertor staticly from PHP
 * Compatible with WordPress 3.9

#### 1.2.1

 * Compatible with WordPress 3.8

#### 1.2

 * bugfix where [currency_legal] default prepend «* » would not be added
 * updated plugin uri to new WordPress.org uri scheme
 * all currency symbols should be correct now (some in unicode)

#### 1.1

 * added help text to edit pages

#### 1.0

 * first public version

## Meta

 *  Version **2.0.4**
 *  Last updated **1 Monat ago**
 *  Active installations **100+**
 *  WordPress version ** 3.3 or higher **
 *  Tested up to **7.1.3**
 *  PHP version ** 7.0 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/euro-fxref-currency-converter/)
 * Tags
 * [converter](https://de-ch.wordpress.org/plugins/tags/converter/)[currency](https://de-ch.wordpress.org/plugins/tags/currency/)
   [foreign exchange conversion](https://de-ch.wordpress.org/plugins/tags/foreign-exchange-conversion/)
   [fx rate converter](https://de-ch.wordpress.org/plugins/tags/fx-rate-converter/)
   [shortcode](https://de-ch.wordpress.org/plugins/tags/shortcode/)
 *  [Advanced View](https://de-ch.wordpress.org/plugins/euro-fxref-currency-converter/advanced/)

## Ratings

 5 von 5 Sternen.

 *  [  6 5-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/euro-fxref-currency-converter/reviews/?filter=5)
 *  [  0 4-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/euro-fxref-currency-converter/reviews/?filter=4)
 *  [  0 3-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/euro-fxref-currency-converter/reviews/?filter=3)
 *  [  0 2-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/euro-fxref-currency-converter/reviews/?filter=2)
 *  [  0 1-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/euro-fxref-currency-converter/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/euro-fxref-currency-converter/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/euro-fxref-currency-converter/reviews/)

## Contributors

 *   [ joost de keijzer ](https://profiles.wordpress.org/joostdekeijzer/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/euro-fxref-currency-converter/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://bunq.me/jstdkzr?description=Open+Source+WordPress+plugin+support&amount=25)