WooCommerce – Disable Payment Gateway for Specific Products

In a previous article, we taught our users how to disable a payment method for a complete product category in WooCommerce. However, we got an email from a user asking us about the possibility to disable a payment gateway for a specific group of products that are not integrated in any category or that belong to a category that contains other products for which they don’t want to disable the payment method.

For example, if you have a Fashion category in your store, it may include all kinds of fashion items. However, you want to disable a payment gateway for some specific products in that category.

Therefore, we’ll show you how to disable a payment gateway for specific products using the Conditional Payment Gateways plugin.

Install the plugin

When you create conditions with this plugin, your payment gateways will be active when the conditions are met and inactive when the conditions aren’t met

Open the plugin

Once you open the plugin, you’ll find a screen containing the Add condition button, which you need to click on in order to create the condition to disable a payment method for all the Shirts.

Disable payment gateway for specific products

You need to use these values to disable a payment gateway for specific products:

  • Add new condition – Enter condition title.
  • Conditions 1: Contains product = Select product
  • Click on Add “Or” group
  • Conditions 1: Contains product = Select product
  • Click on Add “Or” group
  • Conditions 1: Contains product = Select product
  • Click on Add “Or” group
  • What do you want to do: Disable the payment method(s)
  • Enabled payment gateways – Stripe
  • Click on Publish

Done!

Now all your selected products will be excluded from the selected payment gateway. It’s so simple, right?

Leave a Reply

Close Menu