Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing woocommerce short description field

I'm creating a theme designed specifically for usage with woocommerce. This theme's design does not utilize the "Product Short Description". Removing that description from displaying on the page was easy enough using:

remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20);

However, I cannot seem to find any way to remove the field/panel itself from showing to the admin on the product editing pages. If anyone knows how to do that, it would be greatly appreciated. To be clear this is the newer woocommerce 2.0. Thanks!

like image 874
Floggem Avatar asked Dec 06 '22 07:12

Floggem


2 Answers

You can remove the Short Description field from the WooCommerce admin area via PHP:

function remove_short_description() {
     remove_meta_box( 'postexcerpt', 'product', 'normal');
}

add_action('add_meta_boxes', 'remove_short_description', 999);
like image 84
ziga-miklic Avatar answered Dec 12 '22 06:12

ziga-miklic


As answered in different treads:

remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );

function woocommerce_template_single_excerpt() {
    return;
}
like image 29
Giorgio25b Avatar answered Dec 12 '22 08:12

Giorgio25b