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.

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
The Conditions dropdown open on the Cart Specific group, with Cart Subtotal (Before Discount) selected, and Cart Subtotal (After Discount), Cart Quantity, Shipping Class, Coupon, Total Weight, Number Of Items, and Total Volume listed; Shipping Specific and Shipping Method are visible below
Figure - An older Cart Specific dropdown, which omits Cart Subtotal (Specific Products)

How to create the rule

  1. Go to WooCommerce > Settings > Payments, then open Conditions and click Add New. Turn on Status and enter a Rule Name.
  2. In Conditions, choose a cart field, an operator, and a value. The example uses Total Weight greater than 50.
  3. In Actions, choose Enable Payments Methods, Disable Payments Method, or in Pro Add Payment Method Fee. Click Save Changes, then test checkout.
A Total Weight condition with the operator Greater then ( > ) and a value of 50, plus an Add Payment Method Fee action for Cash on delivery titled Handling Fee, amount 10, and Standard tax class
Figure - A Total Weight rule that adds a $10 Handling Fee to Cash on delivery
Checkout for six Chaz Kangeroo Hoodie items, annotated as 60 lbs total weight, showing a $10.00 Handling Fee and Cash on delivery selected
Figure - A checkout page with a $10 Handling Fee when the cart weight is 60 lbs

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.

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