=== U2Code Product Multicurrency for WooCommerce ===
Contributors: bycrik, u2code, freemius
Tags: woocommerce, currency, currency switcher, multicurrency, multi currency
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Sell in multiple currencies — automatic exchange rates, geolocation detection, per-currency price rules and a customizable storefront switcher.

== Description ==

U2Code Product Multicurrency lets your WooCommerce store display prices and accept payments in any number of currencies.

**Currencies & rates**

* Unlimited currencies, ordered the way you want them in the switcher
* Automatic exchange rates from ECB, Frankfurter, FloatRates (free, no key), Open Exchange Rates or Fixer
* Hourly to weekly update schedule, or manual-only, with an "Update now" button
* Manual rate override per currency — automatic updates never touch it
* Percentage fee (markup) and fixed fee per currency
* Price rounding per currency: to the nearest/up/down step (0.01 … 100) plus charm endings (19.99) — with a live preview while you configure
* Per-currency symbol, symbol position, decimals and separators — zero-decimal currencies like JPY handled correctly
* If a rate is ever missing or broken, prices fall back to the base currency — never to zero

**Detection & switching**

* Currency switcher everywhere you need it: Gutenberg block (works in Site Editor headers), shortcode `[u2code_currency_switcher]`, classic widget, floating panel, navigation menu items (any number of menus, with a currency submenu), under the price on product pages, and an Elementor widget — five styles (dropdown, buttons, native select, flags only, text links), with flag emojis (no image sprites)
* Geolocation: map countries to currencies and first-time visitors see their local one (crawlers always get the base currency)
* The visitor's choice is remembered in a cookie; `?currency=EUR` links switch too
* Cache compatibility mode: prices are re-drawn in the browser on cached pages; WP Rocket cookie registration built in

**Checkout & orders**

* Choose: customers pay in the selected currency, or the checkout always charges the base currency (display-only switching)
* Every order stores the currency, the exchange rate at purchase time and the total in your base currency
* WooCommerce Analytics reads coherent base-currency numbers — reports never mix currencies
* The order-pay page always charges the order's own currency

**Compatible by design**

* HPOS and Cart/Checkout Blocks compatible, Store API aware
* Shipping costs, fixed-amount coupons, coupon limits and free-shipping thresholds are all converted
* Ships integrations for Tiered Pricing Table, U2Code Product Addons, Elementor and WP Rocket — each can be toggled off
* Extensive hooks for developers (see DEVELOPERS.md in the plugin folder)

**Premium**

* Fixed per-product prices per currency (simple products and variations) that replace the calculated conversion
* Restrict payment gateways per currency

== Frequently Asked Questions ==

= Where do I configure it? =

WooCommerce → Settings → Multicurrency. Add currencies, pick a rate provider, choose the checkout behavior and the switcher design.

= Do rates update automatically? =

Yes — pick a provider and a schedule on the Exchange Rates tab. Currencies set to "Manual" keep their rate forever.

= Can I set exact prices per currency for one product? =

With Premium, yes. Each product (and each variation) gets fixed-price fields per currency; a fixed price replaces the calculated conversion, and the values are kept even if you switch back to automatic conversion.

= Does it work with a page cache? =

Yes. With WP Rocket the currency cookie is registered automatically. For other full-page caches enable "Cache compatibility mode" in Behavior — prices are then refreshed in the browser after the cached page loads.

= Which currency do reports use? =

Orders keep the currency the customer paid in, and also store the rate and base-currency total. WooCommerce Analytics receives amounts converted to your base currency, so revenue reports stay coherent.

== Screenshots ==

1. All your currencies in one table — automatic rates, manual overrides, fees and switcher order.
2. Per-currency settings: automatic or manual rate, fees, symbol and formatting overrides.
3. Automatic exchange rates from ECB, Frankfurter, FloatRates, Open Exchange Rates or Fixer.
4. Design the switcher next to a live storefront preview — the sample price converts with your real rates.
5. Behavior in plain language: geolocation, URL switching, checkout currency and cache compatibility.
6. The floating switcher on the storefront — five styles, flag emojis, no jQuery.
7. The switcher right under the price on the product page.

== External services ==

This plugin can fetch currency exchange rates from an external service. It only contacts the one provider you select under WooCommerce → Settings → Multicurrency → Exchange Rates, on the schedule you choose there (or when you press "Update rates now"). The request is made from your server and contains only the currency codes you configured — plus your own API key for the providers that require one. No visitor data and no personal data is ever sent.

Available rate providers:

* **European Central Bank (ECB)** — free daily reference rates, no account needed. [Disclaimer and copyright](https://www.ecb.europa.eu/services/disclaimer/html/index.en.html)
* **Frankfurter** — free open-source exchange-rate API, no key and no account needed. [Website and documentation](https://frankfurter.dev/)
* **FloatRates** — free exchange-rate feeds, no account needed. FloatRates does not publish separate terms or privacy pages; see [About FloatRates](https://www.floatrates.com/page.php?page=about)
* **Open Exchange Rates** — requires an App ID that you create with them. [Terms of service](https://openexchangerates.org/terms), [Privacy policy](https://openexchangerates.org/privacy)
* **Fixer** — requires an access key that you create with them. [Terms of service](https://fixer.io/terms), [Privacy policy](https://fixer.io/privacy)

If "Detect currency by visitor location" is enabled, the visitor's country is determined by WooCommerce's built-in geolocation on your own server. This plugin does not send visitor data to any external geolocation service.

== Source code & build ==

The admin app in `assets/admin/` is compiled with @wordpress/scripts (webpack) from the human-readable sources shipped in `js-source/`. To rebuild it:

`cd js-source && npm install && npm run build`

All other JavaScript and CSS in `assets/` is hand-written; `.min` files are generated from the adjacent source file of the same name.

== Changelog ==

= 1.0.0 =
* Initial release.
