=== Conditional Payment Gateways for WooCommerce – Hide Payment Methods by Rules === Contributors: nikanwp Tags: woocommerce, payment gateways, conditional, checkout, hide payment method Requires at least: 5.8 Tested up to: 7.1 Requires PHP: 7.4 Stable tag: 1.0.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Requires Plugins: woocommerce Show or hide WooCommerce payment gateways based on cart total, shipping country, coupon, login status, and more — no code required. == Description == **Conditional Payment Gateways for WooCommerce** gives you full control over which payment methods appear at checkout. Create unlimited rules and decide exactly when to hide a gateway — based on cart conditions, shipping destination, customer status, or products in the cart. No PHP. No hooks. No developer needed. Works seamlessly with the **classic checkout** and the **WooCommerce Blocks checkout**. HPOS compatible. Tested with the latest WordPress and WooCommerce versions. = Why hide payment gateways conditionally? = Not all payment gateways make sense for every order. A few common reasons store owners use this plugin: * **Reduce transaction fees** — hide expensive gateways for low-margin products * **Prevent fraud** — restrict Cash on Delivery for high-value orders * **Improve checkout UX** — fewer irrelevant options means fewer abandoned carts * **Meet local requirements** — show only gateways available in specific countries * **Coupon restrictions** — block gateways incompatible with specific promotions = Free features = * **Cart total** – Hide gateways when the order total is above, below, or between values * **Shipping destination** – Hide by shipping country and state/province * **Coupon applied** – Hide when any coupon or a specific coupon code is used * **User logged in** – Hide for guests or for logged-in users * **Product in cart** – Hide when specific products are in the cart * **Unlimited rules** – Create as many rules as your store needs * **Classic + Blocks checkout** – Full support for both checkout types * **Rule priority and enable/disable** – Fine-grained control over rule order * **Safe mode** – Rules only hide gateways, never reveal hidden ones * **HPOS compatible** – Works with WooCommerce High-Performance Order Storage = Upgrade to Pro = The [WooCommerce Conditional Payment Gateways Pro](https://nikanwp.com/product/woocommerce-conditional-payment-gateways/) plugin unlocks 8 additional condition types for advanced checkout control: * **Category in cart** – Hide when products from selected categories are in the cart * **Cart subtotal** – Hide based on subtotal before shipping and taxes * **Billing destination** – Hide by billing country and state/province * **Shipping method** – Hide when a specific shipping method is selected * **User role** – Hide for selected WordPress user roles (wholesale, subscriber, etc.) * **Product quantity in cart** – Hide based on quantity of specific products * **Date / time** – Hide on selected days and/or within a time window * **Currency** – Hide when the store currency matches selected currencies * **Debug logging** – Log rule evaluation to WooCommerce logs for troubleshooting * **Priority support** – Get help directly from the developer [Upgrade to WooCommerce Conditional Payment Gateways Pro →](https://nikanwp.com/product/woocommerce-conditional-payment-gateways/) = How it works = 1. Go to **WooCommerce → Conditional Payments** 2. Click **Add rule** and choose a condition type (e.g. "Cart total") 3. Set which payment gateways to hide when the condition matches 4. Save and test at checkout — no caching issues, no code changes needed = Example use cases = * Hide PayPal for orders over $500 — encourage bank transfer for large purchases * Hide Cash on Delivery when the cart contains digital products * Hide all gateways except Stripe for customers outside your country * Show only local payment methods when a specific coupon is applied = Documentation = [Full documentation →](https://nikanwp.com/product-docs/woocommerce-conditional-payment-gateways) == Installation == 1. Ensure **WooCommerce** is installed and active. 2. Upload the plugin folder to `/wp-content/plugins/` or install via **Plugins → Add New**. 3. Activate the plugin via the **Plugins** screen. 4. Go to **WooCommerce → Conditional Payments** to create your first rule. == Frequently Asked Questions == = Do I need WooCommerce? = Yes. This plugin requires WooCommerce to be installed and active. = Which condition types are available for free? = The free version includes 5 condition types: cart total, shipping destination, coupon applied, user logged in, and product in cart. You can create unlimited rules. Both classic and Blocks checkout are fully supported. = Does it work with the WooCommerce block checkout? = Yes. The plugin integrates with both the classic checkout and the block-based checkout (Checkout block) via the WooCommerce Store API. = Can I combine multiple conditions in one rule? = Each rule has one condition type (for example, "Coupon applied" or "Cart total"). To combine conditions, create multiple rules — they run in priority order and all matching rules are applied. = Will hiding a gateway affect other plugins that hide gateways? = This plugin uses the standard `woocommerce_available_payment_gateways` filter. With **Safe mode** enabled (default), it only hides gateways and never reveals ones that other plugins or WooCommerce itself have already hidden. = Is this compatible with HPOS (High-Performance Order Storage)? = Yes, fully compatible. = Does it work with custom or third-party payment gateways? = Yes. Any gateway registered with WooCommerce will appear in the rule editor and can be hidden conditionally. = Where can I get the Pro version? = You can purchase and download it at [WooCommerce Conditional Payment Gateways Pro](https://nikanwp.com/product/woocommerce-conditional-payment-gateways/). == Screenshots == 1. Rules list with priority ordering and enable/disable toggle 2. Condition template picker — choose from 5 free condition types 3. Rule editor with live sidebar preview 4. Settings == Changelog == = 1.0.0 = * Initial release. * Condition types: cart total, shipping destination, coupon applied, user logged in, product in cart. * Unlimited rules with priority ordering, enable/disable toggle, and safe mode. * Classic checkout and WooCommerce Blocks checkout support. * HPOS compatible.