Ston Currency for WooCommerce

Description

Ston Currency lets shoppers see and pay in their own currency, while you keep managing every price in your store currency.

Currencies

  • Add, remove, enable, disable and reorder as many currencies as you need.
  • Exchange rate per currency, typed by hand or updated automatically twice a day.
  • Optional extra fee (%) per currency, to cover conversion costs.
  • Rounding rules: none, nearest whole number, round up, charm prices (x.99), nearest 5 or 10.
  • Full format control per currency: symbol, symbol position, decimals, thousands and decimal separators.
  • Fixed prices per currency on any product or variation, when a rate is not good enough.
  • Default currency per country (with Cloudflare or the WooCommerce MaxMind database).

Switcher

  • Four types: pills, dropdown, native select box and inline links.
  • Show the code, symbol, name, or a combination, with optional flags.
  • Place it with a shortcode, the Elementor widget, a classic widget, a theme menu, or as a floating button.
  • Show it on every page or on store pages only.
  • Switches without a page reload: prices, cart totals and the mini cart update in place.
  • Accessible: keyboard navigation, focus states, reduced motion support.

Store

  • Checkout in the customer’s currency, or always in your store currency if your payment gateway needs it.
  • Converts fixed coupon amounts, minimum and maximum spend, shipping costs and the free-shipping minimum.
  • Works with the block cart and checkout, HPOS and the Store API.
  • [ston_price amount="49"] shows any store-currency amount in the visitor’s currency, for pricing tables on landing pages.

Fast

  • No jQuery on the front end; one small script and stylesheet, loaded only on pages with a switcher.
  • No database queries per price: settings are read once per request.
  • Cache friendly: WP Rocket and LiteSpeed Cache keep a separate cached copy per currency.

External services

