=== H6 Smart Shipping & Payment Control for WooCommerce ===
Contributors: hutsixdigital
Tags: woocommerce, shipping rules, payment gateways, conditional shipping, checkout fees
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Conditionally hide, restrict, rename, or add fees to WooCommerce shipping methods and payment gateways with multi-condition checkout rules.

== Description ==

H6 Smart Shipping & Payment Control for WooCommerce gives you practical control over which shipping methods and payment gateways customers can use at checkout, and what they cost.

Build checkout rules from one or more conditions, then choose an action: hide options, show only certain options, rename them, or add a surcharge. Rules are lightweight and readable, without a complicated rule engine or a bloated plugin suite.

Perfect for stores that need real checkout control based on the cart, the customer, or the destination.

== Key Features ==

= Multi-condition rules =

Combine several conditions in one rule and choose whether the rule applies when all of them match or when any of them match.

Supported conditions:

- Cart subtotal
- Cart weight
- Cart item count
- Shipping country (one or more, is or is not)
- Customer status or role (guest, any logged-in customer, or specific roles)
- A product in the cart
- A product category in the cart
- A shipping class in the cart
- A coupon applied

= Control shipping methods =

- Hide specific shipping methods
- Show only selected shipping methods and hide the rest
- Rename a shipping method for matching orders

Examples: hide Free Shipping for heavy orders, offer only Local Pickup in certain postcodes' countries, or rename Flat Rate to "Express" when a fast-delivery product is in the cart.

= Control payment gateways =

- Hide specific payment gateways
- Show only selected payment gateways and hide the rest
- Rename a payment gateway for matching orders

Examples: disable Cash on Delivery for guests, allow only Bank Transfer for wholesale roles, or hide a gateway for certain destinations.

= Add surcharges and fees =

Add a conditional fee to the cart when a rule matches, such as a handling fee for heavy orders, a small-order surcharge, or a fee for a specific payment scenario. Fees can be taxable or non-taxable.

= Simple rule builder =

Create rules using a clear "when → then" workflow.

- Add and remove conditions per rule
- Enable or disable rules individually
- Shipping, Payment, and Fee filter tabs
- Rule overview counts
- Responsive admin interface

= Lightweight and WooCommerce-friendly =

Designed to work alongside standard WooCommerce shipping zones and payment settings without replacing them.

== Installation ==

1. Upload the plugin to `/wp-content/plugins/` or install it from the WordPress plugin directory.
2. Activate the plugin via the Plugins screen.
3. Go to WooCommerce → H6 Shipping & Payment.

== Frequently Asked Questions ==

= Can a rule use more than one condition? =

Yes. Add as many conditions as you need to a rule and choose whether it applies when all conditions match or when any condition matches.

= How do I hide Free Shipping for heavy items? =

Add a rule with a Cart weight condition, then choose the action "Hide shipping method(s)" and select Free Shipping.

= Can I show only one shipping method in some cases? =

Yes. Use the "Show only these shipping method(s)" action. When the rule matches, all other shipping methods are hidden.

= Can I disable payment gateways for guests? =

Yes. Add a rule with a Customer / role condition set to Guest, then choose "Hide payment gateway(s)" and select the gateway.

= Can I add a surcharge at checkout? =

Yes. Choose the "Add a surcharge / fee" action, give the fee a label and amount, and set whether it is taxable. The fee is added whenever the rule's conditions match.

= Can I temporarily disable all rules? =

Yes. Use the main plugin enable switch to pause all rules without deleting them.

= Will my existing rules still work after updating? =

Yes. Rules created in earlier versions are automatically upgraded to the new multi-condition format.

== Screenshots ==

1. The rule overview and multi-condition rule builder.
2. A shipping rule that hides a method based on a cart condition.
3. A conditional surcharge (fee) rule.

== Changelog ==

= 1.1.0 =
* Added multi-condition rules with match-all or match-any logic.
* Added new conditions: cart item count, product in cart, category in cart, shipping class in cart, coupon applied, multiple shipping countries, and specific user roles.
* Added new actions: show only selected shipping methods or payment gateways, rename shipping methods or payment gateways, and add conditional surcharges or fees.
* Existing single-condition rules are automatically migrated to the new format.
* Redesigned the rule builder with a card-based when/then layout and Shipping, Payment, and Fee tabs.
* Tightened rule sanitisation for the new multi-condition schema.
* Updated translation metadata and release package cleanup.

= 1.0.2 =
* Fixed shipping cache clearing during checkout updates.
* Added a rule overview panel for active, paused, shipping, and payment rules.
* Tightened rule sanitisation for supported condition and action types.
* Improved shipping target matching to avoid accidental partial matches.
* Updated translation metadata and release package cleanup.

= 1.0.1 =
* Redesigned the admin interface for a cleaner WooCommerce experience.
* Added improved styling and layout consistency.
* Added Shipping and Payment rule tabs.
* Improved rule row spacing, badges, and responsive layouts.
* Simplified overall rule management UX.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==
1.1.0 =
Adds multi-condition rules, new conditions (product, category, shipping class, coupon, roles), and new actions including show-only, rename, and surcharges. Existing rules are migrated automatically.

= 1.0.1 =
Improves the admin interface with a cleaner rule-builder layout and updated styling.
