WooCommerce can show a product’s shipping weight and dimensions on product pages. In classic product templates, those values appear as rows in the Additional information output. Use this guide to hide or relabel those rows without removing the product data used for shipping rates.
Note:
This is a Developer level doc. If you are unfamiliar working with code and resolving potential conflicts, we recommend you work with a Woo Agency Partner for larger projects, or find a WooCommerce developer on Codeable for smaller customizations. We are unable to provide support for customizations under our Support Policy.
Before you start
↑ Back to top- Confirm that the product still needs weight and dimensions for shipping, tax, fulfillment, or integrations before hiding the rows from customers.
- Add PHP snippets in a child theme or custom plugin, not directly in a parent theme that receives updates.
- Test simple and variable products after the change. Variation scripts also update weight and dimensions when a customer selects a variation.
- This guide covers classic product template output. If your product template uses the Product Specifications block, use that block’s Weight, Dimensions, and Attributes controls in the Site Editor instead.
Hide the rows with PHP
↑ Back to topUse the woocommerce_display_product_attributes filter when you want WooCommerce to remove the rows from the Additional information table before it renders. The product’s saved weight and dimensions remain available for shipping and other store logic.
add_filter( 'woocommerce_display_product_attributes', function( $product_attributes, $product ) {
unset( $product_attributes['weight'], $product_attributes['dimensions'] );
return $product_attributes;
}, 10, 2 );
Relabel the rows with PHP
↑ Back to topUse the same filter if the store should keep the rows but make their purpose clearer to customers.
add_filter( 'woocommerce_display_product_attributes', function( $product_attributes, $product ) {
if ( isset( $product_attributes['weight'] ) ) {
$product_attributes['weight']['label'] = __( 'Shipping weight', 'your-textdomain' );
}
if ( isset( $product_attributes['dimensions'] ) ) {
$product_attributes['dimensions']['label'] = __( 'Shipping dimensions', 'your-textdomain' );
}
return $product_attributes;
}, 10, 2 );
Hide the rows with CSS
↑ Back to topUse CSS only when visual hiding is enough. This does not change the product data and does not remove the values from the page markup.
.single-product .woocommerce-product-attributes-item--weight,
.single-product .woocommerce-product-attributes-item--dimensions {
display: none;
}
What this does not change
↑ Back to top- It does not change values saved under Product data > Shipping. See Adding Shipping Dimensions to Products for the merchant workflow.
- It does not rename or remove the Additional information tab itself. See Editing product data tabs for tab-level changes.
- It does not control the Product Specifications block. See Customizing Your Product Pages for block-theme product template editing.