Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Disable Gutenberg support for CPT 'product' in WooCommerce
Plugin Name: Gutenberg - disable CPT
Description: Отключаем поддержку Gutenberg для постов типа Продукт
Author: uptimizt
Version: 1.0
Author URI:
// Use hook return apply_filters( 'gutenberg_can_edit_post_type', $can_edit, $post_type );
function u7_gutenberg_disable_cpt($can_edit, $post_type){
if($post_type == 'product'){
$can_edit = false;
return $can_edit;
add_filter('gutenberg_can_edit_post_type', 'u7_gutenberg_disable_cpt', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment