=== Tax Display Toggle – iKetch ===
Contributors: iketcheg
Tags: woocommerce, vat, tax display, tax inclusive, tax exclusive
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.2.6
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Switch WooCommerce prices with or without VAT/tax using AJAX, without a page reload. Includes shortcode, Gutenberg block and RTL support.

== Description ==

Let customers choose whether WooCommerce product prices include or exclude tax (VAT/GST) with an easy-to-use switch. Tax Display Toggle – iKetch refreshes visible prices through AJAX without reloading the page, while WooCommerce continues to calculate tax using your store's settings.

= Features =

* **Instant AJAX price switching:** Update supported visible product prices without a full page reload.
* **Inclusive/exclusive tax display:** Let shoppers view prices with or without VAT, GST or other configured WooCommerce taxes.
* **Automatic placement:** Show the inline switch on supported shop, product and product archive pages using standard WooCommerce template hooks.
* **Manual placement:** Add `[iketch_tax_toggle]` or the Gutenberg **Tax Toggle** block to supported layouts.
* **Variable products:** Handle simple products, variable products, variation price ranges and WooCommerce tax classes.
* **Responsive design:** Configure display on desktop, tablet and mobile.
* **Accessible controls:** Keyboard-operable switch with status labels and RTL support.
* **Customizable labels:** Change the tax name and text shown for inclusive and exclusive modes.
* **Remember visitor preference:** Store the selected display mode in a browser cookie and WooCommerce session where available.
* **Uninstall data control:** Choose whether to preserve the plugin settings for a future reinstall; the default is to remove them.
* **WooCommerce integration:** Support classic product views and Cart/Checkout Blocks through WooCommerce integration hooks; no automatic switch is added to checkout.
* **Multilingual:** Bundled translations for Arabic, German, Spanish, French, Italian and Dutch.
* **No external service required:** Included features work without a license key, paid account or usage tracking.

= Theme and page builder support =

The switch uses standard WooCommerce hooks for automatic positioning. Earlier local compatibility tests covered Storefront, Astra, Kadence and Twenty Twenty-Five. Results may vary when a theme replaces WooCommerce templates or price markup.

For Elementor layouts, insert `[iketch_tax_toggle]` using Elementor's Shortcode widget on a supported WooCommerce shop or product view. This is shortcode-based placement, not a dedicated Elementor widget. Custom Elementor pages and templates may require additional integration; full Elementor Free/Pro compatibility has not been independently verified.

= How tax display works =

Tax rates, customer location, tax exemptions and checkout totals are handled by WooCommerce. This plugin changes the **display preference**, not stored product prices, configured tax rates or the amount of tax legally owed. Enable and configure tax calculation in WooCommerce before using the switch.

This plugin provides a complete inline tax display switch with no usage limits, license checks, or time-based restrictions. It does not include floating placement or alternative visual layouts.

== Installation ==

1. Install and activate WooCommerce.
2. Upload and activate Tax Display Toggle – iKetch.
3. Enable WooCommerce tax calculations and configure the applicable rates.
4. Open **WooCommerce > Settings > Tax > Tax Toggle**.
5. Configure your labels, default mode and device visibility.
6. Keep automatic placement enabled on standard WooCommerce views, or add `[iketch_tax_toggle]` / the Tax Toggle block manually.

== Frequently Asked Questions ==

= Does it switch prices without refreshing the page? =
Yes. An AJAX request retrieves updated WooCommerce price HTML for supported visible products without a full page reload.

= Does it support VAT, GST and tax-inclusive pricing? =
Yes. It works with tax types and rates configured in WooCommerce. The switch displays product prices including or excluding configured taxes; it does not calculate or create new tax rates.

= Can I use Tax Toggle with Elementor? =
You can place `[iketch_tax_toggle]` with Elementor's Shortcode widget on supported WooCommerce shop/product views. This is not a native Elementor widget. For a custom Elementor landing page or overridden WooCommerce template, additional asset loading or placement work may be necessary.

= Which themes has it been tested with? =
Earlier local compatibility testing covered Storefront, Astra, Kadence and Twenty Twenty-Five. The plugin uses standard WooCommerce hooks. Themes with highly customized templates or dynamic price components can need additional integration.

= Does it work with variable products? =
Yes. It handles supported variable product price ranges and selected variations as they are calculated by WooCommerce.

= Can I add the switch without editing code? =
Yes. Use the automatic position on WooCommerce shop/product pages, the `[iketch_tax_toggle]` shortcode or the Gutenberg Tax Toggle block. Theme developers may also call the supplied PHP template functions.

= Does switching change what the customer pays? =
No. WooCommerce remains responsible for the actual tax calculation and order totals. The switch changes how product prices are displayed, without changing stored prices or tax rates.

= Why is no switch automatically shown on checkout? =
Automatic placement is limited to supported product/shop contexts. WooCommerce presents the checkout tax breakdown and payable order total using its own settings.

= Are Arabic and RTL supported? =
Yes. Arabic and RTL layouts are supported. Bundled catalogs also cover German, Spanish, French, Italian and Dutch.

= Do I need a paid license, external account or separate tax service? =
No. All features in this free package work without an external account or license key. Configure tax rates in WooCommerce itself.

= What happens to my settings when I uninstall the plugin? =
Deactivating Tax Toggle always keeps your settings. Before deleting the plugin, open WooCommerce > Settings > Tax > Tax Toggle > Uninstall Settings and enable "Keep settings after uninstall" if you want to reuse them after reinstalling. This option is off by default, so deleting the plugin removes its settings unless you enable it. WooCommerce tax settings, products and orders are never deleted.

== Screenshots ==

1. Shop prices with the inline tax toggle.
2. Single-product price including tax, calculated by WooCommerce.
3. Tax Toggle settings: default display, labels and device visibility.
4. Shop prices including tax after switching the display preference.
5. Tax toggle and product prices on a mobile screen.

== Privacy ==

A browser cookie stores the selected tax display preference, for 30 days by default (configurable). The plugin may also use a WooCommerce session. AJAX requests update prices on your own store. The plugin does not send usage analytics or customer information to iKetch or another external service.

== Development ==

Readable PHP, JavaScript and CSS source is included. WordPress-bundled libraries and WooCommerce APIs are used. The POT template and editable PO catalogs are in `languages/`. No external build service is required to run the plugin.

== Changelog ==

= 1.2.6 =
* Update the plugin homepage URL to the current public product page. No functionality changes.

= 1.2.5 =
* Prepare the WordPress.org package and directory artwork.
* Update public name and improve feature documentation, FAQ and search descriptions.
* Align plugin slug, text domain, source filename and translation catalogs with the public name.
* Remove unused premium-layout settings and gating from the Free codebase. Keep the included inline switch, AJAX display, translations and customer settings.
* Add an optional setting to retain plugin settings after uninstall. The default deletes plugin settings on uninstall.

== Upgrade Notice ==

= 1.2.6 =
Update the plugin homepage URL. No functional changes.

= 1.2.5 =
Metadata and internal cleanup for a complete inline tax toggle. Existing tax preferences and supported settings remain available.
