Use Cases - Conditional Payments for WooCommerce Plugin
These examples show how you can use Conditional Payments for WooCommerce to control payment methods at checkout. Each one is a rule with a Status, Rule Name, Conditions, and Actions, created at WooCommerce > Settings > Payments > Conditions.
The screenshots below are from the existing guide. Action labels in those screenshots include Enable Payments Method, Disable Payments Method, and Add Payment Method Fee. The current rule form shows Enable Payments Methods (plural) for the enable action.
In The Article
- Use case 1: Allow only COD for a specific product
- Use case 2: Add a handling fee when cart weight exceeds 20 kg
- Use case 3: Hide Direct Bank Transfer when the cart subtotal exceeds $200
- Use case 4: Hide COD for customers in the United Kingdom
- Use case 5: Disable all payment methods for a specific product
- Pro Tips
- FAQs
Use case 1: Allow only COD for a specific product
Sometimes a product is a better fit for Cash on Delivery only. You can create a rule so that product uses only that payment method.
Example: A retailer selling fragile items such as glassware prefers Cash on Delivery for accountability.
In the example rule, Rule Name is “Enable COD for Special Product”. The condition is Product Equal to ( = ) a glassware product. The actions are Disable Payments Method for Direct bank transfer and Check payments, and Enable Payments Method for Cash on delivery.
Use case 2: Add a handling fee when cart weight exceeds 20 kg
Heavier orders can cost more to handle. In Pro, you can add a fee to a payment method when the cart weight is above a limit.
Example: A furniture store adds a $5 handling fee when the cart is heavier than 20 kg.
In the example rule, Rule Name is “Add Handling Fees When Cart Weight Exceeds 20kg”. The condition is Total Weight greater than 20. The action is Add Payment Method Fee for Cash on delivery, with the title Handling Fees, an amount of 5, and the Standard tax class.
Use case 3: Hide Direct Bank Transfer when the cart subtotal exceeds $200
For higher-value orders, you might prefer not to offer Direct Bank Transfer. You can hide that method when the cart subtotal is above a set amount.
Example: An electronics store hides Direct Bank Transfer for orders over $200 to avoid payment delays.
In the example rule, Rule Name is “Hide Direct Bank Transfer When Cart Subtotal > $200”. The condition is Cart Subtotal (Before Discount) greater than 200. The action is Disable Payments Method for Direct bank transfer.
Use case 4: Hide COD for customers in the United Kingdom
Cash on Delivery may not be a good fit for some regions. You can hide it for a billing country such as the United Kingdom.
Example: A seller hides Cash on Delivery for the United Kingdom to reduce the risk of failed deliveries.
In the example rule, Rule Name is “Disable COD for Country UK”. The condition is Country Equal to ( = ) United Kingdom (UK). The action is Disable Payments Method for Cash on delivery.
Use case 5: Disable all payment methods for a specific product
Sometimes you need to stop a product from being purchased with the payment methods currently available in your store, for example while a vendor requires a method you have not set up yet. You can disable the payment methods for that product and show a custom message.
Example: A drop-shipping store disables payments for a vendor-exclusive product until another payment method is configured.
In the example rule, Rule Name is “Disable All Payment Methods for Specific Products”. The condition is Product Equal to ( = ) a specific product. The action is Disable Payments Method for Direct bank transfer, Check payments, and Cash on delivery. Set no payment methods message is set to “There are currently no available payment methods for this product to checkout.”
Pro Tips
- Create each example at WooCommerce > Settings > Payments, then open Conditions by clicking Add New.
- Match the condition and action to the checkout you want to test, then place a test order.
- When you hide every payment method, always fill in Set no payment methods message so customers are not left with a blank payment section.
- You can combine Disable Payments Method and Enable Payments Methods in the same rule, as in the Cash on Delivery-only product example.
FAQs
1. Where do I create these use-case rules?
Go to WooCommerce > Settings > Payments, then open Conditions and click Add New. Add a Rule Name, turn on Status, set the Conditions and Actions shown in the example, and click Save Changes.
2. Which action hides a payment method?
The existing use-case screenshots use Disable Payments Method, then the method to hide, such as Direct bank transfer or Cash on delivery.
3. How do I show a message when no payment methods are left?
Use the Set no payment methods message field on the rule form (Pro). The product example uses: “There are currently no available payment methods for this product to checkout.”
4. Is the handling-fee example available in the free plugin?
Add Payment Method Fee and Set no payment methods message are Pro features. Showing and hiding payment methods with enable or disable actions is available in the free version.