WooCommerce – How to Disable Payment Method for a Country

What if you want to allow PayPal for all countries except for the Unites States? It is impossible to do that without using a php code, unless you use the WP Conditional Payment Gateways plugin.

This plugin allows you to restrict or allow payment methods using several conditions; for example, show a payment method according to the total order, disable a payment method according to the product being purchased, disable a payment method for a country, etc.

It’s really simple and you only need to use some fields to add these conditions.

Once installed, go to WooCommerce > Conditional Payment Gateways.

1- Create a new condition

Once you open the plugin, you’ll see the Enable conditions checkbox and the Add condition button. So, hit the button to add a new condition.

2- Disable a payment method for a country

Once in the condition manager, you need to take these steps to disable a payment gateway like PayPal for the United States (US):

  • Enter the Condition title in the Add new condition field
  • Conditions: Billing country or Shipping country Not equal to — United States (US) or the country where you want to restrict the payment gateway.
  • In Payment gateways, add PayPal or the payment gateway you want to disable.

Important: You need to use Not equal to because that means the payment gateway will be enabled in all countries except in the one you select.

This was so simple and fast!

As you saw, with this plugin you don’t have to use any code. Just use the fields the plugin provides, and you can create this and many other conditions for your payment gateways.

Deja un comentario

Cerrar menú