To enable Gutenberg block editor on the WooCommerce product page you just need to insert a small code snippet into your functions.php Please flow the below process to do it.
What is Gutenberg?
Gutenberg is a brand new editor for the WordPress platform. It will radically change the way you create posts, pages, products, and just about everything else on your site. Gutenberg arrived as part of WordPress 5.0, which was released on November 27, 2018. For that reason, it’s important to get up to speed now.
Enable Gutenberg Block Editor on WooCommerce Product Page
- Login to your WordPress Website.
- Click on Appearance
- Navigate to Theme file Editor
- Then open the functions.php file.
- Then paste the below code into the file and update the file.
function codepopular_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', 'codepopular_activate_gutenberg_products', 10, 2);
What Video to Enable Gutenberg
How to Disable Gutenberg Block Editor?
If you don’t want to use Gutenberg block editor then you can remove it easily. We have a block about How to remove the Gutenberg Block editor. If you need any kind of help Please feel free to contact us we will try to reply to you as soon as possible.
Hi, My name is Shamim. I am a freelance PHP developer in Bangladesh. I have been working as a freelance developer since 2014. I am a passionate and creative web development person. As a senior level, I focus on your requirements in detail and deliver high-quality work on your budget.
Thank you for the great guide!
A plugin is available now to do it without coding: https://wordpress.org/plugins/blocks-product-editor-for-woocommerce/