Overview
Shows the price per kg, litre, metre, m² or piece next to the product price, calculated from the contents of each product or variation.
- Price per kg, litre, metre
- Variations included
- Shop, product and cart
Best for: Food, drinks, cosmetics, fabric and cleaning products
Installation
- Download unitly-unit-price.zip from My account › My plugins or from your order email. Do not unzip it.
- In WordPress, go to Plugins › Add New Plugin › Upload Plugin, choose the zip and click Install Now, then Activate.
Requires WordPress 6.0+, PHP 7.4+, WooCommerce 7.0+. Works with any theme, block themes and page builders.
Features
- Contents in g, kg, ml, cl, l, cm, m, m² or pieces
- Price per kg or per 100 g, per litre or per 100 ml, per metre, m² or piece
- Calculated automatically from the current price, sales included
- Each variation can have its own contents
- Product pages, shop pages and cart
- Your own format, e.g. “soit {price} le {unit}”
- Shortcode [unitly_preview] for a price list
Shortcodes
Paste a shortcode in any page, post, widget or page builder text block.
[unitly_preview]
Options of each shortcode are described in the Features above and in the plugin settings page.
For developers
Customize the plugin from your theme’s functions.php or a small plugin, without editing its files (your changes survive updates).
Filters
unitly_sanitizeunitly_showunitly_text
add_filter( 'unitly_sanitize', function ( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Actions
unitly_admin_after_formunitly_admin_before_formunitly_admin_form_end
Updates
Updates are free. When a new version is out, it appears in Dashboard › Updates of your WordPress site and you can install it in one click, or turn on automatic updates in Plugins. This works for the zip downloaded from your Woo-Plugins account; older copies can be replaced by downloading the latest version from My plugins. See the changelog.
Frequently asked questions
Is the unit price updated during a sale?
Yes, it is always calculated from the current price.
Can variations have different contents?
Yes, each variation can have its own contents, or use the product’s.
Still stuck?
Write to us with your WordPress and WooCommerce versions and what you tried: we answer by email.