Skip to content

Instantly share code, notes, and snippets.

@jjmontalban
Created May 11, 2021 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjmontalban/3e55d0736e270da148b9303ec76fcde5 to your computer and use it in GitHub Desktop.
Save jjmontalban/3e55d0736e270da148b9303ec76fcde5 to your computer and use it in GitHub Desktop.
Eliminar bloques en administrador pagina del producto
<?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