If you’ve ever opened a WooCommerce product page and wondered where the block editor went, you’re not alone. By default, WooCommerce doesn’t enable the Gutenberg editor on product pages, which means you’re stuck with the classic editor while the rest of your site gets to build with blocks. Frustrating, right? The good news is there’s a simple fix, and you can get the Gutenberg editor working on your WooCommerce product pages in just five steps. Let’s get into it.
How to Enable the Gutenberg Editor in WooCommerce
At the time of this post, WooCommerce has not issued an update to enable the Gutenberg editor when you are adding or editing your products. That means when you add or product to your WooCommerce store, you are working with the old classic WordPress editor and it’s not nearly as customizable as the rest of your website.
Better with Video? Watch below!
Step 1: Install and Activate the WPCode Plugin
First, head to your WordPress dashboard and go to Plugins > Add New. Search for “WP Code” in the search bar in the top right. When it appears in the results, click Install Now, and then click Activate once it finishes installing.
Once the plugin is activated, you’ll see a new option in the left sidebar of your WordPress dashboard called Code Snippets. That’s where we’re headed next.
Step 2: Open Code Snippets
Click on Code Snippets in your dashboard sidebar. You’ll notice that WPCode comes pre-loaded with some automatic codes, but don’t worry about those — they’re all inactive by default, so nothing turns on automatically just from installing the plugin.
Step 3: Add a New Custom Snippet
At the top of the page, click Add New and then select Add Your Custom Code (New Snippet). When the pop-up appears, scroll to the bottom and make sure you select PHP Snippet as the code type. This step is important — if you accidentally select HTML or another type, the code won’t work correctly. If you do select the wrong type, you can change it from the dropdown in the top right corner of the editor.
Step 4: Name Your Snippet and Add the Code
Give your snippet a name that clearly describes what it does so you can find it easily later. Something like “Enables Gutenberg Editor for WooCommerce” works great.
Next, copy the code provided below and paste it into the snippet editor.
Note: WooCommerce 7.7.0 introduced a template update that broke the older version of this code. If you followed an earlier version of this tutorial, replace your old code with the updated snippet below. The new code works with all current versions of WooCommerce.
// Disable new WooCommerce product template (from Version 7.7.0)
function restored_reset_product_template($post_type_args) {
if (array_key_exists('template', $post_type_args)) {
unset($post_type_args['template']);
}
return $post_type_args;
}
add_filter('woocommerce_register_post_type_product', 'restored_reset_product_template');
// Enable Gutenberg editor for WooCommerce
function restored_activate_gutenberg_product($can_edit, $post_type) {
if ($post_type == 'product') {
$can_edit = true;
}
return $can_edit;
}
add_filter('use_block_editor_for_post_type', 'restored_activate_gutenberg_product', 10, 2);
// Enable taxonomy fields for woocommerce with gutenberg on
function restored_enable_taxonomy_rest($args) {
$args['show_in_rest'] = true;
return $args;
}
add_filter('woocommerce_taxonomy_args_product_cat', 'restored_enable_taxonomy_rest');
add_filter('woocommerce_taxonomy_args_product_tag', 'restored_enable_taxonomy_rest');;
Step 5: Activate and Save Your Snippet
Before you hit save, flip the toggle in the top right corner of the editor to set the snippet to Active. If you save it while it’s still set to Inactive, the code won’t do anything. Once the toggle is flipped on, go ahead and click Save Snippet.
That’s it. Now when you go to Products and click Add New Product, you’ll see the full Gutenberg block editor — the same one you use when editing your blog posts and pages. No more classic editor on your product pages.
Frequently Asked Questions
Can you enable the Gutenberg editor in the short description area of a WooCommerce product?
Unfortunately, no. The short description field in WooCommerce is a separate text area and it does not support the block editor. This is a WooCommerce limitation, not something that can be changed with a code snippet. For the short description, you’ll continue using the plain text field as usual. The good news is that most of the content you’d want to build with blocks — product details, image layouts, feature callouts — belongs in the main description area anyway, and that’s exactly where this tutorial helps you out.
Will enabling Gutenberg affect my existing WooCommerce products?
Not at all. Any products you’ve already built with the Classic Editor will stay exactly as they are. Enabling Gutenberg only changes what editor loads when you open a product for editing going forward. Nothing on your live store changes automatically, and none of your existing product content is touched. If you’d like to rebuild an existing product with blocks at some point, you absolutely can — just open it, convert it to blocks, and redesign to your heart’s content. But that’s entirely your choice, and it won’t happen unless you make it happen.
Do I need to know how to code to follow this tutorial?
Nope. You’re simply copying and pasting a pre-written snippet into WPCode. No coding knowledge required at all. The plugin handles everything behind the scenes, and all you’re doing is telling WooCommerce to load a different editor. If you can copy and paste, you can do this.
Will this break anything on my WooCommerce store?
It shouldn’t. This is a targeted code snippet that only affects the product editor experience inside your WordPress dashboard. It doesn’t touch your frontend store, your checkout process, your cart, or any customer-facing pages. Your shoppers won’t notice a thing — the only difference is on your end, where you’ll now have a much better editing experience when building out your products.
What version of WooCommerce does this work with?
The code included in this tutorial is compatible with WooCommerce 7.7.0 and newer. If you’re running an older version and followed a previous tutorial, make sure you swap out the old code for the updated snippet below. Keeping WooCommerce up to date is always a good idea for security and compatibility reasons, so if you haven’t updated in a while, now is a great time to do that too.
If this tutorial got you thinking about everything else that goes into setting up a WooCommerce shop, you might love our Digital Shop Sprint Academy. It covers all things digital shop — from setting up your products and pages to the strategy behind selling. Think of it as your complete roadmap for building a shop that actually works.
Ready to turn your ideas into something more?
Our feminine WordPress themes are designed to help you build a beautiful, professional website — whether you’re starting a blog, selling products, or growing a business.


Great, simple and to the point. Should work like a charm. Thanks!
thanks this Snippet code . it’s working.
You’re very welcome!
I got an error that says:
Snippet automatically deactivated due to an error on line 2:
Syntax error, unexpected ‘316’ (T_LNUMBER), expecting ‘(‘.
Uh oh! I just got that fixed, so the code there now will work for you!
Thank you so much. It worked for me.
I can’t edit the Product’s “Short Description” when this is enabled. Any luck fixing it?
I just did some testing, and it’s working for me! Did you replace the entire bit of code?
This code worked like a charm. Thank you so much. My question is, will that code still work when the WooCommerce update comes? I don’t want to break my website. I hope you can understand my worry.
It should still work fine with future Woo updates. If for some reason it stops working, I will update this post.
Thank you so much. This woks perfectly for me.
How do you change the location that gutenberg can edit? For me it seems that i can only add elements to the description. Anybody have an idea how to change that?
As of now, this only works for the main large description area and not the small description.
An excellent guide for WooCommerce users looking to enhance their product pages with the Gutenberg editor!
This gives me the Gutenberg editing experience, however the blocks only go into the standard “description” tab of the product template.
This is correct! The short description space can’t be turned into the GB editor.