Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add or remove the PHP comment (//) before a tab that you need to remove or show. Detailed guide:
// Remove options from the Product Data Panel in WooCommerce
function remove_product_data_tabs( $tabs ) {
//unset( $tabs['general'] );
unset( $tabs['inventory'] );
unset( $tabs['shipping'] );
unset( $tabs['linked_product'] );
//unset( $tabs['attribute'] );
//unset( $tabs['variations'] );
//unset( $tabs['advanced'] );
return $tabs;
add_filter( 'woocommerce_product_data_tabs', 'remove_product_data_tabs', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment