WC_Post_Types::gutenberg_can_edit_post_type() public WC 1.0
Disable Gutenberg for products.
{} Это метод класса: WC_Post_Types{}
Хуков нет.
Возвращает
true/false.
Использование
$result = WC_Post_Types::gutenberg_can_edit_post_type( $can_edit, $post_type );
- $can_edit(true/false) (обязательный)
- Whether the post type can be edited or not.
- $post_type(строка) (обязательный)
- The post type being checked.
Код WC_Post_Types::gutenberg_can_edit_post_type() WC Post Types::gutenberg can edit post type WC 5.0.0
public static function gutenberg_can_edit_post_type( $can_edit, $post_type ) {
return 'product' === $post_type ? false : $can_edit;
}