This plugin can get exchange rates from ExchangeRate-API (https://open.er-api.com). It connects only when you turn on Settings Automatic rates (twice a day) or click Update rates now. Each request sends your store currency code (for example “USD”); no customer or personal data and no site address is sent.

The optional “Visitor country” setting does not call any outside service: it reads the country header from your CDN (for example Cloudflare) or the WooCommerce MaxMind database on your own server.

The service’s terms ask for a credit link on pages that use its rates. The plugin never adds a link to your site on its own: in Settings Rate credit link (off by default) you can choose to show a small “Rates By Exchange Rate API” link at the bottom of pages with converted prices, either while automatic rates are on or always.

Terms of use: https://www.exchangerate-api.com/terms
Privacy policy: https://www.exchangerate-api.com/privacy

Screenshots

Installation

  1. Upload the ston-currency folder to /wp-content/plugins/, or install the zip from Plugins Add New Upload Plugin.
  2. Activate the plugin. WooCommerce must be active.
  3. Go to Ston Currency Currencies, add your currencies and set their rates.
  4. Go to Ston Currency Switcher and choose how and where the switcher appears.

FAQ

Which currency are orders saved in?

In the currency the customer paid in. WooCommerce reports add order totals as they are, without converting them. To keep all payments in one currency, set Settings Checkout currency to the store currency.

My payment gateway only accepts one currency.

Set Settings Checkout currency to “Always the store currency”. Visitors still browse in their own currency; the checkout shows and charges the store currency.

Does it show a credit for the exchange rates?

Only if you choose it. The free ExchangeRate-API service asks for a credit link, so Settings Rate credit link (off by default) can show a small “Rates By Exchange Rate API” link at the bottom of pages with converted prices. Nothing is added to your site until you turn it on.

I use a page cache.

WP Rocket and LiteSpeed Cache are handled automatically: the plugin adds the currency cookie to their cookie list, and while it is active WP Rocket serves its cache through PHP instead of .htaccess rules (rules in .htaccess cannot look at cookies). Deactivating the plugin restores the WP Rocket setup. For other caches, add the cookie ston_currency to the list of cookies the cache varies by.

Can I style the switcher?

Yes. In Elementor, use the widget’s Style tab. Anywhere else, set these CSS variables on .ston-cs: --ston-cs-color, --ston-cs-bg, --ston-cs-border, --ston-cs-active-color, --ston-cs-active-bg, --ston-cs-menu-bg, --ston-cs-menu-color, --ston-cs-radius, --ston-cs-font-size.

Does the price filter use converted prices?

Product sorting and the price filter widget use store-currency prices.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Ston Currency for WooCommerce” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

2.2.8

  • Settings forms read and sanitize only their own fields.

2.2.7

  • Visitor country uses only your CDN header or the local WooCommerce database (no external IP lookup).
  • Exchange rate requests no longer send the site address.
  • WP Rocket files are read through the WordPress filesystem API.
  • Removed the notice about a future plugin from the Help page.

2.2.6

  • Security: the [ston_currency_switcher] and [ston_price] shortcodes and the menu switcher escape the HTML they return.

2.2.5

  • The request type (REST, WooCommerce AJAX) and the public ?currency= link are read from the request URL instead of form input; the settings page no longer reads URL parameters; per-product prices check the nonce and permission inside each save handler.

2.2.3

  • Request data used to detect REST and checkout requests is sanitized; the uninstall cleanup uses a prepared query.

2.2.2

  • Security: every value printed by the plugin is escaped where it is output, including the switcher in widgets, Elementor and the admin previews.

2.2.1

  • The “Rates By Exchange Rate API” credit link is now off until you turn it on in Settings Rate credit link. Nothing is added to your site without your choice.
  • The plugin is now called Ston Currency for WooCommerce.
  • Security: the currency switch request and the per-product prices check a nonce and the user’s permission.
  • Admin notices appear only on the plugin’s screens, WooCommerce settings and the Plugins screen.

2.2.0

  • New: “Rates By Exchange Rate API” credit link on pages with converted prices while automatic rates are on (required by the free rate service). Settings Rate credit link.
  • New: a note under “Visitor country” about Google Shopping, which does not allow prices that change by visitor location on the same page.
  • Fix: when the store currency changes in WooCommerce, exchange rates are recalculated against the new store currency (before, they stayed relative to the old one). If the new store currency was not in the list, you are asked to update the rates.
  • Change: “Default currency” is now “Default display currency”, with a note that the store currency is set in WooCommerce.
  • Rates are stored with up to 10 decimals (currencies with large units).
  • Developers: Ston_Currency_Context::visitor_country() and is_bot() are public; STON_CURRENCY_API constant; public functions are listed on the Help page.

2.1.0

  • New: the Elementor widget has a “Size and glass” section: height, padding, option spacing, glass blur, opacity of the other options and a shadow. Options can have their own corner radius.

2.0.8

  • New: complete Persian (fa_IR) translation.

2.0.7

  • Change: visitors who never pick a currency no longer get a cookie, so cached pages stay shareable. Switching currency or geolocation still remembers the choice.

2.0.6

  • Admin notices from other plugins show below the page header.

2.0.5

  • “Add to a menu” can pick any menu, including menus shown by the Elementor menu widget.
  • Currencies page preview follows the “hide zero decimals” setting.

2.0.4

  • WP Rocket: cached pages are served through PHP instead of .htaccess rules, which cannot vary by cookie. Restored when the plugin is deactivated.

2.0.3

  • WP Rocket: the plugin checks the cache config on admin pages and repairs it when WP Rocket drops the currency cookie (it rewrites the file on plugin updates).
  • Settings: page cache status.

2.0.2

  • Page cache setup now runs after every update, so WP Rocket keeps one copy per currency.
  • AJAX switching checks the currency of the refreshed page and reloads if a cache returns the old one.

2.0.1

  • Option to hide zero decimals (49 instead of 49.00), on by default.
  • Faster AJAX switching: the page and the currency change load in parallel.

2.0.0

  • Any number of currencies, with per-currency format, fee and rounding.
  • Automatic exchange rates (opt-in).
  • Four switcher types, Elementor widget, classic widget, menu item and floating switcher.
  • Switching without a page reload.
  • Coupon, shipping and free-shipping conversion.
  • Country-based default currency.
  • Checkout in the store currency option.
  • [ston_price] shortcode.
  • New admin menu: Currencies, Switcher, Settings, Help.