=== CartTaxify for WooCommerce ===
Contributors:       modern-wp-themes
Tags:               woocommerce, tax, cart, threshold, multi-currency
Requires at least:  5.8
Tested up to:       7.0
Stable tag:         1.0.0
Requires PHP:       7.4
License:            GPLv2 or later
License URI:        https://www.gnu.org/licenses/gpl-2.0.html

Apply automatic tax rules based on cart value per currency. Carts below the threshold are taxed; at or above are tax free.

== Description ==

**CartTaxify for WooCommerce** lets store owners define simple, powerful tax rules based on cart value:

* Cart subtotal **below** the configured threshold → tax rate is applied automatically.
* Cart subtotal **at or above** the threshold → no tax (tax free).
* Each rule is tied to a specific **currency**, enabling true multi-currency tax logic.
* Works with **any** currency setup — no extra plugins required.

= Key Features =

* Add unlimited rules — one per currency
* Set your own threshold amount and tax rate per currency
* Optionally customize the tax label (e.g. "GST", "VAT")
* Clean admin UI under **WooCommerce → Cart Tax Rules**
* Works on classic cart/checkout AND WooCommerce Block Checkout
* No billing address required — tax is based on active currency only
* Compatible with WPML + WooCommerce Multilingual, WooCommerce Payments, and most other currency plugins
* HPOS (High-Performance Order Storage) compatible
* Clean uninstall — all data removed on plugin deletion

= Example =

* AUD rule: threshold = $500, rate = 10%
* Customer adds $200 AUD of products → 10% tax ($20) is added
* Customer adds $600 AUD of products → No tax (tax free)

= Multi-Currency Support =

CartTaxify detects the active currency automatically and applies the matching rule. It supports WooCommerce default (single currency), WPML + WooCommerce Multilingual, WooCommerce Payments multi-currency, and most other currency switcher plugins via the standard WooCommerce currency filter.

**Important:** Ensure WooCommerce native tax rates are cleared (WooCommerce → Settings → Tax → Standard Rates) to avoid double taxation.

== Installation ==

1. Upload the `carttaxify-for-woocommerce` folder to `/wp-content/plugins/`.
2. Activate the plugin through **Plugins → Installed Plugins**.
3. Click **Settings** next to the plugin, or go to **WooCommerce → Cart Tax Rules**.
4. Add your tax rules and save.

== Frequently Asked Questions ==

= Does this require WPML? =
No. CartTaxify works with WooCommerce alone or with any multi-currency plugin.

= Does this conflict with WooCommerce built-in taxes? =
No. CartTaxify adds tax as a cart fee, not a tax rate. Clear existing standard rates in WooCommerce → Settings → Tax → Standard Rates to avoid double taxation.

= Does the tax require a billing address? =
No. Tax is based on the active currency only, not the customer location.

= Will my rules be deleted if I deactivate the plugin? =
No. Rules are preserved on deactivation and only removed when the plugin is deleted.

== Screenshots ==

1. Admin page — add and manage tax rules per currency.
2. Cart page — tax applied automatically when cart is below threshold.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.

== Developer Hooks ==

**Filter: cartfowo_fee_label**
Override the tax fee label shown on cart/checkout.
`apply_filters( 'cartfowo_fee_label', $label, $rule, $subtotal )`

**Filter: cartfowo_tax_amount**
Override the calculated tax amount.
`apply_filters( 'cartfowo_tax_amount', $amount, $subtotal, $rate, $rule )`
