удалить в админке description % short description
Mon Aug 01 2022 10:25:21 GMT+0000 (Coordinated Universal Time)
Saved by
@mastaklance
/**
* Remove from admin the short description field
*/
function remove_short_description() {
remove_meta_box( 'postexcerpt', 'product', 'normal');
}
add_action('add_meta_boxes', 'remove_short_description', 999);
/**
* Remove from admin the full description
*/
add_action( 'add_meta_boxes_product', 'remove_metaboxes_edit_product', 9999 );
function remove_metaboxes_edit_product() {
// remove woocommerce product description
remove_meta_box( 'woocommerce-product-data', 'product', 'normal' );
// remove woocommerce product data
remove_post_type_support( 'product', 'editor' );
}
content_copyCOPY
Comments