Removes Product Short Description Box from WooCommerce Product Edit Screen

One of the site I do not need the product short description meta box. Therefore I am completely removing this meta box from product add/edit screen. Here is the simple PHP snippets which I added to functions.php file of my theme.

/**
 * Removing the short description meta box
 */
function paulc_remove_product_short_description_box() {
    if ( current_user_can( 'edit_post' ) ) {
        remove_meta_box( 'postexcerpt', 'product', 'normal' );
    }
}
add_action( 'add_meta_boxes', 'paulc_remove_product_short_description_box', 50 );

In WooCommerce product short description meta box registered by add_meta_boxes hook with priority 30. So I removing the meta boxes with higher priority like 50 . remove_meta_box() function is removing the registered meta box. It is accepting three parameters:

  1. id: Value of the id attribute of the HTML element to remove.
  2. page: Type of the screen to remove the meta box from, such as: postpagecustom post type etc.
  3. context: The context within the screen where the boxes should display. It should be ‘normal’‘advanced’, or ‘side’.
This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.