Euro FxRef Currency Converter (by DKZR)
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
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 .
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. Based on ECB reference 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 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.