Using Blocks inside Product Pages
-
Hello,
I used the following code to enable the Gutenberg
// enable gutenberg for woocommerce function 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', 'activate_gutenberg_product', 10, 2 ); // enable taxonomy fields for woocommerce with gutenberg on function enable_taxonomy_rest( $args ) { $args['show_in_rest'] = true; return $args; } add_filter( 'woocommerce_taxonomy_args_product_cat', 'enable_taxonomy_rest' ); add_filter( 'woocommerce_taxonomy_args_product_tag', 'enable_taxonomy_rest' );
Is it possible to add WooCommerce Blocks to the products, I tried it on a test website where it did not work, it could be a problem with the code above or with WooCommerce Blocks. (I would like to get the list of all products working)
Thanks in advance,
Auke Hendriks
- The topic ‘Using Blocks inside Product Pages’ is closed to new replies.