Docs

Currency converter shortcode

4 min readUpdated November 4, 2026

The currency converter is a small calculator you can put on any page. The shopper types an amount, picks two currencies and sees the result straight away, using the same exchange rates your store uses. For example, a shopper from Kuwait reading your size guide or shipping page can check what 50 US dollars is in Kuwaiti dinar without leaving your site.

The currency converter

How it works#

The converter shows:

  • An Amount box.
  • A From currency picker and a To currency picker, with flags and names.
  • A swap button between them that flips the two currencies.
  • The result, and a line under it with the rate, for example 1 USD = 0.3087 KWD.

When the page loads, the converter receives your store’s current exchange rates for every enabled currency. All the maths then happens in the shopper’s browser, so the result updates on every key press with no waiting and no extra requests to your server.

Add it to a page#

This is the basic shortcode:

[wccs_converter]
  1. Edit the page or post where you want the converter.
  2. Add a Shortcode block (or a shortcode element in your page builder) and paste the shortcode.
  3. Add any attributes you need from the table below.
  4. Save and view the page.

Attributes#

Attribute Default What it does
from the visitor’s current currency Currency selected in the From picker when the page loads
to your store currency (the Default Currency on the General tab) Currency selected in the To picker
amount 1 Starting amount. A negative number becomes 0.
show_flags 1 1 shows flag pickers. 0 shows plain drop-down lists.
show_names 1 1 shows names next to codes, for example “KWD – Kuwaiti Dinar”. 0 shows codes only.

Use currency codes you have enabled on the Currencies tab. The pickers only list enabled currencies.

Examples#

Start at 50 US dollars converted to Kuwaiti dinar:

[wccs_converter from="USD" to="KWD" amount="50"]

A compact converter with plain lists and codes only:

[wccs_converter show_flags="0" show_names="0"]

The maths. The rates below are example figures. Your store’s rates come from your rate provider.

  • With 1 USD = 0.3087 KWD, an amount of 50 USD gives 50 x 0.3087 = 15.435 KWD, shown with 3 decimals when KWD is set to 3 decimal places.
  • Click the swap button and type 15. The converter works out 15 / 0.3087 = 48.5909…, shown as 48.59 USD when USD is set to 2 decimal places.
  • Rates are stored against the US dollar, so other pairs go through it. With 1 USD = 0.92 EUR and 1 USD = 0.3087 KWD, 100 EUR gives 100 x 0.3087 / 0.92 = 33.5543…, shown as 33.554 KWD.

Good to know#

  • It shows the plain exchange rate. The converter does not add your conversion fees, does not apply rounding and does not use fixed exchange rates from the Pricing tab. Its result can therefore differ a little from the prices in your shop.
  • Decimals come from your settings. The result uses the Decimal Places you set for the target currency on the Pricing tab (3 for KWD in the example). The thousands and decimal separators follow the shopper’s own browser language.
  • No “from” means it follows the visitor. Without from, the converter starts from the currency the visitor chose, even on a cached page, because it reads the currency cookie. In Instant switching mode (beta), it also follows a switch made on the page, until the shopper picks a From currency themselves.
  • Missing rate. If a currency has no rate yet, the result shows a dash (-).
  • Cached pages. A cached copy of the page carries the rates from the moment it was cached. The Clear page cache when a rate moves more than setting on the Rate Provider tab clears supported page caches when rates move enough to matter.
  • Keyboard and phones. The flag pickers work with the arrow keys, Home, End, Enter, Escape and by typing a code or name. On narrow screens the fields stack on top of each other. In right-to-left languages the layout mirrors.
  • Exchange rate text shortcode
  • Choosing an exchange rate provider
  • Price rounding and conversion fees
  • Adding the currency switcher