=== Sanestly Cart Restrictions for WooCommerce ===
Contributors: sanestly
Tags: woocommerce, cart restrictions, minimum order, maximum quantity, checkout blocks
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 8.0
WC tested up to: 11.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Set minimum and maximum cart amount or quantity rules for WooCommerce carts, products, and categories. Works with classic checkout and Blocks.

== Description ==

Sanestly Cart Restrictions for WooCommerce lets you set minimum and maximum order rules for your WooCommerce store. Apply a rule to the whole cart, selected products, or selected categories. Check cart amount or item quantity.

Customers see a clear message when a rule applies. WooCommerce blocks checkout until the cart meets the rule. The plugin works with classic WooCommerce cart and checkout pages and with Cart and Checkout Blocks.

= Features =

* Set minimum and maximum rules for order amount and item quantity.
* Apply rules to the whole cart, selected products, or selected categories.
* Calculate cart amount from discounted line totals, without tax or shipping.
* Use inclusive thresholds. A cart that equals the minimum or maximum passes the rule.
* Combine several products or categories in one rule.
* Validate classic cart and checkout pages, Store API requests, and Cart and Checkout Blocks.
* Show a product page hint when a product has a maximum quantity rule.
* Works with WooCommerce HPOS.
* Includes a Help page that explains amounts, quantities, and rule behaviour.
* Keep plugin data on uninstall by default, or remove it from Restrictions settings.

= Privacy =

This plugin does not send data to external servers, set cookies, or load CDN assets. It stores rules and settings in WordPress options on your site.

== Installation ==

1. Upload the `sanestly-cart-restrictions-for-woocommerce` folder to `/wp-content/plugins/`, or install the ZIP from Plugins - Add New.
2. Activate the plugin (WooCommerce must be active).
3. Open WooCommerce - Restrictions to create rules.
4. Open WooCommerce - Restrictions Help to see how amounts and quantities are calculated.

== Frequently Asked Questions ==

= How does the plugin calculate cart amount? =

Sum of matching lines' `line_total` after product/coupon discounts, without tax or shipping. Fees, gift cards, and shipping are excluded.

= What happens when a product or category rule has no matching items? =

The rule does not fire until matching items are in the cart.

= Does the plugin work with Cart and Checkout Blocks? =

Yes. Validation uses Store API hooks so Blocks and classic checkout share the same evaluator.

= Does the plugin support multicurrency stores? =

The plugin does not automatically convert thresholds between currencies. Set thresholds that suit each currency before using it with a multicurrency extension.

= What is removed on uninstall? =

By default, nothing. Enable "Delete all plugin data on uninstall" in Restrictions settings first.

== Screenshots ==

1. Rules list - manage cart restriction rules.
2. Add or edit rule - choose the scope, metric, operator, and threshold.
3. Help - see how the plugin calculates amounts and quantities.
4. Cart - show a restriction message to the customer.
5. Checkout - block an order until the cart meets the rule.

== Changelog ==

= 1.0.0 =
* First release with rule management, cart evaluation, classic cart and checkout support, Store API support, Help, and HPOS compatibility.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
