Deshabilitar Gutenberg para ciertos CPT

    Controla los Custom Post Types para los que estará habilitado el editor de bloques. En este ejemplo se usa el post type product de WooCommerce.

    // Use hook return apply_filters( 'gutenberg_can_edit_post_type', $can_edit, $post_type );
    function nwp_gutenberg_disable_cpt($can_edit, $post_type){
    
      if($post_type == 'product'){
        $can_edit = false;
      }
      return $can_edit;
    }
    add_filter('gutenberg_can_edit_post_type', 'nwp_gutenberg_disable_cpt', 10, 2);