WooCommerce: Create Tiered Shipping by Product Category
If you run a WooCommerce store, you might want to charge different shipping rates based on product categories. For example, electronics might have a different shipping cost than clothing, or you might want to offer tiered shipping rates depending on the category and order quantity. WooCommerce doesn’t provide tiered shipping by category out of the box, but with a few simple steps, you can set this up quickly.
Quick Fix: Use Shipping Classes and Shipping Zones with Rules
- Create shipping classes corresponding to your product categories.
- Assign these shipping classes to products in each category.
- Set up shipping zones and add flat rate shipping methods.
- Configure tiered shipping costs per shipping class using cost formulas.
This approach leverages WooCommerce’s built-in shipping classes and flat rate shipping method cost formulas to simulate tiered shipping by product category without custom coding.
Why This Happens
WooCommerce’s default shipping system calculates shipping costs based on shipping zones and methods. Shipping classes allow grouping products for shipping cost differentiation, but WooCommerce does not natively support tiered or quantity-based shipping rates by category. By assigning shipping classes that mirror categories and using cost formulas, you can create tiered shipping rates that vary by category and quantity.
This method works because the flat rate shipping method supports cost formulas using placeholders like [qty]
(quantity of items) and [cost]
(base cost). By combining these with shipping classes, you can create tiered costs per category.
Step-by-step: Create Tiered Shipping by Product Category
- Create Shipping Classes
- Go to WooCommerce > Settings > Shipping > Shipping classes.
- Click Add shipping class for each product category you want to tier. For example:
- Electronics
- Clothing
- Books
- Save shipping classes.
- Assign Shipping Classes to Products
- Go to Products > All Products.
- Edit each product and assign the appropriate shipping class under the Shipping tab.
- Update products.
- Set Up Shipping Zones
- Go to WooCommerce > Settings > Shipping > Shipping zones.
- Create or edit a shipping zone that applies to your customers (e.g., United States).
- Add a Flat rate shipping method to this zone.
- Configure Tiered Shipping Costs Per Shipping Class
- Click Edit on the flat rate shipping method.
- Set the Cost field for the base rate (e.g.,
5
for $5 base shipping). - Expand the Shipping class costs section.
- For each shipping class, enter a cost formula that applies tiered rates. For example:
- Electronics:
10 + ([qty] - 1) * 3
(first item $10, each additional $3) - Clothing:
5 + ([qty] - 1) * 1.5
(first item $5, each additional $1.50) - Books:
3 + ([qty] - 1) * 1
(first item $3, each additional $1)
- Electronics:
- Save changes.
- Test Your Setup
- Add products from different categories to your cart.
- Verify the shipping cost updates according to your tiered rules.
Edge Cases and Additional Tips
- Multiple Categories per Product: WooCommerce shipping classes are single-select, so if a product belongs to multiple categories, assign the shipping class that best fits your shipping cost strategy.
- Combining Shipping Classes: WooCommerce sums shipping class costs by default, so if your cart contains multiple classes, the total shipping cost will be the sum of each class’s tiered cost.
- Free Shipping Thresholds: To offer free shipping for certain categories or order totals, add a Free shipping method to your shipping zone with conditions.
- Using Plugins: For more complex tiered shipping rules (e.g., weight, volume, or mixed conditions), consider plugins like Table Rate Shipping or Advanced Shipping Packages.
Works On
Environment | Compatibility |
---|---|
Web Servers | Apache, Nginx, LiteSpeed |
Control Panels | cPanel, Plesk, DirectAdmin |
WooCommerce Versions | WooCommerce 3.0 and above |
WordPress Versions | WordPress 5.0 and above |
FAQ
- Can I set different tiered shipping rates for multiple categories in one order?
Yes. WooCommerce sums the shipping costs for each shipping class in the cart, so tiered rates per category will combine automatically.
- What if a product belongs to multiple categories?
Since shipping classes are single-select, assign the shipping class that best matches the shipping cost. For complex cases, consider plugins that support multiple shipping classes or custom rules.
- Can I use weight or dimensions in tiered shipping calculations?
Not with the default flat rate method. For weight or dimension-based tiered shipping, use advanced shipping plugins like Table Rate Shipping.