The Unit Price feature allows you to automatically calculate and display price per unit (e.g. price per 100g, per liter, etc.).
Step 1: Configure Unit Types #
First, you can manage or add unit types from:
Appearance → Customize → WooCommerce → General
Inside the Unit Types section (repeater field), you can define measurement units used for pricing.
Each unit type includes:
- Label – Visible name on the frontend (e.g. Gram, Kilogram, Liter, Ounce).
- Unit Short Code – Short identifier (e.g. g, kg, ml, l, pcs, oz). Do not use spaces.
- Base Unit – Units must share the same base for correct calculations (e.g. g for both g and kg).
- Conversion Multiplier – Defines conversion to base unit (e.g. 1 kg = 1000 g → 1000, 1 oz ≈ 28.3495 g).

Many unit types are already predefined. You can add new ones if needed.
Step 2: Enable Unit Price on Product #
When editing or creating a product, go to:
Product Data → General
- Enable Unit Price – Enable automatic unit price calculation.
- Product Quantity – Enter total quantity (e.g. 500 for 500g or 500ml).
- Unit Type – Select the unit (e.g. gram, liter, piece).
- Reference Quantity – Define comparison unit (e.g. 100 for price per 100g).
- Reference Unit – Select unit for reference (must match base type).

Final Step #
After completing these fields, simply enter the product price. The unit price will be calculated and displayed automatically.
Tip: Unit pricing is especially useful for grocery, food, and bulk product stores where customers compare prices based on quantity.