I have the same issue when trying to edit existing products. When trying to add new products, while the Gutenberg editor is activated for products, I have similar issues, as posted in this thread.
Best regards
Julian
Hi Julian,
I’m sorry that you also have the same problem, but did WooCommerce support reply to you?
I hope they’ll fix the problem soon…
Hi there @paroleinlinea
Thanks for reaching out!
I understand you get an error message when using Block editor on existing products.
The content of your post doesn’t match the template assigned to your post type.
It appears that a workaround snippet is available for this issue as mentioned in this thread.
Could you try that out?
Hi @kaushiksomaiya
Thank you for the link.
As advised in it, I added this code to the function.php file:
function 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', 'reset_product_template' );
At the moment it seems it fixed the problem!
Thank you!
I’ll test the single products for a couple of days to check if everything works.
Best,
Cristina 🙂
Hi @paroleinlinea
You are most welcome and we’re glad that worked! 🙂
I will be marking this thread as resolved. Should you have further inquiries, kindly create a new topic here.
Meanwhile, if you have a moment to spare, we would love it if you could share your thoughts with us by leaving a review or feedback. Your experience and feedback are important to help us improve and ensure we’re always providing the best possible support.
Thanks!