Disabling Gutenberg for one post type only

A site where the new editor is right for pages and wrong for a heavily customised product type needs the decision per type rather than globally.

add_filter( 'use_block_editor_for_post_type', function ( $use, $post_type ) {
    if ( 'product' === $post_type ) {
        return false;
    }

    return $use;
}, 10, 2 );

This is the core filter and it is more precise than the Classic Editor plugin’s all-or-nothing setting, which makes it the right tool for a staged migration — move one post type at a time and keep the rest working. The filter name changed during 5.0 development, so examples from the beta period use gutenberg_can_edit_post_type and silently do nothing. Anything returning false here should carry a comment saying what has to be built before it can be removed.