Shipping classes are a great way to setup different rules and pricing for items in your shop. Usually due to weight or size, some of these items may ship for little or no cost to you. Because of this, shipping class priorities allow you to change the terms based on the highest priority item in the cart.
Using the Per Order Condition
Often when customers are purchasing multiple items, you can fit the smaller items in the same box as the larger items. However, if they order only smaller items, you still need to be compensated for the small box and postage price. In this example, our shop owner manages a boutique that sells dresses and jewelry online. When purchased alone, jewelry will need to ship in a small box. But when purchased with a dress, the two items can ship together, and thus the jewelry ships at a much lower rate.
The first step is to setup the priorities for your shipping classes. Beneath your table of rates is a list of shipping classes already created. For this example, I have two classes: Jewelry and Dress. Every product in my shop has been assigned to one class or the other.
As you can see in the image above, the Dress shipping class has a higher priority number than Jewelry. Priorities are placed from highest to lowest, so the higher the number, the higher the priority.
In the image below I have used our shipping classes to setup the costs for shipping. Jewelry alone will ship in a small box for $4.99. Dresses, however, will ship in a large envelope at $7.95. If the customer orders from both classes, the shipping will remain at $7.95 as the jewelry can be added to same flat rate envelope.
Pay special attention to the Identifier column in the table. This specifies the unique ID for the shipping option we are returning to the customer. It is important that these values match so that the plugin understands that one row is overriding the other. If the values are different, the plugin will think these are two options for the customer, and both will be returned.
Using the Per Class Condition
Shipping class priorities also come into play when the Condition setting is set to Per Class. By default, this type of calculation will find a cost for each shipping class in the cart and add them together into one shipping cost. However, enabling the Single Class Only option will allow you to charge the cost of the highest priority class in the cart. It is similar to the example above using the Per Order condition. However, it allows you to set additional criteria on just that group of items rather than the entire cart.
For more information on why this might be useful and to view an example, please read Single Class Only Option.