How to conditionally disable or hide specific payment methods

Use a Conditional Payments for WooCommerce rule to hide a payment method only when certain conditions are met. You create the rule at WooCommerce > Settings > Payments > Conditions, then add a Disable Payments Method action.

How to disable a payment method

  1. Go to WooCommerce > Settings > Payments, then open Conditions and click Add New.
  2. Turn on the Status toggle and enter a Rule Name, such as “Disable COD for Country Not Equal to US.”
  3. In Conditions, define when the method should be hidden. The example uses Country Not Equal to ( != ) United States (US). In the current admin, Country is in the Billing Address group.
  4. In Actions, choose Disable Payments Method and select the method to hide (for example, Cash on delivery). Click Save Changes.
  5. Test checkout with a country that should hide the method and one that should still show it.
WooCommerce Settings Payments tab showing a Payment methods and Conditions sub-nav, the Conditional Payments Rules list, and an Add New button
Figure - The Conditional Payments Rules list, with Add New
The Edit Conditional Payments Rules form with Status on and the Rule Name Disable COD for Country Not Equal to US
Figure - Status and Rule Name on the rule form
A Country condition set to Not Equal to United States (US), with an Add Condition button
Figure - A Country condition that matches any country except the United States
The Actions section with Disable Payments Method selected and Cash on delivery chosen
Figure - A Disable Payments Method action for Cash on delivery
Checkout with Country / Region set to Australia, showing Direct bank transfer and Check payments, with an annotation that COD is hidden because the country is not the United States
Figure - A checkout page for Australia with Cash on Delivery hidden

Pro Tips

  • The current admin lists Country under Billing Address. An older use-case wording that says “Shipping Country” is not confirmed in the current dropdown; a Shipping Address group appears only in older documentation screenshots.
  • If the rule can hide every method, also fill in Set no payment methods message.
  • Use a Rule Name that states the method and the condition.

Common Use Cases

1. Hide Cash on Delivery outside your country

Use Country Not Equal to ( != ) your local country and Disable Payments Method for Cash on delivery, as in the example above.

2. Restrict a method for a product category

Use Product Categories with Disable Payments Method for a method you do not want to offer on a category such as electronics.

3. Hide Direct bank transfer for small orders

Use Cart Subtotal (Before Discount) below a set amount, then Disable Payments Method for Direct bank transfer.

FAQs

1. Which action hides a payment method?

Disable Payments Method, then the method or methods to hide.

2. Is the Country condition billing or shipping?

In the current admin, Country is in the Billing Address group. Older documentation also shows a Shipping Address group with its own Country field. That group is not visible in the current dropdown screenshot.

3. Why does the first screenshot say Payment methods?

That screenshot uses an older Payment methods | Conditions sub-nav. The current admin shows General | Conditions.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.