WooCommerce: Disable Payment Gateway for Specific User Role

Want to disable WooCommerce payment gateway by specific user role? Maybe you want to enable a payment method for vendors or wholesalers and disable it for customers. For example, you want wholesalers to pay with bank transfer since those are greater amounts of money, and want to disable bank transfer for normal customers.

Or maybe you want registered users to be able to use payment methods that guest customers will not be able to use. For example, you may want to allow registered customers only to pay using a credit card. In that case, guest customers (all those without an account in your site) won’t be able to pay with credit card.

Read on because we will show you step by step how you can add conditional restrictions to your WooCommerce payment methods, to set that certain user roles will not be able to use specific payment methods.

1- Install WooCommerce Conditional Payment Gateways

We’ll use the WooCommerce Conditional Payment Gateways. It allows you to add conditions to enable or disable payment gateways based on those conditions. For example, as you’ll see in this tutorial, you can enable or disable payment methods based on the user role.

After installing and activating the plugin, you need to create a new condition to disable specific payment methods for specific user roles.

2- Disable payment gateway for specific user role

To create the new condition that will allow you to disable a payment gateway for a specific user role, you need to go to WooCommerce > Conditional Payment Methods.

Once there, you need to click on the Add condition button.

Note – You can enable or disable conditions using the Enable conditions checkbox.

In this example, we will disable the use of credit card for guest customers. This means only registered customers will be able to use a credit card to pay for their purchases.

For this, we need to select the following values in the new condition we’re creating.

  • Add/Edit condition: You need to add the condition title in this field.
  • What happens when the conditions are met: Disable payment method(s)
  • Select the payment method(s): Here we need to add the payment method we will disable for specific user role.
  • Now you need to add the condition. In Condition 1, you need to select User role = Guest customer.
  • After selecting these values, you need to click on Publish.

Remember that this is just an example. You can follow the same steps to disable a specific payment gateway for wholesalers or vendors.

3- See the results

Now, when registered customers go to the checkout page to pay for their purchases, they will be able the Credit Card (Stripe) method.

However, when guest customers try to pay for their purchases on your store, they won’t be able to use the Credit Cart (Stripe) payment method because it’s been disabled for that user role.

As you can see, disabling WooCommerce payment gateways for specific user roles is easy with the WooCommerce Conditional Payment Gateways plugin.

You can find more tutorials on the WooCommerce Conditional Payment Gateways plugin here.