Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shameemreza/7298a1e12d2c03ca94e192ba9c6cf7e6 to your computer and use it in GitHub Desktop.
Save shameemreza/7298a1e12d2c03ca94e192ba9c6cf7e6 to your computer and use it in GitHub Desktop.
Add or remove the PHP comment (//) before a tab that you need to remove or show. Detailed guide: https://shameem.me/removing-options-from-the-product-data-panel-in-woocommerce
// 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