We know that woocommerce is a widely used plugin to build shopping websites in wordpress. So, when we are adding products we have a section named “Product Data” just below the content editor. In this section we have various tabs like general, inventory, linked products etc.
Sometimes we do not use few of them, so we want to remove them for a good user experience. Here I am providing a small code snippet to remove unwanted tabs from that particular section. To do this we will use a woocommerce predefined filter in the below mentioned way.
Just copy and paste below mentioned code snippet to functions.php file :
//unset($tabs['general']); // it is to remove general tab
unset($tabs['inventory']); // it is to remove inventory tab
//unset($tabs['advanced']); // it is to remove advanced tab
//unset($tabs['linked_product']); // it is to remove linked_product tab
//unset($tabs['attribute']); // it is to remove attribute tab
//unset($tabs['variations']); // it is to remove variations tab
add_filter('woocommerce_product_data_tabs', 'remove_tab', 10, 1);
In the above mentioned code we are just removing a tab named “inventory” from the list of all the tabs. You can remove any other tab as per your choice. I have put a line for each tab, just uncomment any of them which you want to remove from that section.