View Categories

Assign Payment Gateways by Product Category

To control which payment methods appear based on the product categories in the cart, use the Product Categories tab in Payment Methods by Product & Country for WooCommerce. This is a free feature. This guide shows how to set category rules for each gateway.

Per Product Categories tab showing Include and Exclude fields for each gateway

Open the Product Categories tab #

  1. Go to WPFactory > Payment Gateways per Products (also reachable at WooCommerce > Settings > Payment Gateways per Products).
  2. Open the Product Categories tab.
  3. Make sure Enable/Disable > Enable section is ticked (it is on by default).

Set Include and Exclude per gateway #

Every payment gateway enabled in WooCommerce appears here with two fields. You add categories to whichever field matches your goal:

  • Include: the gateway shows only when the cart contains a product from one of the selected categories. Leave it empty to ignore it.
  • Exclude: the gateway is hidden when the cart contains a product from one of the selected categories. Leave it empty to ignore it.

Both fields are select boxes: click a field and pick categories from the list. You do not type category names.

Important: For a given gateway and category, use either Include or Exclude, not both. Selecting the same category in both fields cancels out. As a rule, run a gateway in “allow all except” mode (use Exclude) or “hide all except” mode (use Include), but not both at once.

Example #

  • To keep Cash on Delivery off high-value electronics: add the Electronics category to that gateway’s Exclude field.
  • To sell a Wire transfer only category through Direct Bank Transfer alone: add that category to Direct Bank Transfer’s Include field, and add it to the Exclude field of every other gateway.

Click Save changes to apply. You can configure each gateway independently.

You can apply the same idea with product tags, and in Pro with individual products and billing countries.

Get more control #

Category rules are free. Payment Methods by Product & Country for WooCommerce Pro adds per-product, per-variation and per-country rules. See what Pro unlocks.

 

Payment Methods by Product & Country for WooCommerce