Created
April 5, 2023 07:15
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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