View Categories

Optimize Checkout with Payment Rules by Product

Payment Methods by Product & Country 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

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. Get Payment Gateways per Products Pro.

 

Payment Methods by Product & Country for WooCommerce