Created
May 11, 2021 10:27
-
-
Save jjmontalban/3e55d0736e270da148b9303ec76fcde5 to your computer and use it in GitHub Desktop.
Eliminar bloques en administrador pagina del producto
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
<?php | |
/** | |
* @snippet //Eliminar bloques en administrador pagina del producto | |
* @based on https://stackoverflow.com/questions/21672870/woocommerce-remove-meta-boxes | |
*/ | |
function remove_metaboxes() { | |
//remove_meta_box( 'postexcerpt' , 'product' , 'normal' ); Descripcion corta | |
remove_meta_box( 'tagsdiv-product_tag' , 'product' , 'side' ); | |
} | |
add_action( 'add_meta_boxes' , 'remove_metaboxes', 50 ); | |
//Eliminar tabs en en administrador pagina del producto | |
function remove_tab($tabs){ | |
//unset($tabs['general']); // it is to remove general 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 | |
return($tabs); | |
} | |
add_filter('woocommerce_product_data_tabs', 'remove_tab', 10, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment