I’m using WooCommerce and I’d like to hide the "Linked Products" tab in the backend. I found a hook to add tabs (woocommerce_product_write_panel_tabs
) but I’m not sure if it’s also possible to hide certain tabs with this hook.
Thanks for any help!
So I had the same issue. Woocommerce provides a filter (just as they do about everything else) that can handle this. The filter is 'woocommerce_product_data_tabs'.
This will remove the linked products tab. You can also unset the other tabs using their array index. Below is a copy of the filter application from class-wc-meta-box-product-data.php.
So just substitute the unset($tabs['linked_product'] with whichever tab you want to remove from the backend.
Adding the following to the wp-admin.min.css should remove the linked products.