How to Hide Weight of Product in WooCommerce

WooCommerce Hide Weight

There are many WooCommerce stores, which might need to sell products by weight.

For example, you might be selling fruits and vegetables in bulk for resale. If you were selling in bulk, then it would be best if you sell them by weight.

However, you need to add the weight for each product you sell manually.

WooCommerce Hide Weight

However, if you are selling digital products, you might not need to display your product’s weight and dimensions.

Additionally, if you are not shipping the product, there is no need to display the product’s weight.

In this post, you will see how you can hide a product’s weight on the product page. I will share two solutions to do this.

The first one is a beginner-friendly solution that involves tweaking the built-in options for WooCommerce.

The second solution involves the use of a code snippet and requires some technical experience.

However, before we start, it is worth mentioning that your theme will not display the weight and dimensions for a product unless this information is added in the back end.

From the image, you can see I have added the weight, and this is how it is displayed in the front end:product weight

Steps to Hide the Weight of a Product in WooCommerce

Here are the steps that you need to follow:

  1. Log into your WordPress site and access the Dashboard as the admin user.
  2. From the Dashboard menu, click on
  3. Click on the product title you want to remove the weight and scroll down to the product data meta box. Here you need to manually remove the weight of the product on the shipping tab.remove weight
  4. Alternatively, you can remove the weight of the product using a PHP code snippet. From the Dashboard menu, click on Appearance Menu > Theme Editor Menu. When the Theme Editor page is opened, look for the theme functions file to add the function to hide the products’ weight.
  5. Add the following code to the functions.php file of the Storefront theme.
/**

* Hides the product's weight and dimension on the single product page.

*/

add_filter( 'wc_product_enable_dimensions_display', '__return_false' );
  1. This is the outcome on the front end:remove weight using code

Conclusion

In summary, this post shares how you can easily hide or remove the weight of a product.

The first method involves removing the product weight individually for each product. The second method hides the weight of all the products on the product page.

However, if you are not familiar with altering code, please consider hiring a developer.

Similar Articles