How to Set WooCommerce Shipping Rates Based on Boxes: Step-by-Step Guide

box packing WooCommerce
Author Bartosz Gajewski
Reading time:
6 minutes read

In this article, we will guide you through the process of setting up box packing in WooCommerce. You’ll learn how to create a box packaging profile, configure box sizes, and set up shipping rates based on box packing. By the end of this article, you will have all the information needed to set up shipping rates based on box packing and optimize your shipping process.

Shipping costs in WooCommerce can be determined based on many factors, including weight, number of products, and product size. Regardless of the calculation method, all products eventually go into packages that are priced by courier companies. Therefore, one of the best ways to charge shipping in WooCommerce is by box-based calculation.

You can set WooCommerce shipping rates based on boxes in four steps:

  • Step 1: Install the Flexible Shipping Box Packing plugin in your WooCommerce store
  • Step 2: Add and configure shipping boxes in the plugin’s settings
  • Step 3: Add the Flexible Shipping methods to your Shipping Zone
  • Step 4: Add shipping cost based on previously configured boxes and their quantity

I will go through all the steps indicated to describe each of them in as much detail as possible.

Step 1: Install the Flexible Shipping Box Packing plugin in your WooCommerce store

Parcel-based shipping cost calculation is not one of WooCommerce’s default features. It offers only a flat rate shipping method, which will not be sufficient in this case. As usual, it is recommended to use a reliable plugin that will offer exactly what you need. In this case, I recommend the Flexible Shipping Box Packing WooCommerce plugin. It’s a new Add-on to the most popular WooCommerce table rate shipping plugin – Flexible Shipping.

Flexible Shipping Box Packing WooCommerce £49

Add to cart or View Details
Plugins used by 228,939+ shops
Last Updated: 2023-05-10
Works with WooCommerce 7.4 - 7.7.x

Flexible Shipping Box Packing WooCommerce plugin allows you to use the advanced box packing algorithm to fit the ordered products into your shipping boxes. Additionally, you can use it to configure the shipping cost based on the type and number of the used shipping boxes.

Please have in mind that it’s not a stand-alone plugin. To work properly, it requires the free version of Flexible Shipping plugin to be installed and active. It also integrates flawlessly with the Flexible Shipping PRO to configure more advanced shipping scenarios.

Step 2: Add and configure shipping boxes in the plugin’s settings

Having the plugins installed and activated, it’s time to add the first shipping box in your WooCommerce store. To do so, go to WooCommerce shipping settings (WooCommerce → Settings → Shipping), and then click on Flexible Shipping Box Packing.

flexible shipping box packing at woocommerce-settings

You’ll be redirected to the General Settings screen with the shipping boxes table:

flexible shipping box packing configuration screen

Add shipping boxes

As you can see, there’s no shipping boxes yet. Use the Add box button to configure the first shipping box.

You will be redirected to the individual shipping box configuration screen with all the available options.

box packing woocommerce shipping box configuration

To properly configure a shipping box in WooCommerce, you need to provide a set of information about the particular box. It is based on this information that the box packing algorithm will match the products in the shopping cart with the right boxes. Let’s go through each of them.

  • Box name – the name of the box that will be displayed in the Shipping boxes table and the shipping rules in the shipping method. Use a unique name for easy identification. It’s only for the WooCommerce Admin, and your clients won’t be aware of the name.
  • Length/Width/Height – the exact dimensions of the shipping box. It is best to measure them on the outside of the box, without any padding.
  • Max weight – the maximum weight for that box. In most cases, shipping carriers have specific weight limits for packages, and this setting allows you to specify a limit for that package. This means that if the products in the shopping cart fit into the box but their weight exceeds the limit specified here, the packaging algorithm will not put them in that package.
  • Empty box weight – the weight of the box itself. Please note that it will be added to the total weight of the products in the cart.
  • Padding – the box’s inner padding, which will be subtracted from the space available to pack the products.

Be aware that your current WooCommerce settings affect the measurement units shown in the box configuration fields. You can change them at WooCommerce → Settings → Products → General → Measurements.

Once all the fields have been completed, click the Save changes button to confirm the addition of a new shipping box.

Configure all boxes

To configure the remaining shipping boxes in your shop, use the same instructions. The best way is to set up all the boxes you use in your store’s warehouse. It is also a good idea to double-check all the dimensions you have entered to avoid box packing errors.

All boxes with their dimensions will be visible on the Flexible Shipping Box Packing plugin settings page.

box packing woocommerce configuration example

Having all the boxes configured and saved, it’s time to move to the next step.

Step 3: Add the Flexible Shipping methods to your Shipping Zone

To do so, you need to configure your shipping options. Simply navigate to WooCommerce → Settings → Shipping. Then, choose the particular shipping zone you wish to include the feature in. If you don’t have them, you can just create shipping zones according to your geographic region using our advanced tutorial.

Then, in the shipping zone where you want to define shipping based on boxes, add a new WooCommerce shipping method. To add a shipping method, click the Add shipping method button:

Add shipping method: Flexible Shipping

Pick the Flexible Shipping and again click the Add shipping method button.

Your shipping method should now be added and active. You need to configure it now.

