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.
In The Article
How to disable a payment method
- Go to WooCommerce > Settings > Payments, then open Conditions and click Add New.
- Turn on the Status toggle and enter a Rule Name, such as “Disable COD for Country Not Equal to US.”
- 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.
- In Actions, choose Disable Payments Method and select the method to hide (for example, Cash on delivery). Click Save Changes.
- Test checkout with a country that should hide the method and one that should still show it.
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.