{"id":20115,"date":"2012-10-01T15:57:23","date_gmt":"2012-10-01T15:57:23","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/euro-fxref-currency-converter\/"},"modified":"2025-12-03T08:50:55","modified_gmt":"2025-12-03T08:50:55","slug":"euro-fxref-currency-converter","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/euro-fxref-currency-converter\/","author":9423671,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.0.4","stable_tag":"2.0.4","tested":"6.9.4","requires":"3.3","requires_php":"7.0","requires_plugins":null,"header_name":"Euro FxRef Currency Converter (by DKZR)","header_author":"Joost de Keijzer","header_description":"","assets_banners_color":"","last_updated":"2025-12-03 08:50:55","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_donations&business=j@dkzr.nl&item_name=eurofxref+WordPress+plugin&item_number=Joost+de+Keijzer&currency_code=EUR&amount=10","header_plugin_uri":"https:\/\/dkzr.nl\/","header_author_uri":"https:\/\/dkzr.nl\/","rating":5,"author_block_rating":0,"active_installs":200,"downloads":11483,"num_ratings":6,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"joostdekeijzer","date":"2012-10-01 16:03:25"},"1.1":{"tag":"1.1","author":"joostdekeijzer","date":"2012-10-09 16:36:57"},"1.2":{"tag":"1.2","author":"joostdekeijzer","date":"2013-07-30 20:54:33"},"1.2.1":{"tag":"1.2.1","author":"joostdekeijzer","date":"2013-12-12 16:09:59"},"1.3":{"tag":"1.3","author":"joostdekeijzer","date":"2016-11-05 12:33:58"},"1.4":{"tag":"1.4","author":"joostdekeijzer","date":"2017-05-17 09:42:19"},"1.4.1":{"tag":"1.4.1","author":"joostdekeijzer","date":"2019-09-19 13:31:28"},"1.4.2":{"tag":"1.4.2","author":"joostdekeijzer","date":"2020-01-13 12:55:18"},"1.5":{"tag":"1.5","author":"joostdekeijzer","date":"2020-11-24 14:58:13"},"1.5.2":{"tag":"1.5.2","author":"joostdekeijzer","date":"2023-05-08 19:43:04"},"2.0":{"tag":"2.0","author":"joostdekeijzer","date":"2023-05-10 14:45:44"},"2.0.1":{"tag":"2.0.1","author":"joostdekeijzer","date":"2023-05-10 15:06:39"},"2.0.2":{"tag":"2.0.2","author":"joostdekeijzer","date":"2025-06-19 07:08:49"},"2.0.3":{"tag":"2.0.3","author":"joostdekeijzer","date":"2025-06-19 11:48:44"},"2.0.4":{"tag":"2.0.4","author":"joostdekeijzer","date":"2025-12-03 08:50:55"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"6"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3314337,"resolution":"128x128","location":"assets","locale":""},"icon-512x512.png":{"filename":"icon-512x512.png","revision":3306578,"resolution":"512x512","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2","1.2.1","1.3","1.4","1.4.1","1.4.2","1.5","1.5.2","2.0","2.0.1","2.0.2","2.0.3","2.0.4"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[5520,8504,21288,21289,80],"plugin_category":[43,45,59],"plugin_contributors":[83861],"plugin_business_model":[],"class_list":["post-20115","plugin","type-plugin","status-publish","hentry","plugin_tags-converter","plugin_tags-currency","plugin_tags-foreign-exchange-conversion","plugin_tags-fx-rate-converter","plugin_tags-shortcode","plugin_category-customization","plugin_category-ecommerce","plugin_category-utilities-and-tools","plugin_contributors-joostdekeijzer","plugin_committers-joostdekeijzer"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/euro-fxref-currency-converter\/assets\/icon-128x128.png?rev=3314337","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Using the <code>[currency]<\/code> 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.<\/p>\n\n<p>The <code>[currency_legal]<\/code> shortcode outputs a disclaimer text and a link to the ECB eurofxref page.<\/p>\n\n<h4>Important!<\/h4>\n\n<p>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.\"<\/p>\n\n<p>The reference rates are usually updated by ECB at around 16:00 CET every working day, except on <a href=\"https:\/\/www.ecb.europa.eu\/services\/contacts\/working-hours\/html\/index.en.html\">TARGET closing days<\/a>.<\/p>\n\n<p>Go to the <a href=\"https:\/\/www.ecb.europa.eu\/stats\/policy_and_exchange_rates\/euro_reference_exchange_rates\/html\/index.en.html\">ECB site<\/a> for more information and disclaimers.<\/p>\n\n<p>Also note that conversion from non-Euro to non-Euro is done through the Euro, so GBP to USD is calculated as GBP &rarr; EUR &rarr; USD (converted 2 times).<\/p>\n\n<p>This plugin is based on a plugin by <a href=\"http:\/\/www.xclamationdesign.co.uk\/free-currency-converter-shortcode-plugin-for-wordpress\/\">Xclamation<\/a>.<\/p>\n\n<p>Also see <a href=\"https:\/\/github.com\/joostdekeijzer\/wp_eurofxref\">wp_eurofxref on GitHub<\/a> where development takes place.<\/p>\n\n<h3>Shortcode usage &amp; examples<\/h3>\n\n<h4>currency_legal shortcode<\/h4>\n\n<p>This shortcode returns the string '* For informational purposes only. Exchange rates may vary. Based on <a href=\"https:\/\/www.ecb.europa.eu\/stats\/policy_and_exchange_rates\/euro_reference_exchange_rates\/\">ECB reference rates<\/a>.'<\/p>\n\n<p>The prepended '* ' (the same string as the [currency] append string) can be changed using the 'prepend' attribute.<\/p>\n\n<p>For example: <code>[currency_legal prepend='Please note: ']<\/code><\/p>\n\n<p>If you want to change the default prepent string for your whole site you can use the default <code>shortcode_atts_currency_legal<\/code> filter.\nSee the <a href=\"http:\/\/developer.wordpress.org\/reference\/hooks\/shortcode_atts_shortcode\/\">shortcode_atts_{&#036;shortcode} reference<\/a> for more information about this.<\/p>\n\n<h4>currency shortcode<\/h4>\n\n<p>Attributes:<\/p>\n\n<ul>\n<li><code>from<\/code>: currency code (default: EUR)<\/li>\n<li><code>to<\/code>: currency code (default: USD)<\/li>\n<li><code>amount<\/code>: number of \"from\" currency (default: 1)<\/li>\n<li><code>iso<\/code>: boolean (default false); use ISO currency formatting.\"\u20ac 1\" would become \"1 EUR\" in ISO notation.<\/li>\n<li><code>show_from<\/code>: boolean (default true); show from amount in output<\/li>\n<li><code>between<\/code>: string (default '&amp;nbsp;\/&amp;nbsp;' which is displayed as '&nbsp;\/&nbsp;' in the browser); string between from and to amounts<\/li>\n<li><code>append<\/code>: string (default '&amp;nbsp;<em>' which is displayed as '&nbsp;<\/em>' in the browser); string put after conversion. The * references the disclaimer text, see [currency_legal] shortcode.<\/li>\n<li><code>round: boolean<\/code> (default true); Round numbers to whole units.<\/li>\n<li><code>round_append<\/code>: string (default '='); replaces decimals<\/li>\n<li><code>no_from_show_rate<\/code>: boolean (default true); when from amount is hidden in the output the \"to\" text gets a tooltip that displays the exchange rate. The &lt;span&gt; element with this tooltip is styled with the <code>to_style<\/code> css string below. Set the <code>no_from_show_rate<\/code> option to false to disable the &lt;span&gt; and tooltip.<\/li>\n<li><code>to_style<\/code>: css string (default 'cursor:help;border-bottom:1px dotted gray;'); styling of \"to\" text &lt;span&gt; wrapper.<\/li>\n<\/ul>\n\n<p>If you want to change the defaults for your whole site you can use the default <code>shortcode_atts_currency<\/code> filter. See the <a href=\"http:\/\/developer.wordpress.org\/reference\/hooks\/shortcode_atts_shortcode\/\">shortcode_atts_{&#036;shortcode} reference<\/a> for more information about this.<\/p>\n\n<h4>Examples<\/h4>\n\n<ul>\n<li><code>[currency amount=\"875\" from=\"EUR\" to=\"GBP\"]<\/code> \nbecomes \"\u20ac\u00a0875,=\u00a0\/\u00a0\u00a3\u00a0697.=\u00a0*\"<\/li>\n<li><code>[currency amount=\"875\" from=\"GBP\" to=\"USD\" iso=true\u00a0between=\" converts to \"\u00a0append=\"\" round_append=\"\"]<\/code> \nbecomes \"875\u00a0GBP converts to 1,418\u00a0USD\"<\/li>\n<li><code>[currency amount=\"875\" from=\"GBP\" to=\"USD\" show_from=false round=false]<\/code> \nbecomes \"&#036;\u00a01,130.15\u00a0*\"<\/li>\n<\/ul>\n\n<h3>Static method usage &amp; examples<\/h3>\n\n<h4>`legal_string` method<\/h4>\n\n<p>The legal string can also be retrieved in PHP<\/p>\n\n<p><em>Usage<\/em><\/p>\n\n<pre><code>&lt;?php echo EuroFxRef::legal_string( &amp;#36;prepend ) ?&gt;\n<\/code><\/pre>\n\n<p><em>Parameters<\/em><\/p>\n\n<ul>\n<li>&#036;prepend (string) The string to prepend the legal text with, default '* '<\/li>\n<\/ul>\n\n<p><em>Return Value<\/em><\/p>\n\n<p>(string) Legal text prepended with &#036;prepend string.<\/p>\n\n<h4>`convert` method<\/h4>\n\n<p>Since v1.3, you can call the convertor staticly from PHP in your code.<\/p>\n\n<p><em>Usage<\/em><\/p>\n\n<pre><code>&lt;?php EuroFxRef::convert( &amp;#36;amount, &amp;#36;from, &amp;#36;to ); ?&gt;\n<\/code><\/pre>\n\n<p><em>Parameters<\/em><\/p>\n\n<ul>\n<li>&#036;amount (float) The amount of currency you want to convert.<\/li>\n<li>&#036;from (string) The currency code the amount is in, default EUR.<\/li>\n<li>&#036;to (string) The currency code the amount must be converted to, default USD<\/li>\n<\/ul>\n\n<p><em>Return Value<\/em><\/p>\n\n<p>(float) the converted value or 0 (zero) if any of the currency code's are not available.<\/p>\n\n<h4>Examples<\/h4>\n\n<ul>\n<li><code>&lt;?php &amp;#36;process_later = EuroFxRef::convert( 10, 'USD', 'GBP' ); ?&gt;<\/code>\nwill return the raw numeric (float) value without formatting: <code>6.01877256317689468545495401485823094844818115234375<\/code><\/li>\n<\/ul>\n\n<h3>Currently available currencies<\/h3>\n\n<ul>\n<li><code>AUD<\/code> - Australian dollar (&#036;)<\/li>\n<li><code>BGN<\/code> - Bulgarian lev (&#1083;&#1074;.)<\/li>\n<li><code>BRL<\/code> - Brasilian real (&#082;&#036;)<\/li>\n<li><code>CAD<\/code> - Canadian dollar (&#036;)<\/li>\n<li><code>CHF<\/code> - Swiss franc (&#067;&#072;&#070;)<\/li>\n<li><code>CNY<\/code> - Chinese yuan (&yen;)<\/li>\n<li><code>CZK<\/code> - Czech koruna (&#075;&#269;)<\/li>\n<li><code>DKK<\/code> - Danish krone (kr.)<\/li>\n<li><code>EUR<\/code> - Euro (&euro;)<\/li>\n<li><code>GBP<\/code> - Pound sterling (&pound;)<\/li>\n<li><code>HKD<\/code> - Hong Kong dollar (&#036;)<\/li>\n<li><code>HUF<\/code> - Hungarian forint (&#070;&#116;)<\/li>\n<li><code>IDR<\/code> - Indonesian rupiah (Rp)<\/li>\n<li><code>ILS<\/code> - Israeli new sheqel (&#8362;)<\/li>\n<li><code>INR<\/code> - Indian rupee (&#8377;)<\/li>\n<li><code>ISK<\/code> - Icelandic kr\u00f3na (kr.)<\/li>\n<li><code>JPY<\/code> - Japanese yen (&yen;)<\/li>\n<li><code>KRW<\/code> - South Korean won (&#8361;)<\/li>\n<li><code>MXN<\/code> - Mexican peso (&#036;)<\/li>\n<li><code>MYR<\/code> - Malaysian ringgit (&#082;&#077;)<\/li>\n<li><code>NOK<\/code> - Norwegian krone (&#107;&#114;)<\/li>\n<li><code>NZD<\/code> - New Zealand dollar (&#036;)<\/li>\n<li><code>PHP<\/code> - Philippine peso (&#8369;)<\/li>\n<li><code>PLN<\/code> - Polish z\u0142oty (&#122;&#322;)<\/li>\n<li><code>RON<\/code> - Romanian leu (lei)<\/li>\n<li><code>SEK<\/code> - Swedish krona (&#107;&#114;)<\/li>\n<li><code>SGD<\/code> - Singapore dollar (&#036;)<\/li>\n<li><code>THB<\/code> - Thai baht (&#3647;)<\/li>\n<li><code>TRY<\/code> - Turkish lira (&#8378;)<\/li>\n<li><code>USD<\/code> - United States (US) dollar (&#036;)<\/li>\n<li><code>ZAR<\/code> - South African rand (&#082;)<\/li>\n<\/ul>\n\n<p>LTL and LVL are not published any more at least since 2-jan-2020.<br \/>\nRUB is not published since 1-jun-2022 and HRK since 2-jan-2023.<\/p>\n\n<!--section=installation-->\n<p>Installation is easiest through the WordPress \"New Plugin\" button and search for \"Euro FxRef Currency Converter\".<\/p>\n\n<p>But you can also manually:<\/p>\n\n<ul>\n<li>Download the plugin<\/li>\n<li>Uncompress it with your preferred unzip application<\/li>\n<li>Copy the entire directory in your plugin directory of your WordPress blog (\/wp-content\/plugins)<\/li>\n<li>Activate the plugin<\/li>\n<\/ul>\n\n<!--section=faq-->\n<p>Development takes place at <a href=\"https:\/\/github.com\/joostdekeijzer\/wp_eurofxref\">https:\/\/github.com\/joostdekeijzer\/wp_eurofxref<\/a><\/p>\n<dl>\n<dt id='where%20do%20the%20exchange%20rates%20come%20from%3F'><h3>Where do the exchange rates come from?<\/h3><\/dt>\n<dd><p>The European Central Bank (ECB) daily publishes \"foreign exchange reference rates\" against more than 30 other currencies. These rates are used by this plugin.<\/p>\n\n<p>The rates are published for informational purposes only and exchange rates may vary.<\/p>\n\n<p>See the <a href=\"https:\/\/www.ecb.europa.eu\/stats\/policy_and_exchange_rates\/euro_reference_exchange_rates\/\">ECB site<\/a> for more information.<\/p><\/dd>\n<dt id='what%20styling%20options%20do%20i%20have%3F'><h3>What styling options do I have?<\/h3><\/dt>\n<dd><p>When not showing the 'from' value the converted amount is wrapped with a &lt;span&gt; with css styling that is configurable using the 'to_style' attribute.<\/p>\n\n<p>Since v2.0 of the plugin additionaly the following classes are available to style using CSS:<\/p>\n\n<ul>\n<li>'eurofxref-conversion-rate' to overrule the 'to_style' attribute value of the <code>[currency]<\/code> shortcode.<\/li>\n<li>'eurofxref-append-string' on a &lt;span&gt; wrapping the ' *' text of the <code>[currency]<\/code> shortcode.<\/li>\n<li>'eurofxref-prepend-string' on a &lt;span&gt; wrapping the '* ' text of the <code>[currency_legal]<\/code> shortcode.<\/li>\n<\/ul><\/dd>\n<dt id='what%20filters%20are%20available%3F'><h3>What filters are available?<\/h3><\/dt>\n<dd><p>Since v2.0 the following filters are available:<\/p>\n\n<ul>\n<li>'shortcode_atts_currency' to modify the <code>[currency]<\/code> shortcode attributes.<\/li>\n<li>'shortcode_atts_currency_legal' to modify the <code>[currency_legal]<\/code> shortcode attributes.<\/li>\n<li>'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.<\/li>\n<li>'eurofxref_number_formats' to modify the currency number formatting used in your site.<\/li>\n<\/ul><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0.4<\/h4>\n\n<ul>\n<li>Modified attribute escaping from esc_html to wp_filter_post_kses so simple html is allowed<\/li>\n<\/ul>\n\n<h4>2.0.3<\/h4>\n\n<ul>\n<li>Made all texts translatable<\/li>\n<li>Escape (logged in) user shortcode attributes (CVE-2025-6257 kindly reported by Gilang via Wordfence)<\/li>\n<li>Plugin icon!<\/li>\n<\/ul>\n\n<h4>2.0.2<\/h4>\n\n<ul>\n<li>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.<\/li>\n<\/ul>\n\n<h4>2.0.1<\/h4>\n\n<ul>\n<li>Bugfix when <code>[currency_legal]<\/code> is called without attributes.<\/li>\n<\/ul>\n\n<h4>2.0<\/h4>\n\n<ul>\n<li>Added <code>no_from_show_rate<\/code> shortcode attribute for the <code>[convert]<\/code> shortcode.<\/li>\n<li>Added an option to hook into the default <code>shortcode_atts_{&amp;#36;shortcode}<\/code> filter for both shortcodes. Those filters become 'shortcode_atts_currency' and 'shortcode_atts_currency_legal'. Please see <a href=\"http:\/\/developer.wordpress.org\/reference\/hooks\/shortcode_atts_shortcode\/\">shortcode_atts_{&#036;shortcode} reference<\/a> for more information.<\/li>\n<li>Updated list of available currencies based on changes by the ECB (RUB and HRK where removed).<\/li>\n<li>Refactor of currency symbols and number formats based on how WooCommerce does it.<\/li>\n<li>Added filters to modify the currency symbols and the number formats: <code>eurofxref_currency_symbols<\/code> and <code>eurofxref_number_formats<\/code>.<\/li>\n<li>The currency symbols are also run through the <code>woocommerce_currency_symbols<\/code> filter so if you have WooCommerce you don't need to use the <code>eurofxref_currency_symbols<\/code> filter.<\/li>\n<li>Added styling options through classes for 'eurofxref-prepend-string', 'eurofxref-append-string' and 'eurofxref-conversion-rate'.<\/li>\n<\/ul>\n\n<h4>1.5<\/h4>\n\n<ul>\n<li>ECB changed the currencies it publishes: ISK is published again but LTL and LVL were removed.<\/li>\n<\/ul>\n\n<h4>1.4.2<\/h4>\n\n<ul>\n<li>Updated ECB url<\/li>\n<li>Updated all links to https<\/li>\n<li>Compatible with WordPress 5.3.2<\/li>\n<\/ul>\n\n<h4>1.4.1<\/h4>\n\n<ul>\n<li>Updated PayPal donation link<\/li>\n<li>Compatible with WordPress 5.2.3<\/li>\n<\/ul>\n\n<h4>1.4<\/h4>\n\n<ul>\n<li>ECB seems to block requests from user-agent WordPress\/, changed the user-agent string<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Rewrite, so now you can call the convertor staticly from PHP<\/li>\n<li>Compatible with WordPress 3.9<\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Compatible with WordPress 3.8<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>bugfix where [currency_legal] default prepend \"* \" would not be added<\/li>\n<li>updated plugin uri to new WordPress.org uri scheme<\/li>\n<li>all currency symbols should be correct now (some in unicode)<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>added help text to edit pages<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>first public version<\/li>\n<\/ul>","raw_excerpt":"Adds the [currency] and [currency_legal] shortcodes to convert currencies based on the ECB reference exchange rates.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/20115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=20115"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/joostdekeijzer"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=20115"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=20115"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=20115"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=20115"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=20115"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=20115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}