In this article, we will show you how to allow a specific payment gateway for your wholesale customers using your WooCommerce powered store. Allowing a better experience for both your customers and wholesale customers.

Prerequisites

Setup Your Payment Gateways For WooCommerce

This method requires all payment gateways to be activated inside your WooCommerce settings. We will then use a code snippet to disable these payment gateways for non-wholesale customers. You may do the following steps to enable a payment gateway for WooCommerce:

  1. Login to your WordPress dashboard and navigate to your WooCommerce settings.
  2. Navigate to the Payment Tab to enable your payment gateways.
  3. Enable all your payment gateways you want to offer all your customers.
  4. Save your settings

Your WooCommerce payment settings may look something similar to this:

Example screenshot of payment gateway setup for WooCommerce.

Code Recipe

The below code will hide payment gateways for wholesale customers. Please adjust line 18 of the code recipe to hide specific payment gateways for regular customers. In our case, only the Check Payments will be an available payment option for wholesalers.

Once this code is added to your site, wholesale customers won’t be able to see all payment options. You can easily reverse this logic to hide payment options for regular customers. If you need assistance with this, please do not hesitate to reach out to our support team or leave a comment below.

Photo by Michael Longmire on Unsplash