I too am experiencing this.
I have enabled the Gutenberg editor for WooCommerce products using the below code.
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);
I am now unable to remove these blocks.
This update has also broken my custom content-single-product.php
I also have the below code to add WooCommerce categories to the body class, which is now throwing an error.
add_filter('body_class', 'wc_cat_names');
function wc_cat_names($classes)
{
if (is_product()) {
global $post;
$terms = get_the_terms($post->ID, 'product_cat');
foreach ($terms as $term) {
$classes[] = $term->slug;
}
}
return $classes;
}
Warning: Invalid argument supplied for foreach() in?/Users/EXAMPLE/Development/local/wp-content/themes/EXAMPLE/inc/woocommerce.php?on line?287