Difficulty: Easy
Here we will cover how to remove product tabs on you product page in your Woo commerce store. Hiding the product tabs is very simple and can be done like many other things on your Woo Commerce store by adding code to your Functions.php file in your theme folder.
Table of Contents
TLDR
File: Functions.php
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
function woo_remove_product_tabs( $tabs ) {
unset( $tabs['description'] );
unset( $tabs['reviews'] );
unset( $tabs['additional_information'] );
return $tabs;
}
Hiding product tabs
To hide product tabs first navigate to your admin interface and then go to Appearance and then under Appearance select Theme Editor.
After navigating there you will see a windows like this one below. In there select Theme Functions (functions.php) and then at the end put this code.
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
function woo_remove_product_tabs( $tabs ) {
unset( $tabs['description'] );
unset( $tabs['reviews'] );
unset( $tabs['additional_information'] );
return $tabs;
}
Click on button bellow to update your file/save changes and that’s it. Now your WooCommerce products will have all product tabs removed.
Editing the code
There are a few possibilities on how you can edit this code to fit your purpose. Maybe you want to hide only certain product tabs and not all of them. Here is an example on how to hide only the review tab.
Hiding only the review tab
To hide only the review tab from products tab we simply need to delete two lines of code and that’s it. We just remove this two lines “unset( $tabs[‘description’] );” and “unset( $tabs[‘additional_information’] );” and now we are left with this code here:
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
function woo_remove_product_tabs( $tabs ) {
unset( $tabs['reviews'] );
return $tabs;
}
This will remove review tab from product page. Let’s say you want to hide only description tab. You would just remove other two lines of code and leave “unset( $tabs[‘description’] );” in there. Same thing for additional information tab.