Modules / Currency

ExpertPress Currency

Prices in the visitor’s currency.

FreeIn testing

ExpertPress Currency lets visitors see prices in their own currency. The exact price stays in the sale currency, and an approximate amount is shown next to it, for example "≈ 1 250 UAH". The approximate amount uses the daily official rate of the National Bank of Ukraine. Payments, refunds, payouts and documents always stay in the sale currency; the module only changes what is shown.

Key capabilities

  • Approximate prices ("≈") in UAH, EUR or USD next to the exact sale price in the service catalog, on the service page, on the booking request screen and, with ExpertPress Shop, at the shop checkout.
  • A currency switcher for any page or theme through the [expertpress_currency_switcher] shortcode; the visitor's choice is remembered.
  • A daily rate update at an hour you choose, with hourly retries until the day's rate arrives, and a Get today's rate now (Отримати сьогоднішній курс зараз) button.
  • Safety by default: if the rate is too old, the switcher hides and every page shows the exact sale price only. No rate is ever invented.
  • Price filters in the catalog work in the visitor's currency and are converted back to the sale currency.
  • "What the client saw" snapshots: the approximate amount shown when a booking was requested or paid is stored once and reused later in booking history and emails, instead of today's rate.
  • A read-only check of the stored snapshots on the settings screen.

Requirements

Item Value
Requires Plugins expertpress (the ExpertPress core)
WordPress 6.0 or later
PHP 7.4 or later, with the bcmath extension. Without bcmath the module refuses to activate ("ExpertPress Currency requires the PHP bcmath extension.").
Outgoing HTTPS The site must be able to reach bank.gov.ua (National Bank of Ukraine open data). No account or API key is needed.
Scheduled tasks The daily update runs through WordPress scheduled tasks (WP-Cron), once an hour. If scheduled tasks do not run on your site, rates are only fetched with Get today's rate now.

On activation the module creates its two tables (rate sets and price snapshots). If they cannot be created, activation stops with "ExpertPress Currency could not create its tables."

The module needs no payment provider. It works with or without ExpertPress Payments and ExpertPress Shop.

Which currencies are supported

The rate source serves three currencies: UAH, EUR and USD. Conversion works only when the site's sale currency (core setting Pricing currency) is one of them. With any other sale currency, pages keep showing the exact price only.

How it works

  1. You turn the module on under ExpertPress → Currency and choose at least two currencies. Include the sale currency in the list (see Currencies).
  2. The site fetches the official rates for today. The first rate is fetched at once; after that, once a day at the hour you set. Until the first rate is stored, the switcher stays hidden and visitors see exact prices only.
  3. Each visitor gets a display currency:
    1. the currency they picked with the switcher (remembered in their browser for 180 days and, when they are signed in, in their account);
    2. otherwise, a currency based on their country, if the site provides the country (see Visitor country);
    3. otherwise, the sale currency.
  4. When the display currency differs from the sale currency, an approximate amount appears under or next to the exact price. The exact price is never replaced.

Changing the display currency never changes the page language, and the language never picks the currency.

Rounding

The approximate amount is shown in whole units of the display currency, rounded half up. It is calculated from the exact decimal rate text published by the bank, without floating-point rounding errors. A very small price that would round to zero shows no approximate amount.

When the rate is too old

Each stored rate set has the date it applies to. If no new rate arrives for longer than the Hide after (days without a new rate) limit, the module treats the rate as unusable: the switcher disappears and every page shows the exact sale price only. The settings screen then says "Outdated — prices are shown in the sale currency only." Approximate amounts come back as soon as a fresh rate is stored.

If the bank does not answer, or does not return every chosen currency for today's date, nothing is replaced: the previous rate stays active and the site tries again an hour later.

What visitors and clients see

  • Catalog and service page. The exact price, and below it "≈ amount currency" in the display currency.
  • Price filter in the catalog. Minimum and maximum prices can be typed in the display currency; the catalog converts them to the sale currency with the same rate. If the visitor switches currency after typing a price range, the range is reset and the visitor sees a notice, so that numbers typed in one currency are never read in another. The switcher itself also clears the price range and page number when it is used.
  • Booking request screen. The approximate amount is shown with the price. When the client sends the request, the site checks that the currency and rate the client saw are still current. If the rate changed in the meantime (for example a new daily rate arrived) or the client switched currency in another tab, the request is not sent: the screen is shown again with the current approximate amount so the client can confirm.
  • After the request and after payment. The approximate amount the client saw is stored once for the booking (at the request and, with ExpertPress Payments, at payment). The client's booking page and the payment emails show this stored amount, not a recalculation at today's rate. It is shown only while the client's display currency is the same as the stored one.
  • Payment. The client always pays the exact amount in the sale currency. The switcher shows the note "Prices in other currencies are approximate. Payment is in the sale currency." The final amount in the client's card currency depends on their bank.
  • Shop checkout (with ExpertPress Shop). An approximate total is shown next to the order total. It is checked again when the order is placed and stored with the order; the order page and order emails show that stored amount. The charged total never changes.

What specialists see

Specialists set prices in the sale currency as before. Their cabinet, earnings and payouts are not affected by the module.

What the site team sees

  • A Currency (Валюта) screen in the Modules group of the ExpertPress admin app, for users with platform management permission (Administrator and Manager; see Roles and access). All options are described in Settings.
  • Money screens, reports, refunds, payouts and documents are unchanged and stay in the sale currency.

Adding the switcher to the site

Put the shortcode [expertpress_currency_switcher] in a Shortcode block, a widget area or page content, for example in the header or footer. It shows "Display currency:" (Валюта відображення) with one link per enabled currency and the note about approximate prices. It outputs nothing while the module is off, while fewer than two currencies are available, or while there is no usable rate. A theme can also place its own switcher.

A switcher link adds ?ep_currency=usd (or another code) to the current address; the site remembers the choice and reloads the same page without the parameter.

Visitor country

The module does not detect the country by itself and does not read request headers. A site developer can provide the visitor's country from a trusted source (for example a header set by the site's CDN) through the expertpress_currency_visitor_country filter. By default a Ukrainian visitor then sees UAH and a US visitor USD; other countries get the sale currency. The mapping can be changed with the expertpress_currency_for_country filter. An explicit choice in the switcher always wins over the country.

Turning it off and removing it

  • Turning the switcher off (clearing Currency switcher) immediately shows exact prices only everywhere, including booking history and emails. Stored rates and snapshots are kept and reappear if you turn it back on.
  • Deactivating the plugin stops the scheduled rate update. Data is kept.
  • Deleting the plugin keeps stored rates, snapshots, settings and visitors' saved currency choices, unless Uninstall was ticked before deletion. If deletion of the data does not finish, administrators see the notice "Currency data cleanup did not finish last time…" with a Dismiss this notice button; deleting the plugin again retries.