Contents
On this page

Multi-currency - Plugixa PDF Vouchers for WooCommerce

A voucher always keeps the currency it was sold in: its value, balance, history and PDF stay in that currency. With Pro and a multi-currency plugin, a customer can still spend it while shopping in another currency: the voucher is converted at checkout.

Without a rate, a voucher only pays in its own currency, and the customer sees This voucher can only be used when paying in followed by the voucher’s currency.

Supported multi-currency plugins

Pro reads the exchange rates of the multi-currency plugin your store runs. Nothing to set up: install one of these and the conversion works.

Plugin Rate used
Plugixa Multi-Currency The currency’s rate plus its percentage margin, the same factor its storefront prices use.
WPML WooCommerce Multilingual (WCML) Its own price conversion.
CURCY (WooCommerce Multi Currency by VillaTheme) Its own price conversion.
FOX Currency Switcher (WOOCS) The rate set for each currency.
Aelia Currency Switcher Its direct conversion between the two currencies.

How the conversion works

Example: a 50 EUR gift card, spent by a customer shopping in USD at a rate of 1.08.

  1. In the cart, the voucher offers its available balance converted into the shopping currency, rounded down: up to 54.00 USD. A converted voucher never offers more than it holds.
  2. When the order is placed, the rate is saved on the order. Paying later, even after the rate moves, never re-prices the voucher.
  3. What leaves the voucher is converted back into EUR at that saved rate. A voucher spent in full lands on exactly zero, with no rounding crumb left over.

The history of the voucher shows the amounts in its own currency, EUR here.

Your multi-currency plugin converts regular fixed coupons from your base currency. The plugin makes sure a voucher is converted once only, from its own currency, whatever the order the plugins run in.

Top-ups are converted the same way: a top-up paid in USD adds the EUR equivalent to a EUR gift card.

Another multi-currency plugin

Developers can supply rates for any other plugin with one of two filters:

// Units of $code per one unit of the store's base currency.
add_filter( 'plugixa_pdfv_currency_factor', function ( $factor, $code ) {
    return my_switcher_rate( $code ); // null when unknown
}, 10, 2 );

// Or the direct rate between two currencies.
add_filter( 'plugixa_pdfv_exchange_rate', function ( $rate, $from, $to ) {
    return $rate; // units of $to for one unit of $from, or null
}, 10, 3 );

See Hooks.

Quick Links

Share