By default, these rows are auto-generated by WooCommerce, based on the attributes you select for the product.
Add or remove existing product attributes:
Create custom attributes:
Excluding through code
The code below will remove any item from the list. Simply add entries inside the `$excludes` array which should contain the attributes slugs eg: https://d.pr/i/8lcpCX .
add_filter('woocommerce_display_product_attributes', function( $product_attributes, $product ){ // add the attribute names in this array $excludes = [ 'brand', 'size', ]; foreach ($excludes as $exclude) { unset( $product_attributes[ 'attribute_pa_' . $exclude ] ); } return $product_attributes; }, 10, 2);
2 Replies to “Customize the attributes inside Specifications (Additional Information)”
Curtis Penner
Where should the “exclude code” be placed?
Marius H[ Post Author ]
Hey! Please try in the child theme’s functions.php file (more in this article https://support.reytheme.com/kb/how-to-add-custom-code-in-child-themes-functions-php/ ).