=== Minimum Checkout Amount ===
Contributors: aisimpleplugin
Donate link: https://aispdev.com/minimum-checkout-amount-for-woocommerce/
Tags: woocommerce, checkout, minimum amount, woocommerce checkout, cart total
Requires at least: 5.0
Tested up to: 6.9
WC tested up to: 10.3
Stable tag: 1.2.3
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A lightweight WooCommerce plugin that prevents checkout if the cart total is below a minimum amount.

== Description ==

Minimum Checkout Amount helps WooCommerce store owners enforce a minimum order requirement.  
If a customer's cart does not reach the required minimum amount, the plugin will:

- Show a clear error message on the cart page  
- Block checkout until the requirement is met  
- Optionally include taxes in the calculation  
- Allow excluding specific users from the minimum requirement  
- Automatically exclude Administrators and Shop Managers  

This plugin is lightweight, fast, and fully compatible with WooCommerce HPOS.

== Features ==

* Set a minimum checkout amount
* Show a message when the minimum is not met
* Include or exclude taxes in the calculation
* Exclude specific users from the minimum requirement
* Automatically excludes Admin and Shop Manager roles
* HPOS compatible


== WooCommerce Compatibility ==

This plugin is fully compatible with WooCommerce High-Performance Order Storage (HPOS).

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/minimum-checkout-amount` directory, or install it via the WordPress Plugins screen.
2. Activate the plugin.
3. Go to **WooCommerce → Settings → Minimum Checkout Amount**.
4. Set your minimum amount and preferences.

== Frequently Asked Questions ==

= Does this plugin support HPOS? =
Yes. The plugin is fully compatible with WooCommerce HPOS.

= Can I exclude specific users? =
Yes, you can exclude individual users in the plugin settings.

= Can I apply the minimum checkout amount to specific user roles? =
Administrators and Shop Managers are automatically excluded. No other role-based exclusions are supported at this time.


== Screenshots ==

1. Settings page
2. Error message on cart page

== Changelog ==

= 1.2.3 =
* Fixed: i18n issue in settings description string.

= 1.2.2 =
* Fixed: i18n issue in settings description string.

= 1.2.1 =
* Updated: text strings for better translation coverage.

= 1.2.0 =
*Added: customizable minimum checkout warning message setting.
*Added: support for dynamic placeholders {amount} and {difference} in warning messages.
*Preserve:d compatibility with WooCommerce tax calculations based on plugin settings.
*Refactored: validation logic for improved reliability and maintainability.
*Removed: redundant validation methods to prevent duplicate enforcement.
*Improved: message translation fallback handling.
*Minor performance and code cleanup.

= 1.1.7 =
* Added: full HPOS compatibility for WooCommerce.
* Added: uninstall cleanup option to remove plugin settings.
* Improved: validation logic and excluded Administrator & Shop Manager roles automatically.
* Cleaned: and reorganized code for performance and maintainability.
* Updated: translations (fr_FR, es_ES).
* Various: small fixes and enhancements.

= 1.1.6 =
* Improved: compatibility with recent WooCommerce versions.
* Updated: text strings for better translation coverage.
* Minor security and code-quality improvements.

= 1.1.5 =
* Added: option to include taxes in minimum order calculation.
* Enhanced: admin settings layout.
* Improved: cart page validation messages.

= 1.1.4 =
* Added: feature to exclude specific users from the minimum amount requirement.
* Improved: error handling and message formatting.

= 1.1.3 =
* Better handling of manual “pay for order” flows.
* Added: nonce validation to improve security.
* Fixed: inconsistent message display on the checkout page.

= 1.1.2 =
* Improved: minimum amount validation logic.
* Enhanced: WooCommerce compatibility.
* Minor performance improvements.

= 1.1.1 =
* Added: initial settings page.
* Added: option to display messages on the cart and shop pages.
* Improved: translation templates.

= 1.0.0 =
* Initial release.
* Enforces a minimum checkout amount with basic settings.

== Upgrade Notice ==

= 1.2.0 =

This update introduces a new customizable warning message setting for the minimum checkout notice.
If no custom message is provided, the default translated message will be used automatically

= 1.1.7 =
This update adds a new uninstall cleanup option and improves validation behavior for administrators and shop managers. No configuration changes are required.
