Categories
WordPress

How To Remove The WooCommerce Additional Information Tab

Recently I was working with a designer to complete an eCommerce site using the WooCommerce WordPress plugin. A default WooCommerce product page displays the content entered into the WordPress editor as the content under the product description tab. The review tab displays all the product reviews and allows people to submit reviews. Then there is the additional information tab that only displays the weight, dimensions, and the attributes for a product. If no weight, dimensions, or attributes are entered for a product the additional information tab is not displayed.

There is no option in the WordPress admin to customize the additional information tab content and the necessary information (the dimensions) can be added to the description tab. I considered changing the name of the additional information tab and customizing the content displayed in the additional information tab using the woocommerce_product_tabs filter.  The final solution which I am going to share with you is to completely remove the additional information tab.

To remove the additional Information tab add the following code to your site functionality plugin or your themes functions.php file.


//remove additonal info tab from products
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
 
function woo_remove_product_tabs( $tabs ) {
    global $product;
	
	if( $product->has_attributes() || $product->has_dimensions() || $product->has_weight() ) {
        unset( $tabs['additional_information'] );   
    }
    return $tabs;
}
//Source: http://docs.woothemes.com/document/editing-product-data-tabs/

The code above will change the product page so that there are only two tabs: Description and Reviews.

Woocommerce Product Tabs After