Hide the product’s weight and dimensions


If you are not selling digital products, you are probably using the weight and dimensions for your products because you need to ship them. At least the weight will be required for all the shipping services.

The “problem” is that when you add those data in the product, they appear in the single product page. How can you hide them?

There’s a very quick way to hide those data since they are not useful to the customers in most cases.

Open your functions.php file located in wp-content/themes/your-theme-name/ and add this code at the end of it:

* Hides the product's weight and dimension in the single product page.
add_filter( 'wc_product_enable_dimensions_display', '__return_false' );

view raw


hosted with ❤ by GitHub

40 replies
  1. Todor
    Todor says:

    Hi, Nicola!

    Can you please advise on how to change the position of weight and dimensions (1) and the rest of the atributes in the Additional information tab (2)?

    I would like in Additional information tab to have all custom atributes first and right below them – the weight and size.

    How to achieve that?

  2. Cliff Kujala
    Cliff Kujala says:

    I’d like to change the description text to Shipping Weight, and Shipping Dimensions. The default is confusing, as a shopper might think that information is the actual product weight and/or dimensions. Easy way to do so?

    Also, how about displaying custom meta on the same tab if we created custom meta for actual: product_weight, product_length, product_height, product_width? Possible?

  3. Sandy
    Sandy says:

    The code you advise to add did not work for me …
    Added the code on functions.php but nothing happened, the dimensions are still shown on the single product page 🙁
    Last versions on both WP & Woo

    Any ideas?

    • Nicola Mustone
      Nicola Mustone says:

      Hi Michael,
      I think it is related to a conflict in your site.

      As you can see here the filter is still used, and that function prevents the dimensions and weight to show, here.

      Please test with a different theme or disable the overridden templates, it will probably fix the issue.

  4. Kristen
    Kristen says:

    Thank you! It removed the shipping weight but didn’t remove the additional information tab. Can you pretty please help with this?

  5. Kurban
    Kurban says:


    Thank you very much for the code you have provided. I just copy and past code to funciton.php in theme. Yes, it works! Now weigh has been hideded. I do not want to display the weight since there is no correct weight information is available for my products.

    Thanks again


  6. Jessie
    Jessie says:

    Hii! Thanks it worked!
    But, if I want to hide only the dimensions (height/width) and still show the info weight? How do I do that?

  7. daniel
    daniel says:

    I’m displaying the product dimensions outside the “additional information” tab using get_weight, get_height, etc
    How do I remove the dimensions only from the product tabs?

  8. Hans
    Hans says:

    On a variable product page, is there a way to only show this info after a variation has been selected?

    My product comes in different sizes and the additional information tab is useful, but not before a variation has been selected. Before a user has selected a variation the tab just says says “Dimensjons: I/A”. This is unnecessary and doesn’t look very good. I have custom dimensions for each variation.


Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply