FOX - WooCommerce Currency Switcher Professional

Currency Switcher Not Changing Prices? Diagnose It Step by Step

A currency switcher not changing prices looks like one of two things: you pick another currency and nothing happens, or the currency symbol changes while the amount stays the base-currency number. FOX converts a price at the moment WooCommerce builds it, so when an amount does not change, either the currency was never switched or that amount did not come through WooCommerce's price functions. The checks below go from the quickest to the most involved.

Why a currency switcher is not changing some prices

When a visitor picks a currency, FOX stores it and the page is rebuilt in that currency. With Is multiple allowed = Yes (the default of a new installation), FOX filters the product's price getters (get_price(), get_regular_price(), get_sale_price() and the variation prices), so every price WooCommerce reads from a product is converted. With No, it converts amounts when they are formatted by wc_price(). In both modes, a price printed by the product's get_price_html() is also wrapped in a <span class="woocs_price_code">, which is how FOX finds and redraws prices on cached pages.

The currency symbol comes from a different place: WooCommerce asks for the current currency's symbol whenever it formats an amount. That is why the symbol can switch while the number does not. Any amount read straight from the database, calculated by another plugin or rewritten later by a script gets the new symbol and keeps the old number.

Step 1: is the currency switching at all?

  • The switcher is not FOX. Currency menus built into themes, header flag banners and page-builder currency widgets are separate code; they may change a symbol or a cookie that FOX never reads. Remove them and use the FOX switcher: the widget, the [woocs] shortcode, or the side switcher.
  • The page reloads and the old currency comes back. Then the selection is lost or undone: a page cache, the currency storage, or code that calls $WOOCS->set_currency() or reset_currency() on every page, often left over from an old "force one currency" snippet. Currency resets to default on page change goes through each cause.
  • Every currency shows the same symbol. If amounts do change but all currencies carry the same sign, the Symbol column in the Currencies tab is the problem, not the conversion; see how to change the currency symbol.

Step 2: check the currency row

Open the Currencies tab and look at the currency that does not convert:

  • Rate. A rate of 1 converts 100 into 100: only the symbol changes. A rate of 0 or an empty rate gives zero or empty prices. Update the rate, or fix the aggregator as described in exchange rates not updating.
  • Code. Use the ISO 4217 code (THB, EUR) and type it by hand. A code pasted from a web page can carry an invisible character; FOX then does not find the currency, and every switch falls back to the base currency. Deleting the code and retyping it is the whole fix in that case.

If you changed the base currency recently, check every rate again: they are all relative to the base currency, and the base currency itself must have the rate 1.

Step 3: find out who prints the price

Switch to the currency that fails, open the browser's developer tools (F12) and paste this into the console:

document.querySelectorAll('.woocs_price_code').forEach(function (el) {
    el.style.outline = '2px solid red';
});

Every price that WooCommerce printed through the product's price HTML gets a red frame. A price without a frame was printed by other code: the theme, a page builder widget or another plugin. That tells you where to look next.

The price has no frame: theme templates and custom code

The most common case is a template that reads the price meta field directly, for example echo wc_price( get_post_meta( $id, '_price', true ) );. That reads the stored base-currency number past the product object: with Is multiple allowed = Yes it is never converted, and in either mode it has no frame, so it is not redrawn on cached pages. Replace it with the product's own price output:

<?php
/*
 * In the theme template that prints the price (copy it to a child theme first).
 * Instead of: echo wc_price( get_post_meta( $id, '_price', true ) );
 */
$product = wc_get_product( $id );
if ( $product ) {
    echo $product->get_price_html(); // converted, formatted, redrawn on cached pages
}

// For an amount that is not a product price, stored in the base currency:
echo do_shortcode( '[woocs_show_custom_price value="' . esc_attr( $amount ) . '"]' );
?>

The [woocs_show_custom_price] shortcode converts and formats a base-currency amount in both modes. For calculations in PHP, $WOOCS->woocs_exchange_value() returns the converted number. Older theme code that builds prices from properties such as $product->max_variation_price has the same problem; the single page price troubles FAQ shows the correct output for single product pages.

The price has no frame: another plugin calculates it

Event and booking plugins, product option and extra field plugins, promotion and discount plugins often calculate a price from the base-currency values themselves and print the result. If only those products, or only the variation price after choosing options, keep the base amount, deactivate the plugin on a staging copy and test again. Many such plugins already have ready adaptation code in the compatibility list on FOX Labs.

The price has a frame but shows the base amount

Then the price was converted on the server and changed afterwards in the browser, or the page came from a cache:

  • Page cache. A cached page carries the prices of whoever loaded it first. Turn on I am using cache plugin on my site in the Options tab, so FOX redraws the framed prices after the page loads, then purge every cache. How this works and which cookies to exclude is in why a currency switcher and a page cache fight each other.
  • Delayed or combined JavaScript. If optimization delays the FOX scripts, the redraw never runs; see currency switcher stuck loading.
  • A script rewrites the price. Variation swatches, quick views, sticky add-to-cart bars and custom scripts sometimes copy a price they stored when the page was built, or recalculate it in JavaScript. Compare the page source (Ctrl+U) with what you see: a correct price in the source and a wrong one on screen points to a script.

Step 4: two converters on one site

Only one plugin may convert prices. A second converter fights FOX: one changes the symbol, the other the amount, or both convert and prices come out doubled or reset. Typical second converters are the multi-currency feature of WooPayments (FOX shows a notice about it on the WooCommerce settings pages), WPML's WooCommerce Multilingual multi-currency, currency modules of page builders and theme add-ons such as ShopEngine Pro, and a previously used currency plugin that is still active. Switch the other one off, keep FOX, and set your currencies there.

Isolate the cause

When none of the checks above points to the culprit, test on a staging copy:

  1. Switch to a default theme such as Storefront and deactivate every plugin except WooCommerce and FOX.
  2. Switch currency on the shop, a product and the cart. If prices convert now, the cause is in what you turned off.
  3. Bring back the theme first, then the plugins one by one, testing after each, until prices stop converting.

The currency recounts wrong FAQ shows a real theme function found this way.

Checklist

  • The switcher on the page is the FOX widget, shortcode or side switcher.
  • The selected currency stays selected after the page reloads.
  • The currency has a real rate (not 0, not 1) and a retyped ISO code.
  • The failing price has the red frame from the console check, or its template now uses get_price_html().
  • No second currency converter is active; caches purged and FOX scripts not delayed.

If prices still do not change, open a topic on the FOX support forum with a link to a page where it happens, the result of the console check and your Is multiple allowed setting, and we will look at it.