---
title: Assign Payment Gateways by Product Category
description: Control which WooCommerce payment methods appear based on the product categories in the cart.
url: "https://wpfactory.com/docs/gateways-product-categories/"
updated: "2026-09-27"
category: How to
tags:
  - "Payment Methods by Product & Country for WooCommerce"
---

# 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](https://wpfactory.com/item/payment-gateways-per-product-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](https://wpfactory.com/wp-content/uploads/article2-1-1024x451.png)](https://wpfactory.com/wp-content/uploads/article2-1.png)

### 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.

### Related

You can apply the same idea with [product tags](https://wpfactory.com/item/payment-gateways-per-product-for-woocommerce/), and in Pro with individual products and billing countries.

### Get more control

Category rules are free. [Payment Methods by Product & Country for WooCommerce](https://wpfactory.com/item/payment-gateways-per-product-for-woocommerce/) Pro adds per-product, per-variation and per-country rules. [See what Pro unlocks](https://wpfactory.com/item/payment-gateways-per-product-for-woocommerce/).

Related articles

- [Assign Payment Gateways to Individual Products](https://wpfactory.com/docs/assigning-gateways-products/)
- [Assign Payment Gateways by Product Tag](https://wpfactory.com/docs/managing-gateways-tags/)
- [Configuring Payment Gateways per Products: Settings Overview](https://wpfactory.com/docs/configuring-payment-gateways/)
- [Payment Gateways Not Showing for Assigned Products or Categories](https://wpfactory.com/docs/payment-gateways-not-showing/)
- [How to Set Payment Gateways per Product in WooCommerce: Installation](https://wpfactory.com/docs/payment-gateways-products/)

 

[![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/)
