Yes, You can disable the default editor by removing ‘editor’ from the supports attribute array for register_post_type( ‘product’, $args )
'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'custom-fields' ),
Change this to somthing like this
'supports' => array( 'title', 'thumbnail', 'comments', 'custom-fields' ),
You can read wordpress function reference for register_post_type to learn more about custom post type arguments.
Update:
Method 1:
To change register_post_type args via “register_post_type_args” filter hook.
add_filter( 'register_post_type_args', 'product_support_args', 10, 2 );
function product_support_args( $args, $post_type ){
$post_ids_array = array(2119, 2050); // Add Your Allowed Post IDs Here
if ( 'product' === $post_type && is_admin()){
$post_id = $_GET['post']; // Get Post ID from URL
// Check if the post ID is whitelisted
if(in_array($post_id, $post_ids_array)){
$args['supports'] = array( 'title', 'thumbnail', 'comments', 'custom-fields' ); // Remove Editor from supports args array
}
}
return $args;
}
Method 2:
By using remove_post_type_support() function. You can pass allowed post ids array in the same way we did above if required.
add_action( 'current_screen', 'remove_editor_support' );
function remove_editor_support() {
$get_screen = get_current_screen();
$current_screen = $get_screen->post_type;
$post_type="product"; // change post type here
if ($current_screen == $post_type ) {
remove_post_type_support( $current_screen, 'editor' ); // remove editor from support argument
}
}