WooCommerce – Disable Payment Gateway for City and/or State

Commonly, we try to disable payment gateways by country. However, it’s possible that we sometimes need to disable them for a specific city or state. For example, if you’ve been swindled by customers from a specific city or state using stolen credit cards, then you may want to apply that change to your payment gateways to avoid it in the future.

That’s why in this article we want to show you how to disable a payment method for a specific city or state. We’ll do it using the Conditional Payment Gateways plugin.

With this plugin you don’t need to have any programming knowledge. You just need to create conditions for your gateways using some simple fields.

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 conditions.

1- Disable payment gateway for a specific city

If you want to disable a payment gateway for a specific city like NY for example, you need to create a new condition using these values:

  • Add new condition – Enter the new condition title
  • Condition 1 – Billing city or Shipping city = Select the city
  • What do you want to do – Disable the payment method(s)
  • Select the payment method(s) – Select the payment gateways you want to disable
  • Click on Publish

2- Disable payment gateway for a specific state

If you want to disable a payment gateway for a specific state, you need to create a new condition using these values:

  • Add new condition – Enter the new condition title
  • Condition 1 – Billing state or Shipping state = Select the state
  • What do you want to do – Disable the payment method(s)
  • Select the payment method(s) – Select the payment gateways you want to disable
  • Click on Publish

3- Disable payment gateway for both city and state

If on the other hand, you want to combine the condition to disable a payment gateway in a specific city like NY and also in a specific state like Florida, you need to create a condition with these values:

  • Add new condition – Enter condition title.
  • Condition 1 – Billing State or Shipping State = Select the state
  • Click on Add “Or” group
  • Condition 1 – Billing city or Shipping city = Select the city
  • What do you want to do – Disable the payment method(s)
  • Select the payment method(s) – Select the gateways you want to disable
  • Click on Publish

Done!

With the Conditional Payment Gateways plugin, it’s really simple to disable payment gateways for specific cities and/or states.

Leave a Reply

Close Menu