Docly

How to Sell Products by Weight

Estimated reading: 1 minute

We’re going to show you how to sell your product by weight on WooCommerce price per kg. You will need to use filter hooks for this.

Some products, such as nut butter, water, brine, vinegar, syrups, fruit or vegetable juice, and a host of other products are sold according to their weight.

We are going to change the price section using filter hooks. You can use this code in your theme/child theme functions.php file or also can use Code Snippets plugin.

Change the prices for shop page and single product page.

If you also want to change it for cart page.

If you also want to change it for checkout page.

Note: This change will visible in our product table also.

Share this Doc
CONTENTS