How to create cart-specific conditional payments rule
Cart-specific rules control payment methods based on cart attributes such as subtotal, quantity, weight, coupons, or shipping class.
Create the rule at WooCommerce > Settings > Payments > Conditions. Use the field names from the current Cart Specific group.
In The Article
Cart-specific conditions
The current Cart Specific group includes:
- Cart Subtotal (Before Discount) and Cart Subtotal (After Discount)
- Cart Subtotal (Specific Products) (in the current admin; an older dropdown screenshot may omit this)
- Cart Quantity
- Shipping Class
- Coupon
- Total Weight
- Number Of Items (item count, not the total quantity of units)
- Total Volume
How to create the rule
- Go to WooCommerce > Settings > Payments, then open Conditions and click Add New. Turn on Status and enter a Rule Name.
- In Conditions, choose a cart field, an operator, and a value. The example uses Total Weight greater than 50.
- In Actions, choose Enable Payments Methods, Disable Payments Method, or in Pro Add Payment Method Fee. Click Save Changes, then test checkout.
Pro Tips
- The operator in the example screenshot is spelled Greater then ( > ). Enter the same comparison you need from the operator list in your admin.
- Number Of Items counts unique line items, not the total units. A cart with 2 products and 10 units each is 2 items.
- The fee fields in the screenshot (method, title, amount with a $ / % selector, and tax class) do not have visible labels. Existing documentation calls them Fee Title, Amount, and Tax Settings.
Common Use Cases
1. Add a handling fee for a heavy cart (Pro)
Use Total Weight above your limit with Add Payment Method Fee, as in the example above.
2. Hide PayPal for a low subtotal
Use Cart Subtotal (Before Discount) below a set amount with Disable Payments Method for PayPal.
3. Enable Direct bank transfer for bulk quantities
Use Cart Quantity with Enable Payments Methods for Direct bank transfer.
FAQs
1. Which cart conditions are in the current admin?
Cart Subtotal (Before Discount), Cart Subtotal (After Discount), Cart Subtotal (Specific Products), Cart Quantity, Shipping Class, Coupon, Total Weight, Number Of Items, and Total Volume.
2. What does the example rule do?
It adds a $10 Handling Fee to Cash on delivery when Total Weight is greater than 50.
3. Is the handling fee available in the free plugin?
No. Add Payment Method Fee is a Pro action.