Sell by weight, length or area in WooCommerce.

Customers buy exactly 1.25 kg of cheese, 2.6 m of fabric or 3.33 m² of flooring. The price is per unit, the total updates as they type, and stock goes down by the exact amount.

  • v1.0.3
  • WooCommerce 10.1 – 11.2, WordPress 6.7+
  • 30-day refund on a first licence
Aged mountain cheese by the kilogram: unit beside the field, quick amounts and the live total
Moorland wool carpet cut to size: length x width gives the area and the exact price
Cart block: decimal quantities with units, unit prices and exact line totals
Checkout block: measured quantities and unit prices in the order summary

The problem

Why WooCommerce cannot do this on its own

WooCommerce counts quantities in whole items. The quantity field on the product page and in the cart accepts 1, 2 or 3, and stock is stored and reduced as whole numbers.

Shops that sell by weight or length therefore usually pick one of three workarounds. They differ a lot in what the customer sees and in what happens to stock.

Three ways to sell by measure

ApproachHow it worksTrade-off
One variation per amountVariations such as 250 g, 500 g and 1 kg, each with its own price.No free amounts. Stock has to be split or managed by hand.
Extra input fieldThe quantity box is hidden and a custom field asks for the amount; a price formula adds a surcharge.The order line still says 1 item. Stock is not reduced by the real amount.
True decimal quantitiesWhat Sell by Measure doesThe quantity itself becomes 1.25 (kg). Price, cart, order and stock all use the real amount.Needs a plugin that also handles stock, the cart blocks and the Store API correctly.

Sell by Measure for WooCommerce

How it works

  1. 01

    Pick a unit

    In Product data > Sell by measure, choose one of 15 units (kg, g, lb, oz, m, cm, ft, yd, in, m², ft², L, ml, gal, fl oz). The regular price becomes the price of one unit.

  2. 02

    Set the rules

    Step (up to 4 decimals), minimum, maximum, default amount and up to 8 quick-amount buttons, per product or as category defaults.

  3. 03

    Sell

    Customers type 1.25 or tap "500 g", see the live total, and the exact amount flows through cart, checkout, order and stock.

What you get

Decimal quantities

Weight, length, area or volume, with the amount snapped to your step.

Live price

The total updates on the product page as the customer types or taps a quick amount.

Length × width

For m² and ft² products, customers enter length and width and get the area.

Exact stock

Stock is kept in the sale unit (125.5 kg). Orders reduce it exactly, cancellations restore it.

Blocks and classic

Works with the Cart and Checkout blocks, the classic shortcodes, the Store API and HPOS.

Shipping weight

Enter the weight of one unit; WooCommerce multiplies it by the quantity.

Made for

  • Cheese, meat and deli
  • Coffee, tea and spices
  • Fabric and ribbon
  • Cable, rope and chain
  • Flooring and tiles
  • Paint and liquids

Sell by Measure for WooCommerce

Screenshots

Why WooCommerce needs a plugin to sell by weight

WooCommerce quantities are whole numbers by default. A developer can loosen that with a filter, but the storefront, cart, block checkout, stock, order screen and Store API all need matching work. Most calculator plugins take another route: they keep quantity 1 and change the price. The order then says "1 × Cheddar", and stock does not fall by what you sold.

Sell by Measure uses real decimal quantities. The order holds 1.3 kg, stock goes from 10 to 8.7 kg, and the WooCommerce REST and Store APIs report 1.3. Whatever reads your orders, from invoice plugins to e-mails, sees the true amount.

What the customer sees

  1. The product page shows "/ kg" after the price, a quantity field with the unit, and buttons such as 250 g, 500 g and 1 kg.
  2. A live total updates while they type: "Total: $16.24 (1.25 kg at $12.99 / kg)". Dots and commas both work.
  3. For flooring or fabric sold by area, they enter length and width, and the quantity is the area rounded up to your step.
  4. In the block or classic cart, + and − move by the step, with Unit price and Size rows under the line.
  5. Checkout, confirmation, My Account and e-mails show "× 1.3 kg", the unit price and the size.

Add to cart on product lists adds the default amount. Length × width products show Enter size and open the product page, and sized lines cannot be changed in the cart, since the customer adds a new size instead. Products sold per piece stay per piece: 1.5 mugs are rejected.

Setting it up

In Product data, under Sell by measure, choose a sale unit. The regular price becomes the price of one unit. There are 15 units: kg, g, lb, oz, m, cm, ft, yd, in, m², ft², L, ml, gal and fl oz.

Sell by measure product fields
FieldExampleMeaning
Quantity step0.05Up to 4 decimals. Empty means 0.01.
Minimum / maximum0.1 / 5Per cart line. Stock still applies.
Default quantity0.5Shown on load, and added from lists.
Quick amounts0.25, 0.5, 1, 2Up to 8 buttons.
Length x widthOnm² and ft² only.

For a whole department, set these once on the category: products set to Use the category default take the settings of their first category with a unit. Choose Whole items to exempt a product.

