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.
In The Article
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 Total Weight, an operator such as Greater than ( > ), and a weight threshold (for example, 25).
- 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 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.