Weight Based Products

Weight Based Products adds a ‘Weight Based Product’ type to your WooCommerce store. Unlike simple or variable products, a weight-based product calculates price from a per-unit rate (per kg or per lb) multiplied by the customer’s chosen weight. You configure the product once; the plugin handles all price calculation, cart line management, stock tracking, and order display automatically.

Installation

↑ Back to top

To start using a product from WooCommerce.com, you can use the โ€œAdd to storeโ€ functionality on the order confirmation page or the My subscriptions section in your account.

  1. Navigate to My subscriptions.
  2. Find the Add to store button next to the product youโ€™re planning to install.
  3. Follow the instructions on the screen, and the product will be automatically added to your store.

Alternative options and more information at:
Managing WooCommerce.com subscriptions.

Adding a WooCommerce.com subscription to your store

Usage

↑ Back to top

Create your first weight-based product in 5 minutes.

Create a New Product

↑ Back to top

Go to Products โ†’ Add New. In the Product data dropdown, select Weight Based Product.


Choose Ordering Mode

↑ Back to top

In the General Options tab, select Fixed Packs or Free Weight.


Set Price “unit and quantity” and Base Price

↑ Back to top

Enter a Base Price per unit (e.g. $10.00 per kg) or if Price unit set to ( 100 g ) then the Base Price per unit will be (e.g. $10.00 per 100g ). Optionally set a sale price.


Configure Weights

↑ Back to top

Fixed Packs: Add package weights (e.g. 200 g, 500 g, 1 kg) with stock quantities.
Free Weight: Set min, max, and step size for the slider.


Publish & Test

↑ Back to top

Click Publish and visit the product page to see the weight selector, live pricing, and Add to Cart button.

Free Weight Product

Fixed Packs Product

Cart Page

Checkout Page

Order Received Page

Order Email

Order Page


Setup and Configuration

↑ Back to top

After installing and activating the Weight Based Products extension, you can configure the global settings on the WooCommerce > Weight Based Products settings page.

General Settings

↑ Back to top

Default units, display format, stock management, cart behaviour, and the package suggestion algorithm. Located at WooCommerce โ†’ Weight Based Products โ†’ General.

Default Units & Display
SettingDescription
Default unitApplied to new products: Kilograms (kg/g) or Pounds (lb/oz). Can be overridden per product. No automatic conversion when changed later.
Price display formatPer unit (e.g. $10.00/kg) or Both (per-package total + per-unit rate). Legacy “per package only” values auto-migrate to “Both”.
Weight decimal placesNumber of decimals for weight display (0โ€“4). Example: 3 gives “2.500 kg”.
Show dual unitsWhen enabled, shows the secondary unit in parentheses (e.g. “2.5 kg (5.51 lbs)”).
Stock Management
SettingDescription
Stock tracking modeBy package quantity โ€” default WooCommerce behaviour. By total weight โ€” stock shown as remaining weight (e.g. “12.5 kg remaining”).
Low stock badge thresholdPackages at or below this number show a warning badge. Set to 0 to disable badges.
Low stock email alertsAdmin receives an email when package stock drops to the threshold.
Cart & Order Display
SettingDescription
Cart line formatFull breakdown (e.g. “2ร— 1 kg + 1ร— 500 g”), Weight only (e.g. “2.5 kg total”), or Compact (e.g. “3 packages (2.5 kg)”).
After add to cartUse WooCommerce setting, redirect to cart, or stay on product page (reload).
Show breakdown in emails / order viewInclude detailed weight/package breakdown in order emails and admin order view.
Package Suggestion Algorithm

Controls how the best-combination search works when a customer enters a desired weight in Fixed Packs mode.

SettingDescriptionDefault
Tolerance (ยฑ)How far from the desired weight counts as “exact match” (in store unit). E.g. 0.05 = ยฑ50 g.0.05
Suggestion modeAlways round up (โ‰ฅ desired), Always round down (โ‰ค desired), or Closest match (either direction).Closest match
Max packages in suggestionUpper limit on total pack lines in the browser combination search. Range 1โ€“500.25

Option Groups Settings

↑ Back to top

Define global option groups organized into categories. Enable them per product in the product editor. Located at WooCommerce โ†’ Weight Based Products โ†’ Option Groups.

Section Header (Product Page)

Configure the default title and description for the “Product Options” block on the frontend:

  • Section title โ€” e.g. “Customise Your Order”
  • Section description โ€” e.g. “Free ยท no extra charge”

These can be overridden per product in the Product Options tab.

Option Group Categories

