How to set up advanced WooCommerce flat rate shipping (with dynamic parameters)
With advanced flat rate shipping in WooCommerce, you can create flexible shipping fees that are either fixed or dynamic, depending on cart values, product quantities, or percentages.
The Dotstore Flat Rate Shipping Plugin allows you to use special parameters like [qty]
, [cost]
, and [fee]
to set up dynamic shipping calculations.
In The Article
Why use dynamic flat rate shipping?
- Flexibility: Go beyond one flat charge — calculate fees per item, per order cost, or by percentage.
- Fair pricing: Charge customers proportionally to their order size.
- Control: Set minimum and maximum thresholds for fees.
- Custom scenarios: Handle both small and bulk orders accurately.
Configuration steps
1. Add a flat rate shipping method
- Go to Dashboard → Dotstore → Flat Rate Shipping.
- Click Add New Shipping Method.
- Give it a name, such as “Advanced Shipping”.
2. Add dynamic amount parameters
When you configure the shipping method, in the Cost field, you can use parameters instead of only numbers.
Available parameters:
[qty]
→ total number of items in the cart[cost]
→ cost of items in the cart (subtotal)[fee percent=10 min_fee=20]
→ apply a percentage fee with a minimum charge[fee percent=10 max_fee=20]
→ apply a percentage fee with a maximum charge
Test at checkout
Add product to the cart and check out the advanced shipping method prices based on quantity.
Ready to See All Features in Actions?
Access our complete advanced features instance, allowing you to configure every feature with real checkout scenarios.
Examples
Example 1: Flat fee shipping
- Input:
10.00
- Result: A flat $10 shipping fee is added to the cart, no matter the quantity or subtotal.
Example 2: Per-quantity shipping
Input:
10.00 * [qty]
Result:
- 5 items in cart → $10 × 5 = $50 shipping fee
- 2 items in cart → $10 × 2 = $20 shipping fee
Example 3: Percentage fee with minimum charge
Input:
[fee percent=10 min_fee=20]
Result:
- Cart subtotal = $50 → Fee = $20 (10% = $5, but minimum fee is $20)
- Cart subtotal = $300 → Fee = $30 (10% = $30, above minimum)
Example 4: Percentage fee with maximum cap
Input:
[fee percent=10 max_fee=20]
Result:
- Cart subtotal = $100 → Fee = $10 (10%)
- Cart subtotal = $500 → Fee = $20 (10% = $50, but maximum capped at $20)
Expected outcome
Once configured, WooCommerce will calculate the shipping fee dynamically based on your chosen formula. Customers will always see accurate, transparent, and fair shipping charges at checkout.