Site icon WPlook Themes

How to enable Gutenberg for WooCommerce Products

In WooCommerce 3.4.1, the Gutenberg for products has been disabled. Here is a code if you want to activate it.

function wplook_activate_gutenberg_products($can_edit, $post_type){
	if($post_type == 'product'){
		$can_edit = true;
	}
	
	return $can_edit;
}
add_filter('gutenberg_can_edit_post_type', 'wplook_activate_gutenberg_products', 10, 2);

Use the following code if you work with WordPress 5.0

function wplook_activate_gutenberg_products($can_edit, $post_type){
	if($post_type == 'product'){
		$can_edit = true;
	}
	
	return $can_edit;
}
add_filter('use_block_editor_for_post_type', 'wplook_activate_gutenberg_products', 10, 2);

If you are a non-technical user, our support team can do this small job for you. The only thing you have to do is order a small job, and we will provide the service in less than 24 hours.

Exit mobile version