new flexible shipping method

You can customize method title, description, and any other feature that is offered, such free shipping over a certain amount or setting shipping tax status.

Step 4: Add shipping cost based on previously configured boxes and their quantity

Scroll down to the Shipping Cost Calculation Rules table after you’ve configured that.

The Flexible Shipping Box Packing WooCommerce plugin offers two shipping conditions:

Box type – this calculation type enables setting up shipping costs to depend on the kind of boxes used to package and send the requested goods.

set WooCommerce shipping cost based on box type

Number of boxes – this calculation type enables the shipping cost to be based on the quantity of boxes used to ship the goods.

set WooCommerce shipping cost based on number of boxes

With both options, you can configure the Flexible Shipping cost calculation rules according to your shipping requirements. Suppose you have two types of packaging in your store. It costs $10 to ship the smaller one and $15 to ship the larger one. You can easily set up such a scenario with one method like this:

example of WooCommerce shipping cost based on box type

With this configuration, the packing and shipping rate algorithm will work as follows:

If all the products in the shopping cart fit into Box #1, the total shipping cost will be $10. However, if for some reason (the size of the products or their total weight) they do not fit into it, but fit into Box #2, the shipping price will be $15. The box packing algorithm allows you to accurately determine the shipping cost depending on the products in your shopping cart.

You can configure shipping fees in the same way for other shipping methods and all of your WooCommerce shipping zones.

Bonus: Usage examples

Additional cost per shipping box

One of the most common cases in which a store owner overpays for shipping is when the products in the shopping cart do not fit in one package, and he has to pay for another package. To avoid such a situation, you can use the additional cost option available in the Flexible Shipping Box plugin.

Let’s say you have a single universal package configured to ship most of the products in your WooCommerce store. You can easily configure additional fee per each box like that:

additional cost per each shipping box

With this configuration, every time the packaging algorithm places products in the shopping cart for more than one package, $5 will be added to the total shipping cost.

Fallback for no matching shipping boxes

The Flexible Shipping Box Packing plugin allows you to set shipping rates in the situation when box packing algorithm fails to match products to any of the packages configured in your store. To do so, in the Box type condition, choose No matching boxes.

Fallback for no matching shipping boxes

This way, you can simply configure fallback for no matching shipping boxes, or use it to offer Local pickup shipping method for the orders that won’t fit into any of your boxes.

Advanced shipping calculators

With the PRO version of the Flexible Shipping plugin, you can combine shipping calculations based on boxes with all others available in this plugin, such as shipping classes, line item or item cost.

Flexible Shipping PRO WooCommerce £89

The best Table Rate Shipping for WooCommerce. Period. Create shipping rules based on weight, order totals or item count.

Add to cart or View Details
100,000+ Active Installations
Last Updated: 2023-03-29
Works with WooCommerce 7.2 - 7.6.x

The Importance of Box Packing for WooCommerce

Box packing is a shipping strategy that optimizes the use of space in shipping boxes. It involves measuring the dimensions of the products being shipped and arranging them in the most efficient way possible to minimize space. By optimizing the use of space in shipping boxes, you can reduce the number of boxes needed to ship products, which in turn reduces shipping costs.

In WooCommerce shop, box packing is a feature that allows you to optimize your shipping process by configuring box sizes, assigning products to boxes, and calculating shipping rates based on box packing. By using box packing, you can ensure that your shipping process is optimized, and you’re not overpaying for shipping.

Best Practices for the Optimal Packing Process

To optimize your packing process, follow these best practices:

  1. Measure the dimensions of each product you’re shipping.
  2. Choose the appropriate box size for each product.
  3. Arrange the products in the box in the most efficient way possible.
  4. Fill any space in the box with packing material, such as bubble wrap or packing peanuts.
  5. Seal the box securely.
  6. Test your box packing process regularly.
  7. Use WooCommerce tools, such as Flexible Shipping Box Packing plugin, to calculate shipping cost based on boxes and optimize your box packing process.
  8. Use box-based shipping rates to ensure that your shipping rates are accurate.

By following these best practices, you can optimize your box packing process and reduce shipping costs for your WooCommerce store.


In this article, I have shown you how to set up WooCommerce shipping rates based on boxes. As you can see, with the right tool like the Flexible Shipping Box Packing plugin, it’s not a demanding project. Properly setting shipping fees on a per-box basis can allow you to save on shipping by offering customers the most accurate shipping rates possible, so that neither you nor your customers overpay for shipping.


Notify of
Inline Feedbacks
View all comments

Check out our case studies

Dream Home Story
Furniture shipping via WooCommerce – Dream Home’s Case Study

Learn how to configure custom shipping rules for furniture orders – from heavy and bulky to small and light.

4 minutes read
Vitrek’s Story

Read Octolize Case Study about Vitrek – a provider of innovative global solutions for High Voltage Test and Measurement.

2 minutes read
EnglishSpeakingMum’s Story

Read Octolize Case Study about EnglishSpeakingMum – Polish dedicated and involved parenting blogger.

2 minutes read

Join over 10,000 subscribers

Stay up to date and get WooCommerce tips & Octolize news right to your inbox!