Home » WooCommerce: Remove “Metaboxes” @ Product Edit Admin Page

WooCommerce: Remove “Metaboxes” @ Product Edit Admin Page

by adminkys

Let’s say you disabled product tags in your shop. Or maybe your store set up requires no short description. Or even, you want to hide a custom “metabox” (e.g. one of those widgets that appear on the Edit Product page). Either way, removing metaboxes and making the Edit Product page much cleaner is quite easy.

You just need the “ID” of the metabox and its position (‘normal’ or ‘side’, depending on whether it’s in the sidebar or not), and then this little PHP snippet. Enjoy!

Hide specific metaboxes @ WooCommerce Edit Product Page

Snippet (PHP): Hide Custom Metaboxes @ WooCommerce Edit Product Page

/**
 * @snippet       Remove WooCommerce Edit Product Page Boxes
 * @how-to        Get tutoraspire.com FREE
 * @author        Tutor Aspire
 * @compatible    WooCommerce 5
 * @donate $9     https://www.tutoraspire.com
*/

add_action( 'add_meta_boxes_product', 'tutoraspire_remove_metaboxes_edit_product', 9999 );

function tutoraspire_remove_metaboxes_edit_product() {

   // e.g. remove short description
   remove_meta_box( 'postexcerpt', 'product', 'normal' );

   // e.g. remove product tags
   remove_meta_box( 'tagsdiv-product_tag', 'product', 'side' );

}

You may also like