Keep stock in the sale unit, decimals allowed. For shipping, enter the weight of one unit: 1 kg for a product sold per kg, and WooCommerce multiplies by the quantity.

Where WooCommerce itself sets limits

  • The stock-hold note of a block checkout can say "× 1" for 1.3 kg, because WooCommerce holds stock for unpaid block checkouts in whole numbers. The real reduction is exact.
  • WooCommerce Analytics stores items sold as integers, so "items sold" shows whole numbers. Revenue is exact.
  • Fixed product coupons apply per unit of quantity: $1 off × 2.5 kg = $2.50. Percentage and cart coupons work as usual.
  • Variations use the parent’s unit and limits. Each variation has its own price per unit.
  • With Product Personalizer, products with measured quantities pay the fee once per cart line.

Decimal quantities or a price calculator?

Three ways to sell measured goods on WooCommerce
Variations (250 g, 500 g)Price calculatorSell by Measure
Any amountNoYesYes, to your step
Order quantityWholeUsually 1The real amount
Stock in real unitsPer variationOften notYes, decimal
Length × widthNoYesYes
Multi-dimension formulasNoOftenLength × width only

For a few fixed pack sizes, variations are free and enough. A dedicated calculator can be better if you need volume or complex formulas. Choose real quantities when stock accuracy and readable orders matter. Our sell-by-weight guide compares the approaches.

Food stores can pair it with the Pantry theme, which styles its quantity box and live total. Rugs and flooring suit Hearth. EU E-Invoicing takes decimal quantities and units as well. Get Sell by Measure on the store.

Compatibility

WooCommerce 10.1 to 11.2 on WordPress 6.7 or newer, PHP 7.4 to 8.3. It supports HPOS, Cart and Checkout blocks, block and classic themes, and Store API. There are no template overrides, and two small scripts load only where needed. Simple and variable products are supported. Settings stay on uninstall unless you tick Remove data on uninstall.

Example setups by product type

Suggested starting values
ProductUnitStepQuick amounts
Cheese or delikg0.050.25, 0.5, 1
Coffeeg50250, 500, 1000
Fabricm0.11, 2, 5
Rope or cablem0.55, 10, 25
Flooringm²0.01Length × width on
PaintL0.250.75, 1, 2.5

Set a minimum that matches how you actually cut or weigh. A step of 0.001 kg looks precise, but if your scales or staff work in 50 g steps, offer those. Round numbers also make the live total easier to read on a phone.

For cut goods, say on the page whether you sell one continuous piece. Two orders of 2 m and 3 m may not be the same as one length of 5 m.

Delivery matters too. Weight-based shipping needs the weight of one unit on the product, and bulky rolls may need a shipping class of their own.

WooCommerce

Sell by Measure for WooCommerce at a glance

Sell products by weight, length, area or volume with decimal quantities, unit prices, step/min/max and a live price on the product page (HPOS + Cart/Checkout blocks).

Price
$39 one-time
Version
1.0.3
Compatible with
WooCommerce 10.1 – 11.2, WordPress 6.7+
PHP
7.4 – 8.3
Licence
One store, no subscription, 12 months of updates
Refund
30-day refund on a first licence

WooCommerce

The WooCommerce products stores buy first

The most requested products on this platform. Each one has its own page, and you can buy it straight on the sales site.

Shop WooCommerce on our sales site

Prices, licences, full documentation and instant downloads are on the store.

woocommerce.kaviolabs.com · 7 plugins · 11 themes

Sell by weight

The same feature on other platforms

Built natively for each platform, not ported. Each version has its own product page, documentation and price.

Guide

Related guide

Guide

Selling by weight compared

How five platforms handle 1.25 kg or 2.5 m, the usual workarounds and what to check before you choose.

Read the guide

FAQ

Questions and answers

Can WooCommerce sell by weight without a plugin?

Only with workarounds such as one variation per amount. WooCommerce itself counts quantities and stock in whole items.

Does it work with the block checkout?

Yes. Sell by Measure supports the Cart and Checkout blocks, the classic shortcodes, the Store API and High-Performance Order Storage (HPOS).

Can I mix products sold by measure with normal products?

Yes. Only products with a sale unit use decimal quantities; every other product keeps whole quantities.

What about variable products?

Variations use the parent product’s unit and limits. Each variation has its own price per unit, and the live total follows the selected variation.

What if I uninstall the plugin?

Orders are never changed. Without the plugin WooCommerce treats quantities as whole numbers again, so finish open orders with decimal quantities first.

Are coupons per kilo?

Fixed product coupons apply per unit of quantity, the same as for 2 pieces. Percentage and cart coupons work as usual.

Why does Analytics show whole numbers?

WooCommerce Analytics stores items sold as integers. Revenue is exact.

Can customers enter length and width?

Yes, for m² and ft² products. The quantity is the area rounded up to your step.

Can I set this per category?

Yes. Category defaults have the same fields, and products can inherit them or opt out.

Start selling by the kilo, the metre or the square metre

See the product, cart and admin screens and read the documentation on the product page.

Kavio Labs

Also by Kavio Labs

The same standards, the same support desk and one licence portal on every platform we build for.