WooCommerce Shipping Classes: Group Products for Smarter Shipping Rates
What Are Shipping Classes?
Shipping classes are product groupings that determine shipping costs within WooCommerce's flat-rate shipping method. Think of them as tags that tell WooCommerce "this product costs more to ship than that product."
Without shipping classes, flat-rate shipping charges the same amount for every product. That works if you sell a single product type — say, all t-shirts — but falls apart when your catalog includes items with wildly different shipping costs. A greeting card and a dining table shouldn't cost the same to ship.
Shipping classes solve this by letting you assign products to groups (e.g., "Small Items," "Bulky Items," "Fragile") and set different shipping rates for each group within your flat-rate shipping method.
Setting Up Shipping Classes: Step by Step
Step 1: Create Shipping Classes
Go to WooCommerce → Settings → Shipping → Shipping Classes. Click "Add shipping class." You'll need a name, a slug (auto-generated from the name), and an optional description.
Create classes based on your actual shipping cost structure. Common examples:
By size: Small (envelope), Medium (shoebox), Large (furniture-size), Oversized
By handling: Standard, Fragile, Hazardous, Temperature-controlled
By weight tier: Light (under 1kg), Medium (1-5kg), Heavy (5-20kg), Freight (20kg+)
By product type: Digital (free shipping), Accessories, Clothing, Equipment
Step 2: Assign Classes to Products
Edit any product → scroll to "Product Data" → click the "Shipping" tab. You'll see a "Shipping class" dropdown with all the classes you created. Select the appropriate one. Products without a class assigned use the "No shipping class" rate (which you'll set in the next step).
For bulk assignment, go to Products → select multiple products → Bulk Actions → Edit. You can set the shipping class for all selected products at once. Alternatively, if you import products via CSV, include a "shipping_class" column with the class slug.
Step 3: Configure Flat Rate Shipping with Class Costs
Go to WooCommerce → Settings → Shipping → select a shipping zone → edit (or add) a Flat Rate shipping method. You'll see your standard flat-rate cost field, plus additional fields for each shipping class you've created:
"Small Items" shipping class cost: e.g., $3.00
"Bulky Items" shipping class cost: e.g., $15.00
"No shipping class" cost: e.g., $5.00 (default for products without a class)
Step 4: Choose the Calculation Type
This is where most people get confused. WooCommerce offers two calculation types for how shipping classes interact in a cart with multiple products:
Per class: Charges the cost for each unique shipping class in the cart. If a customer buys one "Small Item" ($3) and one "Bulky Item" ($15), shipping is $18. This is the most common choice.
Per order: Charges only the highest shipping class cost. Same cart: shipping would be $15 (the higher of $3 and $15). Use this if you want to absorb the cost of smaller items when a large item is already in the cart.
Shipping Class Cost Formulas
WooCommerce shipping class costs support basic math formulas, not just fixed amounts. This is one of the least-documented but most useful features:
[qty] × amount: Multiply by quantity. Example: [qty] * 2.50 charges $2.50 per item in that class.
[fee percent="X"]: Percentage of the cart subtotal. Example: [fee percent="5"] charges 5% of the order total for that class.
[fee percent="X" min_fee="Y"]: Percentage with a minimum. Example: [fee percent="5" min_fee="3"] charges 5% but at least $3.
[fee percent="X" max_fee="Y"]: Percentage with a cap. Example: [fee percent="5" max_fee="20"] charges 5% but no more than $20.
These formulas work in the base flat rate cost field AND in shipping class cost fields. You can mix and match — $5 flat for standard items plus [qty] × $3 for bulky items.
Shipping Classes with Table Rate Shipping
WooCommerce's built-in flat rate shipping with classes is powerful enough for simple stores. But when you need weight-based rates, destination-based pricing, or complex conditional logic, shipping classes become the foundation for table rate shipping plugins.
Table rate shipping plugins extend WooCommerce's built-in classes with additional rules. For example, with the WooCommerce Table Rate Shipping extension ($119/year from Woo.com), you can create rules like:
- "Bulky Items" class + weight over 10kg + shipping to Zone 2 = $25.00
- "Small Items" class + any weight + shipping to Zone 1 = $3.00
- "Fragile" class + any destination = $12.00 flat (special handling)
The key point: shipping classes you create for flat rate shipping carry over to table rate plugins. You don't need to recreate them. This makes shipping classes a foundational setup step regardless of which shipping method you ultimately use.
For more complex scenarios involving conditional rules based on cart contents, coupons, or user roles, explore conditional shipping rules.
Real-World Examples
Example 1: Clothing + Accessories Store
Classes: "Clothing" (standard packaging), "Accessories" (small box/envelope), "Shoes" (larger box)
Rates: Clothing = $5.95, Accessories = $2.95, Shoes = $7.95
Calculation: Per order (highest class wins — if they buy shoes, don't charge extra for the socks in the same order)
Free shipping threshold: $75+ orders ship free (handled separately via Free Shipping method with minimum amount)
Example 2: Home Goods Store
Classes: "Small Decor" (ships in box), "Furniture" (freight/white glove), "Fragile" (glass, ceramics — extra packaging)
Rates: Small Decor = $8.00, Furniture = [fee percent="10" min_fee="25"], Fragile = $12.00
Calculation: Per class (customer pays for each type — furniture shipping is expensive and can't be absorbed)
Note: Furniture uses a percentage fee because shipping a $200 side table costs less than shipping a $2,000 sofa. The 10% with $25 minimum scales appropriately.
Example 3: Supplements + Health Products
Classes: "Standard" (bottles, small boxes), "Temperature Controlled" (probiotics, certain vitamins), "Subscription" (special handling for recurring orders)
Rates: Standard = $4.99, Temperature Controlled = $9.99, Subscription = $0 (free shipping for subscribers)
Calculation: Per order — subscription items always ship free, and if they add a standard item, it rides along free too. Temperature controlled overrides if it's the highest class cost.
Common Mistakes and How to Avoid Them
Forgetting the "No shipping class" cost: If any product doesn't have a shipping class assigned, it uses the "No shipping class" cost in your flat rate settings. If you leave this at $0, those products ship free — probably not what you want. Always set a default "No shipping class" cost.
Creating too many classes: Every shipping class adds complexity. If you need more than 5-6 classes, you probably need a table rate plugin instead of trying to force flat rates to do complex calculations.
Ignoring per-zone configuration: Shipping classes are set globally, but the costs are set per-zone, per-method. If you have 3 shipping zones and 2 flat rate methods, you need to configure class costs in 6 places. Missing one means unexpected pricing in that zone.
Not testing cart combinations: Add one product from each class to your cart and verify the total makes sense. Then try multiples. Then try mixed carts. The calculation type (per class vs. per order) can produce surprising results with certain product combinations.
Confusing classes with zones: Shipping zones handle WHERE you ship (geographic regions). Shipping classes handle WHAT you ship (product types). They work together but serve different purposes. You need both configured correctly.
Keep reading
Related guides you might find useful
WooCommerce Table Rate Shipping: The Complete Setup Guide
Flat rate shipping loses you money on heavy items and overcharges on light ones. Here's how to set up table rate shipping in WooCommerce by weight, price, or destination.
Read guideShippingWooCommerce Free Shipping Threshold: How to Set the Right Minimum Order
Free shipping increases AOV — but set the threshold wrong and it kills your margins. Here's the math for finding your store's sweet spot.
Read guideShippingWooCommerce Shipping Zones Explained: Setup, Strategy, and Common Mistakes
Shipping zones are WooCommerce's most misunderstood feature. Here's how they actually work, how to set them up properly, and the mistakes that cost you sales.
Read guideLevel up your WooCommerce store
Join the WPBundle waitlist and get beta access to our plugin suite completely free.
Join the Waitlist