This doc explains all the features and possibilities of the ‘Cost per category’ feature of the Advanced Pricing section of the Advanced Shipping for WooCommerce plugin.

Shipping Cost Per Category

The ‘Cost per category’ functionality allows you to add shipping cost based on the category, including functionality to setup rules based on the category quantity (default), subtotal or weight. The Min/Max and Fee fields all are very flexible and have different ‘modifier characters’ available to extend its functionality.

Al rules configured in this section are designed to add (or deduct) shipping cost to the shipping rate, it however does not determine if a shipping rate will show or not.

The Category Field

The ‘Category’ field is very simple and straight forward. The category where you’d like to apply the rule for can be selected.

All rules are only based on the directly selected category, it does not automatically include parents or child categories.

The ‘Min/Max’ Fields

The ‘Min’ and ‘Max’ fields by default are based on the selected category quantity. There are special ‘modifier characters’ that allow changing this behaviour to be based on category weight or subtotal.

Both fields are optional to be entered, when left empty the fee for that category will always be applied when the selected category is present in the cart. When either one is left empty there will simply be no minimum/maximum accordingly.

Setting Shipping Cost Based On Category Quantity

The default behaviour of the Min/Max fields is based on the category quantity that is present in the cart. This allows you to easily and quickly configure shipping cost based on the category quantity. Here’s a sample setup with 3 rules that start with no minimum, and ends with no maximum threshold.

Setting Shipping Cost Based On Category Weight

Using a ‘w’ modifier character in the Min/Max fields allows for changing its behaviour from category quantity to category weight. This way you can configure shipping cost based on the selected category weight that is present in the cart.

Setting Shipping Cost Based On Category Subtotal

Using a dollar sign ‘$’ modifier character the behaviour of the Min/Max fields can be changed to be based on the selected category subtotal.

Note that it is always a dollar sign, no matter your store’s currency.

The ‘Fee amount’ Field

The ‘Fee amount’ field also has different modifier keys to allow for flexible configuration of added shipping cost based on the category.

Flat Fee

When entering any valid numeric value it will be charged as a flat fee. Adding a minus sign (-) will deduct value from the shipping rate cost.

Example value: 10 – Add $10 to the shipping rate cost
Example value: -10 – Deducting $10 from the shipping rate cost

Cart Subtotal Percentage

With a percentage sign (%) you can configure a percentage charge based on the cart subtotal.

Example value: 10% – Adding 10% of the cart subtotal

Category Subtotal Percentage

A double percentage (%%) can be used to add a category subtotal based percentage to the shipping rate cost.

Example value: 10%% – Adding 10% of the category subtotal

Cost per (Category) Item

With the asterisk (*) character you multiply the provided value with the present cart quantity of the selected category, allowing you to configure a cost per category item.

Example value: 10* – Adding $10 per item that has the selected category

Additional Cost per (Category) Item

A bit more advanced feature of the ‘Cost per category item’ is ‘Additional cost per category item’. This will allow you to configure a cost such as “$1 for each item after the first 5”, giving a easy way to configure a base cost for the first 5 items, and additional cost per item after that.

The ‘Min quantity’ field value is used to determine the quantity after which this cost per item should be applied to. Below a table with different example configurations and the cost it would add to illustrate this.

Min quantity Max quantity Fee amount Category quantity Shipping cost added
5 1** 8 $3
5 2.5** 8 $7.5
6 10** 12 $60

Cost per Interval

With the cost ‘Cost per interval’ feature you’re able to configure a shipping cost like; “Add $4 for every 12 category items”. This can be a incredibly useful feature to offer such shipping and don’t want to manually configure these rules based on the quantity.

There are two ways this can be setup, the difference between them is the rounding up / down.

Cost per Interval Rounding Up

To setup a cost per category quantity interval that rounds up you can use a forward slash character (/). Setting a value like 4/12 translates to “Charge $4 for every 12 items, rounding up”. The rounding up part means that when there’s a quantity in the cart that isn’t divisible by 4 it will charge it as a full interval and add the $10.

Below a table that illustrates different examples and how it will be charged.

Fee amount Category quantity Shipping cost added
4/12 1 $4
4/12 11 $4
4/12 12 $4
4/12 13 $8
4/12 24 $8

Cost per Interval Rounding Down

The rounding down variant of the cost per category quantity interval can be configured using a back slash (\). Setting a value like 4\12 translates to “Charge $4 for every 12 items, rounding down”.

This table illustrates the different cost being added based on the quantity, with the same fee amount configuration.

Fee amount Category quantity Shipping cost added
4\12 1 $0
4\12 11 $0
4\12 12 $4
4\12 13 $4
4\12 24 $8