Hide the Description and Reviews Tabs in WooCommerce Products

WooCommerce products by default show  ‘description‘ and ‘reviews‘ tabs below the product on a WordPress product page, you can hide these tabs from view as well as a third tab ‘additional information‘ with a snippet of code that goes in your themes functions.php file

woo-description-tab-review

//Remove WooCommerce Tabs - this code removes all 3 tabs - to be more specific just remove actual unset lines
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
function woo_remove_product_tabs( $tabs ) {
unset( $tabs['description'] ); // Remove the description tab
unset( $tabs['reviews'] ); // Remove the reviews tab
unset( $tabs['additional_information'] ); // Remove the additional information tab
return $tabs;
}
view raw remove-tabs.php hosted with ❤ by GitHub

 

As well as remove the tabs you can rename the heading in the tabs with this snippet

//Rename WooCommerce Tabs - this code renames tabs - just include the tab line you want renamed and change the name in paranthesis, ie 'More Information' etc
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 );
function woo_rename_tabs( $tabs ) {
$tabs['description']['title'] = __( 'More Information' ); // Rename the description tab
$tabs['reviews']['title'] = __( 'Ratings' ); // Rename the reviews tab
$tabs['additional_information']['title'] = __( 'Product Data' ); // Rename the additional information tab
return $tabs;
}
view raw rename-tabs.php hosted with ❤ by GitHub

You can also re-order the tabs with this snippet

//Re-order WooCommerce Tabs - this code reorders tabs - the higher the priority(lowest number) goes first
add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
function woo_reorder_tabs( $tabs ) {
$tabs['reviews']['priority'] = 5; // Reviews first
$tabs['description']['priority'] = 10; // Description second
$tabs['additional_information']['priority'] = 15; // Additional information third
return $tabs;
}
view raw reorder-tabs.php hosted with ❤ by GitHub

Here is a guide on adding extra tabs.

Ref

 

8 Comments

  1. Tarek on February 26, 2019 at 10:11 am

    Description tab removed but review is not. I want to remove both tabs. But content of these tabs will show section by sention on same page without tabs. how?

  2. Tarek on February 26, 2019 at 9:58 am

    Description removed but review is not removed. tried the code several time but not fixed.

  3. RFS on January 22, 2019 at 3:58 am

    I can confirm that as of today (1/21/2019) with WP 5.03 cutting and pasting the above as follows:

    add_filter( ‘woocommerce_product_tabs’, ‘woo_remove_product_tabs’, 98 );

    function woo_remove_product_tabs( $tabs ) {

    unset( $tabs[‘description’] ); // Remove the description tab
    unset( $tabs[‘reviews’] ); // Remove the reviews tab
    unset( $tabs[‘additional_information’] ); // Remove the additional information tab

    return $tabs;

    }

    works just fine. I placed it as the very first lines of code and now I do not see the descriptions nor reviews tabs…because I am just launching and have zero feedback yet (positive or negative). I did learn you will have to re-do this everything Woo commerce is upgraded.

    Thank you very much to whoever left this code. Much appreciated.

  4. Morten Andersen on December 11, 2018 at 12:37 pm

    Hi
    If I want to remove the heading of the tab

    add_filter(‘woocommerce_product_description_heading’, ‘__return_empty_string’);

    add_filter(‘woocommerce_product_additional_information_heading’, ‘__return_empty_string’);

    is this working

    But I can’t remove the heading of “Reviews”
    Not working = add_filter(‘woocommerce_product_reviews_heading’, ‘__return_empty_string’);

    Any suggestions?

    :-)
    Morten

  5. Fred Sessoms on August 17, 2018 at 9:32 pm

    Perfect! Thanks for the code!

  6. Remco on December 14, 2017 at 11:44 pm

    I would like it exactly the other way around, diplay on desktop, hide on mobile / tablet portait. Any one?

    Best regards,

    Remco

  7. Fred on March 22, 2017 at 11:20 am

    I would like to hide product description for my store but show it to my mobile site! Is there a way?
    Thanks

    • ayo paul on June 1, 2019 at 9:02 am

      You can use css and target the desktop screen size e.g
      @media only screen and (min-width: 768px) { …}

Leave a Comment