WooCommerce – Enable Payment Method for Corporate Customers Only

If you have corporate customers and want to activate a payment gateway to be used exclusively by them, you may be wondering about which PHP code you can use to apply that change.

However, in this entry we want to show you that you don’t necessarily need to use codes, you just need to install and activate the WooCommerce Conditional Payment Gateways plugin.

This plugin allows you to create conditions for your payment gateways; for example, restrict a payment method in a country, enable a payment method just for a country, etc.

Open the Conditional Payment Gateways plugin

When you open the plugin, you’ll see the Create condition button, which you need to hit in order to add conditions to your payment methods.

Here we show you three different options you have in order to enable a payment gateway for your corporate customers.

Solution 1: Identify customers by billing company

We will enable the payment method when the billing company is not empty. For this, you need to create a condition using these values:

  • Add new condition – Enter the title you want to assign to your condition.
  • Condition – Billing company – != (Not equal) – Leave this field empty
  • What do you want to do – Enable Payment Method(s)
  • Enabled payment gateways – Select the payment gateway you want to enable
  • Click on Publish

Solution 2: Identify customers by corporate emails

You can also enable a payment method for users who don’t use a free email address. For  example, you can enable a payment method for all users who don’t use Gmail, Yahoo, Hotmail, Outlook, Zoho, etc.

  • Add new condition – Enter condition title.
  • Conditions 1: Customer email – Not contains – gmail.com
  • Click on Add “Or” group.
  • Conditions 2: Customer email – Not contains – outlook.com
  • Click on Add “Or” group.
  • Conditions 3: Customer email – Not contains – zoho.com
  • Click on Add “Or” group.
  • Conditions 4: Customer email – Not contains – yahoo.com
  • What do you want to do: Enable the payment method(s)
  • Select the payment methods: Select the payment gateway you want to enable
  • Click on Publish

IMPORTANT. We’ve just shown you some of the free email services. You may select as many as you want.

Solution 3: Identify customers by shipping company

Finally, you can enable a payment gateway for all users whose Shipping Company is not empty. Just create a condition with these values:

  • Add new condition – Enter the new condition title
  • Condition – Billing company – != (Not equal) – Leave this field empty
  • Enabled payment gateways – Select the payment gateway
  • Click on Publish

Done!

Now the payment gateway(s) you have selected will be enabled for your corporate customers only. As you can see, it’s really simple and fast.