Woocommerce:How to remove product panel tabs from admin panel | themelocation

Woocommerce: How to remove product panel tabs from admin panel

In this tutorial; We’ll learn how to remove product panel tabs on product creation/edition tab at the admin panel of Woocommerce.

First of all, Go to admin panel of your site and click on products menu link. From here click on any product to edit it or create a new product by clicking on Add New button.

Here you will see following product panel tabs:

woocommerce

We can remove any or all of these tabs.

To do this add the following lines of code at the end of your theme’s functions.php file:

function remove_linked_products($tabs){

   unset($tabs['general']);

                unset($tabs['inventory']);

                unset($tabs['shipping']);

                unset($tabs['linked_product']);

                unset($tabs['attribute']);

                unset($tabs['advanced']);

                return($tabs);

}

add_filter('woocommerce_product_data_tabs', 'remove_linked_products', 10, 1);

Place the code at the end of functions.php file and click on update file button to save it.

This code will remove all panel tabs.

If you don’t want to remove any tab, Just “comment out” that line of Code from the above code and It will not be removed.

For example: <?php // unset($tabs[‘inventory’]); ?>   (This is how We can comment php code)

One Response to Woocommerce: How to remove product panel tabs from admin panel

  1. horacsio December 8, 2015 at 3:08 am #

    How to reorder the tabs?
    And how to do it with a custom tab?
    Thank you.
    H

Leave a Reply