Hides the description editor, if you don’t have any use for it
/***
* Disable admin description editor for WooCommerce products
* Description: Hides the description editor, if you don't have any use for it
* Category: WordPress Backend
* Tags: WooCommerce
* URL: https://techies.review/blog/some-good-to-have-php-codesnippets-for-wordpress
*/
function cs_disable_wc_editor() {
global $_wp_post_type_features;
$post_type = 'product';
$feature = 'editor';
if ( !isset($_wp_post_type_features[$post_type]) ) {
}
elseif ( isset($_wp_post_type_features[$post_type][$feature]) ) {
unset($_wp_post_type_features[$post_type][$feature]);
}
}
add_action('init', 'cs_disable_wc_editor');