Home » WooCommerce: Remove a Tab @ Single Product Page

WooCommerce: Remove a Tab @ Single Product Page

by Tutor Aspire

There are ways to completely remove the WooCommerce Single Product page tabs, but in case you wish to remove only one of them, these easy snippets will teach you how to do just that.

For example, you may want to hide the “Reviews tab because you don’t want to enable product feedback. Or maybe you would like to hide the “Additional Information” tab, because you don’t need that information to be seen.

Either way, it’s super easy – enjoy!

You could remove all WooCommerce product tabs… or instead hide a single tab. In this case scenario we’ll take a look at the second option!

PHP Snippet 1: Hide “Description” Tab @ WooCommerce Single Product Page

/**
 * @snippet       WooCommerce Remove Description Tab
 * @how-to        Get tutoraspire.com FREE
 * @author        Tutor Aspire
 * @compatible    WooCommerce 5
 * @donate $9     https://www.tutoraspire.com
 */
 
add_filter( 'woocommerce_product_tabs', 'tutoraspire_remove_desc_tab', 9999 );

function tutoraspire_remove_desc_tab( $tabs ) {
   unset( $tabs['description'] );
   return $tabs;
}

PHP Snippet 2: Hide “Additional Information” Tab @ WooCommerce Single Product Page

/**
 * @snippet       WooCommerce Remove Additional Info Product Tab
 * @how-to        Get tutoraspire.com FREE
 * @author        Tutor Aspire
 * @compatible    WooCommerce 5
 * @donate $9     https://www.tutoraspire.com
 */
 
add_filter( 'woocommerce_product_tabs', 'tutoraspire_remove_info_tab', 9999 );

function tutoraspire_remove_info_tab( $tabs ) {
   unset( $tabs['additional_information'] );
   return $tabs;
}

PHP Snippet 3: Hide “Reviews” Tab @ WooCommerce Single Product Page

/**
 * @snippet       WooCommerce Remove Reviews Product Tab
 * @how-to        Get tutoraspire.com FREE
 * @author        Tutor Aspire
 * @compatible    WooCommerce 5
 * @donate $9     https://www.tutoraspire.com
 */
 
add_filter( 'woocommerce_product_tabs', 'tutoraspire_remove_reviews_tab', 9999 );

function tutoraspire_remove_reviews_tab( $tabs ) {
   unset( $tabs['reviews'] );
   return $tabs;
}

Bonus PHP Snippet: Hide Tab Only For a Specific Product Category @ WooCommerce Single Product Page

/**
 * @snippet       WooCommerce Remove Product Tab If Given Category
 * @how-to        Get tutoraspire.com FREE
 * @author        Tutor Aspire
 * @compatible    WooCommerce 5
 * @donate $9     https://www.tutoraspire.com
 */
 
add_filter( 'woocommerce_product_tabs', 'tutoraspire_remove_tab_if_cat', 9999 );

function tutoraspire_remove_tab_if_cat( $tabs ) {
   if ( has_term( 'tables', 'product_cat' ) ) {
       unset( $tabs['reviews'] ); // remove reviews for tables
   }
   return $tabs;
}

You may also like