# Conditions and shipping classes - Rateline 1.x documentation

> Match rules by weight, number of items or subtotal, and by shipping class.

The **When**, **From**, **To** and **Shipping class** columns decide whether a rule matches an order.

## Conditions

| When | Measures | Example |
|---|---|---|
| **Always** | Nothing: the rule matches every order (that fits its shipping class) | A catch-all last rule |
| **Weight** | The order's weight, in your store's unit: each product's weight × its quantity, added up | 0–5 lbs, 5–20 lbs, over 20 lbs |
| **Number of items** | The quantities in the cart, added up | 1–3 items, 4 or more |
| **Subtotal** | The line totals after coupons, including tax when your store shows prices with tax | Over $150 |

**From** and **To** are both included, and either can be empty:

- From empty, To 5: 5 or less
- From 5, To 20: 5 up to and including 20
- From 20, To empty: 20 or more

Decimals can use a comma or a point. Only items that need shipping count: virtual products are left out.

> [!NOTE]
> Bands that share an end, like 0–5 and 5–20, are fine: an order of exactly 5 matches the first, because it's higher in the table.

## Shipping classes

Shipping classes are WooCommerce's way to group products that ship alike: "Bulky", "Fragile", "Small parcel". Create them under **WooCommerce → Settings → Shipping → Classes** and set one on each product's **Shipping** tab.

A rule's **Shipping class** column can be:

- **Any**: the class doesn't matter.
- **No shipping class**: the order has at least one item without a class.
- A class: the order has at least one item of that class.

The rule's cost is for the whole order. So a rule for "Bulky" at the top of the table prices every order with a bulky item, bulky or not:

| When | Shipping class | Cost | Label |
|---|---|---|---|
| Always | Bulky | 49 | Freight delivery |
| Weight up to 5 | Any | 6.95 | |
| Weight 5–20 | Any | 9.95 + 0.50 per lb | |

An order with a sofa and a mug ships by freight for $49; an order with only mugs ships by weight.

> [!TIP]
> Pricing each class on its own and adding the costs up ("$49 for the sofa, plus $6.95 for the mugs") is what **Per shipping class** in Rateline Pro does.

Source: https://www.extendiment.com/plugins/rateline/docs/1.x/conditions-and-shipping-classes
