How to create cart weight-based conditional payments rule

You can show or hide payment methods, or add a fee, based on the total weight of the products in the cart. The current admin includes Total Weight in the Cart Specific group.

Create the rule at WooCommerce > Settings > Payments > Conditions.

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 Total Weight, an operator such as Greater than ( > ), and a weight threshold (for example, 25).
  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 set to Greater than 25, with an Add Payment Method Fee action for Cash on delivery titled Heavy Cart Surcharge, amount 10, and Standard tax class
Figure - A Total Weight rule that adds a $10 Heavy Cart Surcharge to Cash on delivery
Checkout for seven Chaz Kangeroo Hoodie items, annotated as 28 kg total weight, showing a $10.00 Heavy Cart Surcharge and Cash on delivery selected
Figure - A checkout page with a Heavy Cart Surcharge when the cart weight is 28 kg

Pro Tips

  • The condition field in the screenshot does not show a unit. The checkout annotation in the example uses kilograms. Use the same weight unit your products use in WooCommerce.
  • You can combine Total Weight with Shipping Method in the same rule if you need a narrower match.
  • The fee title in the example is Heavy Cart Surcharge. That title is what customers see at checkout.

Common Use Cases

1. Hide Cash on Delivery for a heavy cart

Use Total Weight above your logistics limit with Disable Payments Method for Cash on delivery.

2. Add a heavy-cart surcharge (Pro)

Use Total Weight Greater than ( > ) your threshold with Add Payment Method Fee, as in the example above.

FAQs

1. Which condition do I use for cart weight?

Total Weight, in the Cart Specific group.

2. What does the example rule do?

It adds a $10 Heavy Cart Surcharge to Cash on delivery when Total Weight is greater than 25.

3. Is the surcharge 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.