You can change the WooCommerce price to be by weight by appending some text after the actual price such as ‘per kg’, this can be done by manipulating 3 filters that display the price in the shop/product page, cart and checkout pages;


If all items were to be classified as ‘per kg‘ you could use the filters as below…

View the code on Gist.

In the checkout filter I dropped the ‘per kg’ and just left ‘kg’ as the unit price is not used rather the total price.




If you need more variations on the weight or to use a per item/unit options consider using ACF with a select field that can easily be changed per product.



Leave a Reply