Search
Close this search box.

How to remove tabs in WooCommerce

To remove WooCommerce tabs in WordPress using the functions.php file, you can use the woocommerce_product_tabs filter hook. This hook allows you to modify the tabs that are displayed on product pages in WooCommerce.

Here is an example of how you can use this hook to remove the “Description” and “Reviews” tabs from product pages:

// Remove tabs in WooCommerce
// More snippets at wpunplugged.com 

function remove_woocommerce_tabs( $tabs ) {
    unset( $tabs['description'] ); // Remove the description tab
    unset( $tabs['reviews'] ); // Remove the reviews tab
    return $tabs;
}
add_filter( 'woocommerce_product_tabs', 'remove_woocommerce_tabs', 98 );

In this example, we are using the unset() function to remove the “Description” and “Reviews” tabs from the array of tabs that are passed to the hook. You can use this same approach to remove any other tabs that you don’t want to display on your product pages.

It’s important to note that this code will only remove the tabs from the front-end of your site. If you want to remove the tabs from the back-end as well, you will need to use a plugin or additional code to do so.

Share this post

You might also like...

MemberPress Membership login for WordPress Review
Content restriction

MemberPress for WordPress Review

MemberPress for WordPress is a powerful membership plugin that makes it easy to create and manage memberships on any WordPress website. It allows you to

Read More »

Comment

Your email address will not be published. Required fields are marked *