Creating shipping classes

Most stores will have a couple of products that are different in size, shape, or weight from the rest of the products, and trying to create one set of rules for all of your products can be a bit tricky. You might end up not estimating enough for some orders and estimating too much for other orders. Neither one is good for your business.

To help store owners, WooCommerce has shipping classes that allow you to group your products. With multiple groups you can create different shipping rules for each group, which will give you much more accurate shipping estimates. These shipping classes are used throughout WooCommerce. They're used in Flat Rate Shipping (which is included in WooCommerce) and some of the WooCommerce extensions like Table Rate Shipping.

Getting ready

Make sure you already have at least one product in your store.

How to do it…

The first thing we have to do is create our shipping classes by performing the following steps:

  1. From the WordPress admin, go to Products | Shipping Classes.
  2. Fill out the Name field.
  3. Optionally fill out the Slug, Parent, and Description fields. These aren't used by WooCommerce unless you're doing custom coding.
  4. Click on Add New Shipping Class.

    We've created one shipping class. Repeat this for as many shipping classes you need. Once you're done creating shipping classes, we have to add them to our products.

  5. In the main WordPress menu, click on Products and then navigate to one of your products.
  6. Scroll down to the Product Data tab.
  7. Click on the Shipping tab.
  8. Select the class from the Shipping Class dropdown.

There's more...

Your product now has a shipping class. This won't change anything until you add special rules for that shipping class. You can do that in Flat Rate Shipping, Table Rate Shipping, and more.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset