---
title: Optimize Checkout with Payment Rules by Product
description: Show only the right WooCommerce payment gateways for each product with Include and Exclude rules and a fallback gateway.
url: "https://wpfactory.com/docs/boost-checkout-gateways/"
updated: "2026-09-27"
category: Pro Features
tags:
  - "Payment Methods by Product & Country for WooCommerce"
---

# Optimize Checkout with Payment Rules by Product

[Payment Methods by Product & Country for WooCommerce](https://wpfactory.com/item/payment-gateways-per-product-for-woocommerce/) controls which payment gateways appear at checkout through tabs at WPFactory > Payment Gateways per Products: Product Categories and Product Tags (free), and Products and Countries (Pro). Each gateway has Include and Exclude fields, and Pro users can enable a fallback gateway for conflicting carts.

[![Payment Gateways per Products settings with Include and Exclude fields](https://wpfactory.com/wp-content/uploads/article2-1-1024x451.png)](https://wpfactory.com/wp-content/uploads/article2-1.png)

### The rule sections

Rules live in these tabs at **WPFactory > Payment Gateways per Products** (also reachable at **WooCommerce > Settings > Payment Gateways per Products**):

- **Product Categories** (free): show or hide each gateway based on the categories in the cart.
- **Product Tags** (free): the same, based on product tags.
- **Products** (Pro): rules for individual products and variations.
- **Countries** (Pro): restrict gateways to specific billing countries.

Each section is turned on with its own **Enable section** checkbox. There is no single master switch for the plugin.

### Include and Exclude

Inside each section, every gateway has an **Include** and an **Exclude** field:

- **Include** shows a gateway only when a matching item is in the cart.
- **Exclude** hides a gateway when a matching item is in the cart.
- Leaving both empty means the gateway is not affected by that section.

For any one gateway and term, choose Include or Exclude, not both.

### Advanced Options: the fallback gateway

In the **General** tab, Pro users can enable a **Fallback gateway**. It appears only when your rules would otherwise leave a cart with no available payment method, for example a mixed cart where each product allows a different, non-overlapping gateway. Enable it, then choose the gateway to fall back to. This is not a "default gateway": it is shown only in the zero-gateway conflict case.

### Advanced Options: Add filter

The **Add filter** option (`alg_wc_pgpp_advanced_add_hook`) sets when the plugin registers its gateway filter: *In constructor*, *On "init" action* (default), or *On "wp_loaded" action*. Change it only if gateways are not filtering correctly with your theme or another plugin.

### A worked example

- Keep all gateways available for everyday products.
- In Product Categories, add *High value* to Cash on Delivery's Exclude field so it never shows for expensive items.
- In Products (Pro), add one premium item to Direct Bank Transfer's Include field, and to the Exclude field of the other gateways, so it can only be paid by bank transfer.

### Ready to set this up?

Per-product and per-country rules and the fallback gateway are Pro features of [Payment Gateways per Products](https://wpfactory.com/item/payment-gateways-per-product-for-woocommerce/). [Get Payment Gateways per Products Pro](https://wpfactory.com/item/payment-gateways-per-product-for-woocommerce/).

Related articles

- [Pro Rules: Products, Tags and Countries](https://wpfactory.com/docs/products-tags-countries/)
- [Set Payment Methods from the Product Edit Page](https://wpfactory.com/docs/woocommerce-payment-methods-product-edit-page/)
- [Payment Methods by Product & Country: Reset a Settings Section](https://wpfactory.com/docs/payment-gateways-reset-a-settings-section/)
- [Payment Methods by Product & Country: Developer Hooks and Filters Reference](https://wpfactory.com/docs/payment-gateways-developer-hooks-filters/)
- [Checkout Shows No Payment Methods or Keeps Loading](https://wpfactory.com/docs/checkout-no-payment-methods/)

 

[![Payment Methods by Product & Country for WooCommerce](https://wpfactory.com/wp-content/uploads/Payment-Methods-by-Product-Country-for-WooCommerce.webp)](https://wpfactory.com/item/payment-gateways-per-product-for-woocommerce/)
