=== Dprime Woo Currency Switcher ===
Contributors: dprime
Tags: woocommerce, currency, multi-currency, currency switcher, exchange rate
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.2
Stable tag: 3.2.0
License: Commercial
License URI: https://dprime.au/licence

Multi-currency switcher for WooCommerce with manual exchange rates and six frontend layouts.

== Description ==

Dprime Woo Currency Switcher adds a currency switcher to your WooCommerce store. Visitors can choose from the currencies you configure, and prices, shipping rates, and fixed-amount coupons are converted using your manual exchange rates.

Features:

* Manual exchange rates with no third-party API dependency
* Free shipping minimum amounts convert with the active currency, so a threshold set in the base currency unlocks at the equivalent amount in every currency
* TranslatePress integration: set per-language custom labels and symbols for each currency
* Per-currency formatting for decimals, symbol position, separators, labels, and symbols
* Price rounding modes: none, up, down, or nearest
* Currency switcher via shortcode, widget, or URL parameter
* Shortcode-level overrides for layout, appearance, labels, colours, radius, font, and custom classes
* Toggle layout that shows one currency and switches to the next currency on click
* 30-day cookie persistence so customers stay in their chosen currency
* Order metadata tracks the currency code and exchange rate used at checkout
* Dropdown, pills, radio, select, buttons, and toggle layouts
* Drag to reorder currencies in the switcher

== Installation ==

1. Install and activate the plugin.
2. Your WooCommerce base currency is automatically added and kept as the default currency with exchange rate 1.
3. Go to Dprime > Woo Currency Switcher and add the currencies you want to support.
4. Set the manual exchange rate for each currency relative to your WooCommerce base currency.
5. Place the switcher using the [dprime_currency_switcher] shortcode or the Dprime Currency Switcher widget.

== Frequently Asked Questions ==

= How do I show the default switcher? =

Use [dprime_currency_switcher].

= How do I use the new toggle layout? =

Use [dprime_currency_switcher layout="toggle"]. The switcher shows the active currency only. Clicking it switches to the next enabled currency in your configured order.

= Can each shortcode have its own appearance? =

Yes. You can use attributes such as layout, appearance, show_flags, show_code, show_symbol, bg, text, accent, border, radius, font, and class.

Example: [dprime_currency_switcher layout="pills" appearance="dark" show_symbol="0"]

Example: [dprime_currency_switcher layout="toggle" appearance="outline" accent="#134E8E" radius="14"]

= Does it work with TranslatePress? =

Yes. When TranslatePress is active, each currency row in the Currencies tab shows a translate button. Use it to enter the custom label and custom symbol for every TranslatePress language. The switcher and product prices then show the values matching the visitor's current language. Values you set here are output with data-no-translation so TranslatePress does not machine-translate over them.

= Can customers switch with a URL parameter? =

Yes. Use ?currency=EUR or any enabled currency code.

== Screenshots ==

1. Currency management table.
2. Appearance settings with layout and style controls.
3. Frontend currency switcher layouts.

== Changelog ==

= 3.1.0 =
* Changed: admin rebuilt to Design System v6. Warm cream canvas, single left aligned column, ink hairline borders with no shadows, square surfaces with pill buttons, tabs, and badges, Geist and FK Grotesk Neue, and the navy accent with a blue focus ring.
* Changed: icons are now Lucide SVG files bundled in assets/icons and inlined at render. The Material Symbols icon font and its subset file are removed, so the admin loads no icon font at all.

= 3.0.3 =
* Fixed: free shipping minimum amounts are now converted with the active currency. A 600 AED threshold no longer behaves as 600 USD when the customer switches currency, so free shipping unlocks at the equivalent amount and any text showing the threshold matches.

= 3.0.2 =
* Fixed: currency symbols, separators, and price format now apply in admin generated output too, so emails resent or tested from wp-admin show the plugin's configured symbols instead of the WooCommerce defaults. Price conversion stays frontend only, so admin screens keep showing stored order values.

= 3.0.1 =
* Fixed: Order totals now keep the currency the order was placed in. Past orders, refunds, and emails formatted with an explicit currency show that currency's own symbol instead of the visitor's active one.

= 3.0.0 =
* Changed: Admin rebuilt to the current Dprime design system with a single column layout, stat strip, docked notices, standard modals, and dark toasts.
* Changed: Material Symbols icons are bundled as a small subset instead of loading from Google Fonts.
* No frontend changes. The switcher markup, styles, and behavior are untouched.


= 2.7.1 =
* Fixed base currency syncing with the WooCommerce currency setting.
* Fixed existing saved defaults so the WooCommerce base currency is marked default with exchange rate 1.
* Updated admin previews to use the current WooCommerce base currency.
* Fixed toggle cycling when disabled currencies are present.

= 2.7.0 =
* Added shortcode-level style and display overrides.
* Added the Toggle layout for one-click currency switching.
* Updated plugin metadata, readme version, and package compliance.

= 2.6.0 =
* Previous release package.

= 1.1.0 =
* Extracted help tab into includes/help.php. Override CSS class reference added to admin.css.

= 1.0.4 =
* Multi-file architecture. Help tab. Canonical menu pattern. Admin slug fixed. Design system rebuild.

= 1.0.2 =
* Previous release.

== Upgrade Notice ==

= 3.0.0 =
Admin redesigned to the current Dprime standard with bundled icons. No frontend changes.


= 2.7.1 =
Fixes WooCommerce base currency detection and corrects older saved USD defaults.
