WooCommerce Subscriptions Multi Currency: Fees, Trials, Renewals
A WooCommerce Subscriptions multi currency setup has more moving parts than a normal shop: the price string on the product page, the sign-up fee, the free trial, the first payment, and renewals that happen months later without the customer on the site. FOX has had a built-in compatibility layer for WooCommerce Subscriptions since version 2.4.3, switched on with one filter. Below: the decision to make first, what the compatibility does, how sign-up fees, trials and fixed prices interact, and the fixes for renewals, plan switches and duplicated "/ month" texts.
First decide which currency subscribers pay in
Is multiple allowed in the Advanced tab of WooCommerce → Settings → Currency decides it:
- No: visitors see converted prices, but every order is placed in the base currency. The subscription and all its renewals are in the base currency, so WooCommerce Subscriptions needs nothing special. The trade-offs of this mode are in show prices in local currency, charge in base currency.
- Yes: the customer pays in the selected currency, and the subscription is created in that currency. Its renewals must then be charged in the same currency, which is what the compatibility below takes care of. Every payment gateway you offer must be able to charge each currency, at checkout and for automatic renewals; see payment gateway does not support currency.
Turn on the WooCommerce Subscriptions compatibility
The compatibility is off by default. Switch it on with the woocs_init_compatibility_woo_subscriptions filter:
/*
* FOX: switch on the built-in WooCommerce Subscriptions compatibility.
* Child theme functions.php or a code snippets plugin.
*/
add_filter( 'woocs_init_compatibility_woo_subscriptions', '__return_true' );
FOX reads the filter when WordPress initialises, so it must be in functions.php or in a snippet that runs on every request, not inside a later hook. It loads only when WooCommerce Subscriptions is active. What it changes:
- Price strings of existing subscriptions (My account, emails) are shown in the subscription's own currency. FOX switches to that currency to display them, so a customer who opens their subscriptions keeps browsing in that currency.
- Renewal orders are built in the subscription's currency, not in whatever currency FOX happens to have when the scheduled renewal runs.
- Product page strings: the sign-up fee in the price text is converted at the current rate (without the compatibility it shows the base amount with the visitor's currency symbol, although the cart charges the right one), and the "From" price of variable subscriptions is taken from the cheapest variation in the visitor's currency.
- Renewals paid through the cart: the amount stored in the subscription's currency is converted back to the base currency before FOX converts it again, so it is not converted twice.
The WooCommerce Subscriptions compatibility page describes an older method that edits files inside WooCommerce Subscriptions. Use one method, not both: if those edits were applied, reinstall a clean copy of WooCommerce Subscriptions before switching the filter on.
Sign-up fees, free trials and fixed prices
WooCommerce Subscriptions calculates the first payment by changing the product price: it adds the sign-up fee to the price, or, during a free trial, uses the fee alone. FOX converts that amount afterwards. What happens next depends on whether the product has a fixed price in the visitor's currency.
| Product | Without fixed prices | With a fixed price in the currency |
|---|---|---|
| Recurring price | converted at the rate | the fixed price |
| Sign-up fee, no trial | price plus fee, converted together | the first payment is the fixed price; the fee is dropped |
| Free trial, no fee | nothing to pay today | nothing to pay today |
| Free trial with a sign-up fee | the fee, converted | the fixed recurring price is charged instead of the fee |
The reason is in how fixed prices work: FOX replaces the amount it receives with the fixed price, and the amount Subscriptions sends for the first payment is no longer the plain product price. There is also no fixed field for the sign-up fee itself. So for subscription products with a sign-up fee, leave the fixed price fields empty and let the rate convert price and fee together, or drop the fee. Fixed prices on subscriptions without a fee behave as on any other product; the rules are in WooCommerce fixed price per currency.
Converted amounts can be rounded with the usual FOX filters; see rounding converted prices. Rounding the recurring price also rounds the price-plus-fee sum of the first payment, not the two parts separately.
Renewals and failed payments
WooCommerce Subscriptions creates each renewal order from the amounts stored on the subscription, in the subscription's currency. A later change of the exchange rate or of a fixed price does not change existing subscriptions; it applies to new ones. With the compatibility on, FOX keeps the renewal in the subscription's currency, and the gateway charges that order as it is.
- Automatic renewals and retries charge the renewal order that already exists, so its amount and currency do not change between attempts.
- Manual renewals and paying a failed renewal go through the cart. That is where an amount already in the subscription's currency can be converted a second time if the compatibility is off or another plugin also adjusts renewal prices. A renewal of 113.99 dollars that asks for about 135 at checkout, the amount multiplied by the euro-to-dollar rate once more, is this case.
- Changing currency: a subscription keeps the currency it was bought in. A customer who wants another currency needs a new subscription.
Test these flows on a staging copy before relying on them, with only WooCommerce, WooCommerce Subscriptions, FOX and your gateway active: a new subscription in a second currency, an automatic renewal (Process renewal in the subscription's actions), a manual renewal and the payment of a failed renewal. Compare the order totals with the subscription.
Upgrades, downgrades and amounts in the admin
When a customer switches to another plan, WooCommerce Subscriptions prorates: it compares what was paid for the current period with the price of the new plan. The amount paid is stored in the subscription's currency, while the calculation expects the base currency, so a customer who paid 524 PLN can be credited as if they had paid 524 EUR. A related symptom is in the admin: subscription amounts in another currency are shown with the base currency symbol, because FOX returns the symbol of its current currency for every amount. Two filters fix both:
/*
* FOX + WooCommerce Subscriptions: correct symbols for amounts in other
* currencies, and base-currency amounts for plan switch proration.
* Child theme functions.php or a code snippets plugin.
*/
add_filter( 'woocommerce_currency_symbol', function ( $symbol, $currency ) {
global $WOOCS;
if ( empty( $currency ) || ! isset( $WOOCS ) ) {
return $symbol;
}
$currencies = $WOOCS->get_currencies();
// An amount in a specific currency gets that currency's symbol.
if ( $currency !== $WOOCS->current_currency && isset( $currencies[ $currency ]['symbol'] ) ) {
return $currencies[ $currency ]['symbol'];
}
return $symbol;
}, 10000, 2 ); // after FOX, which uses priority 9999
add_filter( 'wcs_switch_total_paid_for_current_period', function ( $total_paid, $subscription ) {
global $WOOCS;
if ( ! isset( $WOOCS ) || ! $WOOCS->is_multiple_allowed ) {
return $total_paid;
}
$currency = $subscription->get_currency();
$currencies = $WOOCS->get_currencies();
if ( $currency === $WOOCS->default_currency || empty( $currencies[ $currency ]['rate'] ) ) {
return $total_paid;
}
// Amount paid in the subscription currency, back to the base currency.
return $total_paid / $currencies[ $currency ]['rate'];
}, 10, 2 );
The second filter uses today's rate, not the rate of the original payment, so a credit can differ slightly from the amount paid when rates moved. When you test proration, do not change subscription dates by hand: the start date cannot be edited and the calculation then gives misleading results.
A repeated "/ month" after the price
On some themes the period text appears twice, for example 9.99 / month / month. It happens most often with I am using cache plugin on my site on: FOX redraws the price after the page loads, the new price HTML from the server already contains the period text, and the period text of the cached page stays next to it. Hide the second copy with CSS (Appearance → Customize → Additional CSS):
/* WooCommerce Subscriptions: hide the repeated period text */
.price .subscription-details:nth-child(2) {
display: none;
}
Add it only if the text is actually duplicated, and purge the cache afterwards. If a theme uses a different price template, inspect the two elements in the browser and adjust the selector. Why the redraw happens at all is explained in currency switcher resets to default currency.
Other subscription plugins and a final test
The built-in compatibility covers WooCommerce Subscriptions only. Other subscription plugins calculate recurring totals, fees and trials in their own code; these pages describe the adaptations we know of:
- YITH WooCommerce Subscription Premium
- SUMO Subscriptions
- Subscriptio by RightPress
- All Products for WooCommerce Subscriptions
For any subscription plugin, check these before going live:
- Product page, cart and checkout show the same first payment and recurring total in a second currency.
- Sign-up fee and trial behave the same in every currency.
- The subscription and its first renewal order have the currency the customer paid in, and the gateway charged the renewal in it.
- A manual renewal and a failed-renewal payment ask for the same amount as the subscription.
- A cart total that is far too high in a second currency points to a double conversion: see double currency conversion in the cart.
If amounts still do not match, open a topic on the FOX support forum with your subscription plugin and its version, the product settings and the amounts you expected and got, and we will look at it.