=== Incode Currency Switcher ===
Contributors: adrianincode
Tags: woocommerce, currency, currency switcher, multi currency, exchange rate
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 0.1.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Every visitor sees prices in their own currency, with the rates you set and the rounding you choose, all the way to the order.

== Description ==

Every visitor sees prices in their own currency, with the rate you set and the rounding you want. The chosen currency follows them through the catalogue, the cart and the checkout, and it is written into the order.

It converts the price, not the text on screen. Cart totals, taxes, shipping and fixed-amount coupons all add up to what the customer is being shown, which is where most currency plugins quietly go wrong.

* Currency switcher in the menu, floating in a corner, or with the `[ctkcs_currency_switcher]` shortcode.
* Rate, symbol, symbol position and decimals, one set per currency.
* Commercial rounding: to the next whole number, to the next 50 cents, or ending in .95 or .99.
* A price of zero is never moved: free stays free in every currency.
* Variable product price ranges included, cached per currency.
* The order records which currency it was placed in and at which rate.
* Works with no JavaScript at all: the switcher is made of real links.
* HPOS compatible.

It is a module of the single Incode Cart Toolkit panel: if you have other add-ons of the family installed, they all share one menu, one settings screen and one place to switch modules on and off.

== Installation ==

1. Install and activate the plugin. WooCommerce must be active.
2. Go to Incode Cart Toolkit → Currencies.
3. Add a currency, set its rate, its symbol and how you want its prices to end.
4. Choose where the switcher shows: the main menu, a floating corner, or the shortcode.

== Frequently Asked Questions ==

= Which currency is actually charged? =

The one the customer is looking at. The order records the currency and the rate it was closed at, so the figure on that order does not move later even if you change the rate.

= Does it work with page caching? =

The currency is remembered in a cookie. If you use page caching, exclude the `ctkcs_moneda` cookie or cache by cookie variant; otherwise the first visitor can leave their currency cached for the next one.

= Can I put the switcher wherever I want? =

Yes, with the `[ctkcs_currency_switcher]` shortcode, on any page, template or text widget.

= What happens to my free products? =

They stay free. No rounding mode ever moves a price of zero, in any currency.

== Screenshots ==

1. The switcher in the menu: pick a currency and every price follows it.
2. The currency table: rate, symbol, position, decimals and commercial rounding.
3. Every add-on you have installed lives in one panel, and each one can be switched off from there.

== Changelog ==

= 0.1.9 =
* Hardening: the settings screen now checks the nonce and the user's capability in its own handler, instead of relying on WooCommerce having checked them before calling it, and every value read from the request is unslashed before it is sanitised.

= 0.1.8 =
* The shortcode is now `[ctkcs_currency_switcher]`, with a prefix long enough that it cannot collide with another plugin's.

= 0.1.7 =
* The Incode Cart Toolkit panel now loads its stylesheet through the WordPress queue instead of printing it into the page, so caching and optimisation plugins can see it.

= 0.1.6 =
* First-run steps in the Incode Cart Toolkit panel: a short checklist that is ticked against your own store -- a second currency, the exchange rates and where the switcher shows -- and disappears on its own when there is nothing left to do.

= 0.1.5 =
* English is now the source language, with Spanish bundled as a translation, so the plugin can be translated into any language.

= 0.1.4 =
* The Incode Cart Toolkit panel now also lists the add-ons of the family you do not have installed yet, next to the ones you do.

= 0.1.3 =
* Free stays free: the .95 and .99 rounding modes turned a price of zero into 0.99, so free products stopped being free.

= 0.1.2 =
* Joins the single "Incode Cart Toolkit" panel: the currency table is also configured under Incode Cart Toolkit → Currencies.
* The module can be switched off from Incode Cart Toolkit → Modules while keeping the currency table.

= 0.1.0 =
* First release.

== Upgrade Notice ==

= 0.1.5 =
Translatable into any language.

= 0.1.4 =
The panel now lists the rest of the family.

= 0.1.3 =
Fixes free products being priced at 0.99 in other currencies.
