WordPress plugin intelligence profile

Euro FxRef Currency Converter (by DKZR)

Adds the [currency] and [currency_legal] shortcodes to convert currencies based on the ECB reference exchange rates.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 7.1
Current version2.0.4
WordPress coverageTested up to WordPress 7.1
Minimum stackWP 3.3 · PHP 7.0
Directory statusactive
Last directory update20 Oct 202613d ago
Active installations100Adoption metric — not a quality score
WordPress.org rating5.0 / 5 from 6 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Euro FxRef Currency Converter (by DKZR) version 2.0.4 as active, updated 13d ago and tested up to WordPress 7.1.

Overview

About this plugin

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

The reference rates are usually updated by ECB at around 16:00 CET every working day, except on TARGET closing days.

Go to the ECB site 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.

Also see wp_eurofxref on GitHub where development takes place.

Shortcode usage & examples

currency_legal shortcode

This shortcode returns the string ‘* For informational purposes only. Exchange rates may vary. ’

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 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 ‘ / ’ which is displayed as ‘ / ‘ in the browser); string between from and to amounts
  • append: string (default ‘  ‘ 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 for more information about this.

Examples

  • [currency amount="875" from="EUR" to="GBP"]

= *”

  • [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]

15 *”

Static method usage & examples

`legal_string` method

The legal string can also be retrieved in PHP

Usage

>

Parameters

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

Return Value

(string) Legal text prepended with $prepend string.

`convert` method

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

Usage

>

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' );?>

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.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • foreign exchange conversion
  • fx rate converter
  • currency
  • shortcode
Compatibility & maintenance

Compatibility & maintenance

Tested with WP 7.1

Marked as tested with the current WordPress 7.1 release.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to7.1
Minimum requirementsWordPress 3.3 · PHP 7.0
Update activity20 Oct 202613d ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

WordPress compatibility7.17.1.3
Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.