How to create a product-specific conditional payments rule in WooCommerce

Conditional Payments for WooCommerce lets you enable or disable payment methods based on what's in the cart, who's buying, and where they're located.

Product-specific rules do this at the product level. You pick the products, then decide which gateways show up at checkout.

Benefits

Product-specific payment rules can help you:

  • Keep risky or restricted payment methods away from the wrong products.
  • Limit a payment method to carts that contain only your approved items.
  • Set different payment options for clearance, fragile, or high-value products without touching your gateway settings.

How to Create a Product-Specific Conditional Payments Rule

Step 1: Add a new rule

Go to [WooCommerce → Settings → Payments → Conditions → Add New] and give the rule a name you'll recognize later.

Step 2: Choose a product condition

In the Conditions section, add a product-related condition. You can use:

  • Specific Products: apply the rule to selected products.
  • Variable Products: apply the rule to selected product variations.
  • Product Categories: target specific categories.
  • Product Tags: target products by tag.
  • Product Type: simple, variable, virtual, or downloadable products.
  • Product Visibility: shop only, hidden, featured.
  • Product Quantity: the quantity of a product in the cart.
  • Stock Status: in stock, on backorder


    Admin: Available product based conditions

Step 3: Use the Only Equal to ( == ) check

The new Only Equal to ( == ) option is available for Specific Products and Variable Products. Select it from the condition's comparison dropdown, then choose your products.

The rule matches when every item in the cart is one of the selected products. The cart doesn't need to contain all of them.

Selected products Cart contents Rule matches?
Hoodie, Cap, Mug Hoodie Yes
Hoodie, Cap, Mug Hoodie, Cap Yes
Hoodie, Cap, Mug Hoodie, Cap, Mug Yes
Hoodie, Cap, Mug Hoodie, Poster No
the Only Equal to ( == ) option selected in the condition dropdown, with products chosen

Step 4: Configure the actions

In the Actions section, choose which payment gateways to enable or disable when the condition is met.

Admin: Set category based conditional payments rule

Step 5: Save and test the rule

Save the rule, then add products to your cart and open the checkout page. Try one cart that should match and one that shouldn't, so you can see the difference.

Front: Checkout page with applied conditional payment rule

Example Use Cases

1. Cash on Delivery for Approved Items Only

If you offer COD only on a short list of local-delivery products, use Only Equal to ( == ) with those products. Any cart with an item outside the list won't see COD.

2. Only Allow COD for Clearance Items

Restrict payment to Cash on Delivery for products in the "Clearance" category.

3. Block PayPal for Fragile Items

Disable PayPal for products tagged as "Fragile" due to handling limitations.

4. Set Minimum Quantity for Specific Payment Options

Enable Bank Transfer only if the cart contains 10 or more quantities of a product.


Conclusion

Product-specific rules let you control payment methods per product. With the new Only Equal to ( == ) check, you can also require that the whole cart stays within your selected products before a rule applies.


FAQs

1. Does the cart need to contain every product I selected?

No. The cart can hold any combination of your selected products. The rule stops matching only when the cart includes something you didn't select.

2. Where can I use the Only Equal to ( == ) check?

It's available for the Specific Products and Variable Products conditions.

3. What happens if the cart has one product that isn't on my list?

The condition doesn't match, so the rule's actions don't apply to that cart.

4. Can I combine this with other conditions in the same rule?

Yes. You can add multiple conditions and actions to a single rule.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.