How to enable 'Cost on Product’ extra fee rules and set quantity limits?
The ‘Cost on Product’ fee rule allows you to automatically charge an additional fee based on the range of product quantity added in the cart. This fee is calculated product quantity range, making it useful for covering packaging, handling, or other item costs.
In the article
- How it works
- Steps to configure the rules
- Step 1: Enable the extra fee rules
- Step 2: Set quantity-based extra fee limits
- Step 3: Set the extra fee amount
- Step 4: Save and test
- Example 1: Packaging extra fee based on quantity range
- Example 2: Apply a 2% processing extra fee on special products (If less than 5 units)
How it works
When you create a fee rule with Apply Fee On → Cost on Product, the plugin checks how many products are in the cart and applies fees based on the selected product range.
You can set a minimum and maximum quantity condition to control when the fee applies:
Minimum Quantity: The fee will only apply if the customer buys at least this many units.
Maximum Quantity: The fee will not apply if the customer exceeds this number of units.
👉 Example: If you set the Minimum Quantity = 5, Maximum Quantity = 10 and the Fee = $1
➡️ A customer buying 4 products → No fee will apply.
➡️ A customer buying 6 products → Fee = $1.
➡️ A customer buying 12 products → No fee will apply (because it exceeds the maximum quantity).
Steps to configure the rules
Step 1: Enable the extra fee rules
- Go to WooCommerce → Extra Fees Plugin → Add New Fee Rule.
- Enter a title/name for your fee (example: Packaging Fee).
- Under Apply Fee On, select “Cost on Product” from the dropdown.
Step 2: Set quantity-based extra fee limits
- Go to the “Cost on Product” section.
- Set the Minimum Quantity (example: 5 → fee applies only if customer buys at least 5 units).
- Set the Maximum Quantity (optional → leave blank if no upper limit).
Step 3: Set the fee amount
- Enter the Fee Type: choose Fixed or Percentage.
- Enter the Fee Amount (example: $1 for a specific product range).
Step 4: Save and test
- Click Save Rule.
- Go to your store and add products to the cart.
- Check that the fee is applied once the product quantity meets the set limit.
Example 1: Packaging extra fee based on quantity range
Quantity Range | Fee Applied |
---|---|
1 to 6 units | $0 (No extra fee) |
7 to 12 units | $5 Package Fee |
13 to 18 units | $10 Package Fee |
19 units and above | $21 Package Fee |
How it works:
When a customer buys between 7 and 12 units, a $5 package fee is added automatically. If they buy 13 to 18 units, the fee increases to $10. For orders of 19 or more units, the package fee is set at $21. No fee is applied for orders of 1 to 6 units.
Example 2: Apply a 2% processing extra fee on special products (If less than 5 units)
Condition | Fee Applied |
---|---|
Purchasing fewer than 5 special product units | 2% Processing Fee |
Purchasing 5 or more special product units | No extra fee |
How it works:
This rule applies only to selected “special products.” If a customer purchases fewer than 5 units of these products, a 2% processing fee is added to the order total. If they buy 5 units or more, no extra fee is applied.