Create categories to organize related option groups (e.g. “Coffee Products”, “General”). Each category has:

  • Name and optional description
  • Colour label (blue, green, orange, purple, red, gray) for admin visual organisation
Option Groups (Per Category)

Under each category, add option groups. Each group defines a customer-facing input field on the product page. Settings include:

  • Display label โ€” e.g. “Grind Type”, “Texture”
  • Input type โ€” Chips/button select, Dropdown, Text area (free text), Single checkbox, Radio buttons
  • Choices โ€” Each with a name and optional price (for paid groups)
  • Helper text โ€” Shown below the field on the product page
  • Default scope โ€” Manual (attach per product) or Auto-attach to all products
  • Flags โ€” Required field; Mark as FREE (show badge)
Saving Option Groups

The Option Groups builder is client-side: Save GroupAdd Group, and Delete update the in-memory configuration and hidden JSON fields only. They do not write to the database by themselves.

After editing groups or categories, clickย Save Changesย at the bottom of the page (or in the sticky unsaved-changes bar). A warning appears if you try to reload or leave without saving.

Sides & Add-ons Settings

↑ Back to top

Configure accessories shown below the weight selector. Sides do not affect order weight. Located at WooCommerce โ†’ Weight Based Products โ†’ Sides & Add-ons.

Accessories (Side & Add-ons)
SettingDescription
Enable accessoriesAllow weight-based products to have accessory add-ons
Default section titlee.g. “Complete Your Setup” โ€” overridable per product
Display positionBelow weight selector, Below product options, or Directly above Add to Cart
LayoutList (toggle rows) or Grid (cards)
Show product imagesThumbnail next to each accessory
Max accessories per productLimit how many accessories a product can have
Pricing & Cart Behaviour
SettingDescription
Add sides to order totalShow cumulative total (weight + sides) on the Add to Cart button
Sides in cartSeparate line items (chained) โ€” individual cart rows per side; removing main removes all sides. Grouped under main product โ€” single line showing all sides.
Show sides in emailsInclude sides breakdown in order confirmation and admin emails

Pricing Rules

↑ Back to top

Global tiered pricing, role-based pricing, bulk savings badge, and sale countdown. Located at WooCommerce โ†’ Weight Based Products โ†’ Pricing Rules.

How Tiers Work
  • Product-level tiers (set in the product editor) always take precedence when defined
  • Global tiers here apply only when a product has tiered pricing enabled but no product-level tier table
  • Weights outside any tier range use the product’s base price
Tiered / Graduated Pricing

Enable global tiered pricing to define default price brackets. Each tier has: From (weight), To (weight), and Price per unit. Click the + Add Tier button to add rows (same control style as Add Choice in Option Groups). These tiers are overridden by product-level tiers. Remember to click Save Changes after editing.

Role-Based Pricing ( Beta )

Enable role-based pricing to set different rates per WooCommerce user role (e.g. Wholesale at 20% off). Prices set here are defaults and can be overridden per product.

Bulk Purchase Incentives

Hints and badges are driven by tiered pricing tiers, not a fixed weight threshold.

SettingDescription
Show bulk savings badgeTier hints near the weight selector; savings badge in the order summary when a cheaper tier applies
Badge message templateFor the โ€œnext tierโ€ hint. Placeholders: {threshold}{remaining}{savings}
Sale price countdownCountdown when the product has a sale price and sale end date

Appearance Settings

↑ Back to top

Colours, borders, step numbers, section cards, quantity stepper, buttons, presets, and custom CSS. Located at WooCommerce โ†’ Weight Based Products โ†’ Appearance.

Appearance Presets

Select a preset from the dropdown, then click Apply Preset. Available themes:

  • Default โ€” Original plugin styling
  • Classic โ€” Warm earth tones with cream accents
  • Modern โ€” Sleek blue gradients
  • Minimal โ€” Clean grayscale
  • Nature โ€” Fresh green tones for organic/natural product stores
  • Elegant โ€” Rich purple accents for premium product displays
  • Glass โ€” Frosted glass effect with backdrop-filter blur, translucent backgrounds, and soft shadows
Applying a preset fills colour, border, shadow, and typography fields in the form. A reminder notice appears. You must click Save Changes (header or footer) to persist them. The unsaved-changes bar also appears if you navigate away without saving.
Colors

Primary colour โ€” Selected package borders, active chip, toggle states. Accent colour โ€” Confirmed selection background tint.

Section Titles & Step Numbers
  • Step numbers โ€” Circular badges (1, 2, 3โ€ฆ) next to section titles. Toggle visibility and set badge background colour.
  • Section titles โ€” Title colour, description text colour, and title font size (px).
  • Section cards โ€” Background, border colour, border width, and card border radius.
