=== GateFlow Payment Logic ===
Contributors: silvercover
Tags: woocommerce, payment, gateways, restrictions, conditional payments
Requires at least: 6.0
Tested up to: 7.0
WC tested up to: 10.8.1
Requires PHP: 7.4
Stable tag: 1.0.0
Tags: conditional payments, payment methods, woocommerce payments
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Restrict WooCommerce payment gateways with flexible rules: products, categories, tags, product type, cart total.

== Description ==

GateFlow Payment Logic lets you allow or deny specific WooCommerce payment gateways based on what is in the customer's cart. Define rules using a familiar WooCommerce-style settings tab.

For instance, you can limit payment options like Cash on Delivery, PayPal, Stripe, or other popular methods depending on specific conditions.

**Features**

* Allow-only or deny mode per rule
* Conditions: products, categories, tags, product type, cart total
* AND logic across conditions within a rule
* Intersection of allowed gateways across matched rules
* Custom customer-facing message per rule
* HPOS compatible
* Compatible with classic Checkout and Cart/Checkout Blocks
* Translation ready
* Lightweight: single option storage, transient caching, lazy loading
* Extensible: register custom conditions via `gateflow_payment_logic_register_conditions`

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`.
2. Activate via Plugins menu.
3. Go to WooCommerce > Settings > GateFlow Payment Logic to add rules.

== Frequently Asked Questions ==

= How are multiple matched rules combined? =

The plugin computes the intersection of allowed gateways across all matched rules, so the customer only sees gateways permitted by every applicable rule.

= Does this plugin support all payment gateways? =

It works seamlessly with several widely used payment gateways, including WooCommerce Stripe, WooCommerce PayPal Checkout, WooCommerce PayFast Gateway, Braintree for WooCommerce Payment Gateway, and others.

= Can I add custom conditions? =

Yes. Implement `FlexiPay\Conditions\Condition_Interface` and register your class via the `gateflow_payment_logic_register_conditions` filter.

== Screenshots ==
1. Add Rule tab in woocommerce settings
2. Payment Restriction Rules list
3. Cart page notice
4. Checkout page notice

== Changelog ==

= 1.0.0 =
* Initial release.
