When using shipping settings and advanced shipping plugins with Woocommerce Shop, you will usually have to set your product dimensions on Woocommerce back-end product setting tabs. These dimensions will be displayed on Additional Information tab in many Woocommerce themes.
You may find many examples of code to remove whole set of dimensions from the tab, but it’s hard to find a code snippet to remove only one of product’s dimensions.
I was requested to remove Height from dimensions set.
I’ve found filters for such dimensions in Woocommerce Documentation. And created a filter for my needs, which removes the height from this set. We put it in child-theme functions.php
// remove product height dimension
function iggy_remove_product_height( $enabled ) {
if ( ! is_admin() ) {
return false;
}
return $enabled;
}
add_filter( 'woocommerce_product_height', 'iggy_remove_product_height' );
Now no height is showing on the theme’s front-end of my shop. You may use it with length and width too.
Update (Oct. 2017): for Woocommerce 3 code check this post. These snippets no longer working.
not working for me
looks like they are deprecated in version 3, sorry