Pack Cards (9 Granular Controls)

Hints and badges are driven by tiered pricing tiers, not a fixed weight threshold.

SettingDescription
Background (Selected)Background color of selected pack card
Border (Selected)Border color of selected pack card
Weight Name colorText color of the weight label on cards
Text (Selected) colorText color when card is selected
Price colorPrice text color on cards
Unit Price colorPer-unit price text color
Weight Name font sizeFont size for the weight label
Price font sizeFont size for the price
Unit Price font sizeFont size for the per-unit price
Buttons & Stepper
  • Quantity stepper โ€” +/โˆ’ buttons: background, border, button colour, hover states
  • Add to Cart button โ€” Background, text, border, hover states. Use {price} and {weight} placeholders in button text.
  • Clear button โ€” Secondary button to reset weight selection
  • Empty state text โ€” Text when no weight is selected (e.g. “Select a Weight to Continue”)
Widget Layout
  • Quick preset buttons โ€” Show weight preset chips; style: Pills, Rectangular, or Tab strip
  • Package card style โ€” List rows or Card grid (overridable per product)
  • Show price on package card
  • Show low-stock badges
  • Highlight selected packages
Custom CSS

Custom CSS โ€” Injected on every page containing the weight selector widget. Override storefront styles using real selectors (e.g. .wbp-card { border-radius: 12px; }.pkg-row { padding: 12px; }).

CSS custom properties โ€” The plugin uses variables like --lf-wbpw-primary--lf-wbpw-accent, etc. Override them in your theme’s CSS for easy customisation.


Advanced & Tools

↑ Back to top

Data import/export, sample products, reset settings, cache management, and developer options. Located at WooCommerce โ†’ Weight Based Products โ†’ Advanced / Tools.

Data & Import / Export
ToolDescription
Export All WBP DataDownload a JSON backup of all weight-based product configurations. Use before importing or migrating.
Import from JSONRestore products and settings from a backup exported by this plugin. Overwrites existing data โ€” confirmation required. Accepts .json files only (max 2 MB). Imported settings are restricted to registered plugin options and run through their sanitize callbacks; product meta is sanitized with a JSON-aware helper.
Import from CSVBulk-import products with package configurations. Coming soon.
Create Sample ProductsGenerates 15 demo weight-based products covering both modes, tiered pricing, options, and accessories. Creates sample option categories, groups, and a “WBP Samples” product category.
Reset Plugin SettingsRestore all plugin settings to defaults (Advanced tab only). Does not affect product data. Requires confirmation. Each individual tab also has Reset Tab to Defaults in its footer.
Performance
  • Enable transient cache โ€” Cache package combination calculations. Recommended for stores with many products.
  • Clear cache โ€” Force-clear all cached weight combination results. Use after changing packages.
Developer

Debug mode โ€” Log weight calculation steps to the browser console. Disable in production.


Product Editor

↑ Back to top

How to configure individual weight-based products in the WooCommerce product editor. Select “Weight Based Product” from the Product data dropdown to reveal the plugin’s tabs.

General Options Tab

↑ Back to top

The main configuration tab for weight-based products. Settings include:

  • Weight display unit โ€” Store default, Kilograms (kg/g), or Pounds (lb/oz). Overrides the global default for this product.
  • Ordering mode โ€” Fixed Packs or Free Weight. Determines which fields are visible below.
  • Base Price (per kg/lb) โ€” Regular price per weight unit.
  • Sale Price (per kg/lb) โ€” Optional sale price. Sale start/end dates are also configurable for countdown timers.
  • Tiered pricing toggle โ€” Use Global tiers, or Use Product Level with a custom From/To/Price table.
Fixed Packs Settings

Visible when ordering mode is “Fixed Packs”:

  • Order weight limits โ€” Min and max order weight with unit selector (g/kg or oz/lb)
  • Available weight packages โ€” Add packages with weight, unit, and stock quantity. Packages appear as draggable “pills” that can be reordered. Admin pills show stock-tier colours (green/amber/red) based on the low-stock threshold.
  • Edit package dialog โ€” Click a pill to adjust weight, stock, and optional marketing badge (Recommended, Best Seller, or None).
  • Pack list display โ€” Sort order (store default, ascending, descending, catalog order) and Package card style (store default, list rows, card grid).
  • Quick-select presets โ€” Comma-separated values shown as chips.
  • Show dual-unit display and Allow typed weight input

Free Weight Settings

Visible when ordering mode is “Free Weight”:

  • Minimum weight, Maximum weight, Step size
  • Quick-select presets, Show dual-unit, Allow typed input
  • Total available weight and Low weight threshold for inventory tracking

Product Options Tab

↑ Back to top

Enable/disable global option groups for this product. Override section title, description, and individual group labels or choices. Groups are listed by category.


Sides & Add-ons Tab

↑ Back to top

Add accessories to this product:

  • Accessories (Side & Add-ons) section title โ€” Override the global default
  • + Add Accessory โ€” Search for simple products; set override price (stored in product config and enforced server-side at cart), display label, description, max qty, and FREE badge
  • Drag to reorder, X to remove
Only simple WooCommerce products can be added as accessories. Variable, grouped, and other product types do not appear in the search.

Hooks & Filters

↑ Back to top

All actions and filters provided by the plugin for customization and extension for developers.

Actions

HookDescription
lf_wbpw_register_unitsPass LF_WBPW_Unit_Registry instance. Register custom LF_WBPW_Unit_Family_Interface implementations. See Custom Units.
lf_wbpw_before_weight_options_panelFires before the product editor weight options panel. Use to inject custom admin UI.
lf_wbpw_after_weight_options_panelFires after the product editor weight options panel.
lf_wbpw_before_weight_inputFires before the frontend weight selector widget is rendered.
lf_wbpw_after_weight_inputFires after the frontend weight selector widget is rendered.

Filters

Product & Weight
FilterDescription
lf_wbpw_product_type_labelChange the product type dropdown label (default “Weight Based Product”)
lf_wbpw_available_weightsModify the available pack weights array before display
lf_wbpw_min_order_weightOverride minimum order weight
lf_wbpw_max_order_weightOverride maximum order weight
lf_wbpw_format_weightModify the formatted weight display string
lf_wbpw_display_unitOverride the resolved display unit slug (kg, lb, or extension)
Pricing
FilterDescription
lf_wbpw_active_priceOverride the active price per unit
lf_wbpw_tiered_priceOverride the tiered price calculation
lf_wbpw_price_htmlModify the price HTML on the product page
lf_wbpw_weight_optionsModify pack combination results
Cart & Order
FilterDescription
lf_wbpw_add_cart_item_dataModify cart item data when adding a weight-based product to cart
lf_wbpw_cart_item_priceOverride cart item price
lf_wbpw_cart_price_htmlModify cart price display HTML
lf_wbpw_cart_item_dataModify cart item display data (meta shown below product name)
REST & JS
FilterDescription
lf_wbpw_rest_weight_options_responseModify REST weight-options endpoint response
lf_wbpw_rest_product_responseModify REST product endpoint response
lf_wbpw_rest_product_weight_based_dataModify weight_based object in WC REST product response
lf_wbpw_rest_units_responseModify GET /units payload
lf_wbpw_js_unit_configPer-family JS config array
lf_wbpw_js_unit_configsMap of all families’ JS configs (admin)
Units & Meta
FilterDescription
lf_wbpw_meta_storage_unitForce pack/free-weight meta suffix to kg or lb
lf_wbpw_unit_product_select_optionsProduct editor “Weight display unit” dropdown options
lf_wbpw_convert_weight_to_meta_baseConvert extension input units to stored kg/lb
lf_wbpw_convert_weight_from_meta_baseConvert stored kg/lb back to extension display units
lf_wbpw_effective_package_card_styleResolved list|grid for storefront (after per-product override)
lf_wbpw_hidden_order_itemmeta_keysHide internal line-item meta in admin order screen

Troubleshooting

↑ Back to top

If you encounter any issues while using Weight Based Products, try the following steps:

Update everything

  • Make sure you’re using the latest versions of WordPress, WooCommerce, Weight Based Products, and any other installed plugins or themes.
  • You can check your system information by going to WooCommerce โ†’ Status, where you’ll find version details and any important notices.

Check for plugin or theme conflicts

  • Temporarily deactivate all plugins except WooCommerce and Weight Based Products.
  • Switch to a default WordPress theme (such as Twenty Twenty-Five or Storefront).
  • If the issue is resolved, reactivate your plugins one at a time until you identify the conflicting plugin.

Questions & Support

↑ Back to top

Have a question before you buy? Please fill out this pre-sales form.

Already purchased and need some assistance? Get in touch with the developer via the Help Desk and include a clear description of the issue along with your System Report at WooCommerce > System Status > Get System Report.

Related Products

Offer add-ons like gift wrapping, special messages or other special options for your products.

Let customers subscribe to your products or services and pay on a weekly, monthly or annual basis.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.