WC_Post_Types::gutenberg_can_edit_post_type()
Disable Gutenberg for products.
Method of the class: WC_Post_Types{}
No Hooks.
Return
true|false
.
Usage
$result = WC_Post_Types::gutenberg_can_edit_post_type( $can_edit, $post_type );
- $can_edit(true|false) (required)
- Whether the post type can be edited or not.
- $post_type(string) (required)
- The post type being checked.
WC_Post_Types::gutenberg_can_edit_post_type() WC Post Types::gutenberg can edit post type code WC 9.7.1
public static function gutenberg_can_edit_post_type( $can_edit, $post_type ) { return 'product' === $post_type ? false : $can_edit; }