How to Remove a Tab from WooCommerce

How to Remove a Tab from WooCommerce featured image

Have you ever wanted to remove a particular tab, or tabs, from your WooCommerce store?

The snippet below will allow you to do just that, from your theme’s functions.php file.

Remove Tabs from WooCommerce

Add the snippet below to your child theme’s functions.php file. Be sure to remove the tabs you wanted (the code below will remove all three tabs: description, reviews and additional information) – it seems likely you won’t want to remove all three. Or maybe you do? If so, leave ’em all in there!

Remove all three tabs from WooCommerce

Remove only the description tab from WooCommerce

The code below will remove the description tab, but leave the other two tabs:

Remove the Reviews tab, leaving the other two

Remove the “Additional Information” tab, leaving the other two

The following code will remove only the additional information tab.

Mix & Match for your purposes

As you can see in the examples above, you can mix and match the “unset” parts to achieve your desired result. You could get “clever” and add things like “If” statements to selectively target (say) products in a certain category or tag… but we’ll leave this for another time, as its beyond the scope of this particular post! As the function is called `woo_remove_product_tabs` in all the examples, though, don’t post more then one of the above… unless you rename the function to be something else.

But you’re on the road to becoming a PHP developer once you have your head around this type of function. Have a play with it, and try to build your own in future!

Where to put this code

This code should be placed into the functions.php file in your child theme, assuming you have a child theme (try not to place code into your parent theme – particularly if you don’t know the difference between a child theme and a parent theme!), or a helper plugin, or, a snippets plugin which you install to contain these.

Leave a comment if you’re struggling with this

Leave a comment below if this helped or didn’t work to remove a tab or tabs from WooCommerce.

1 thought on “How to Remove a Tab from WooCommerce

Leave a Reply

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

Silicon Dales