How to conditionally disable or hide specific payment methods
Using the Conditional Payments for WooCommerce plugin, you can configure specific payment gateways to disable/hide only when certain conditions are met. Follow these steps:
1. Access Conditional Payments Rules: Navigate to WooCommerce > Settings > Payments > Conditions and click the Add New button.

2. Activate and Name the Rule: Turn on the rule status and provide a descriptive name, such as "Disable COD for Country Not Equal to US."

3. Set Conditions: Define the conditions under which the payment method will be shown. For example:
- Location-Based: Hide Cash on Delivery for country is not equal to US.

4. Add Disable Action: In the Actions section, select Disable Payment Methods and choose the gateway(s) to disable for the defined conditions.

5. Save and Apply: Save your changes. The rule will now dynamically disable the specified payment method under the defined conditions.

📌 Example Use Case #1: Hide Cash on Delivery for International Customers
Set the condition "Shipping Country ≠Your Local Country" and action "Disable Cash on Delivery" to ensure COD isn't available for international orders.
📌 Example Use Case #2: Restrict Credit Card Payments for High-Risk Products
For specific products like expensive electronics, set the condition "Product Category = Electronics" and disable "Credit Card" to reduce fraud risks.
📌 Example Use Case #3: Disable Bank Transfer for Small Orders
Create a rule with the condition "Cart Subtotal < $50" and disable "Direct Bank Transfer" to streamline low-value transactions.