To convert currency in your product feed, Product XML Feeds Manager for WooCommerce gives every price shortcode a set of currency attributes. You can pull a live daily rate from the European Central Bank, or set your own fixed rate, so the price you send a marketplace is in the currency that marketplace expects.
Where this runs #
Currency conversion is done with shortcode attributes inside your feed template, under WPFactory > Product XML Feeds (also reachable at WooCommerce > Settings > Product XML Feeds), in the Template Options of the feed you are editing. It works on any shortcode that outputs a numeric value, such as [alg_product_price].
The currency attributes #
| Attribute | Default | What it does |
|---|---|---|
convert_currency_from |
empty | Source currency code, for example USD. Usually your store currency. |
convert_currency_to |
empty | Target currency code, for example EUR. |
convert_currency_precision |
2 |
Decimal places the converted amount is rounded to. |
exchange_rate |
0 |
A fixed rate. When set to a non-zero value, it is used instead of the live rate. |
Note: conversion only happens when the shortcode result is a number and both convert_currency_from and convert_currency_to are set. On a non-numeric value the attributes are ignored.
Option 1: live rate from the European Central Bank #
Set the two currency codes and leave exchange_rate off. The plugin fetches the daily reference rates from the European Central Bank and converts using them:
[alg_product_price convert_currency_from="USD" convert_currency_to="EUR"]
This is the one external connection the plugin makes. It reads the public ECB daily rates file. Rates are cached during feed generation, and the ECB publishes rates on working days, so a weekend feed uses the most recent published rate.
Option 2: a fixed rate you control #
If you would rather lock a rate, set exchange_rate to the multiplier you want. Here the price is multiplied by 0.92 and no external call is made:
[alg_product_price convert_currency_from="USD" convert_currency_to="EUR" exchange_rate="0.92" convert_currency_precision="2"]
Show the currency code in the feed #
To append the store currency code after a value, use the append_currency attribute (covered in the Global Shortcode Attributes Reference). Note it appends the store currency, so combine it thoughtfully with a converted amount.
Related articles #
Get more from your feeds #
Currency conversion ships free with Product XML Feeds Manager for WooCommerce. Pro adds multiple feeds and per-feed filtering, so you can send each marketplace its own currency and product set. See what Pro unlocks.