How To Design Awesome Product Pages With Gutenberg In WooCommerce
In this small tutorial I am going to show you how to add Gutenberg to Woocommerce Product pages.
Code
-------------------------------
// 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 );
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' );
---------------------------------------------------------------------------------------------------------
Some AFFILIATE LINKS
MonsterOne | https://bit.ly/3vWebdi
Amazon | https://www.amazon.co.uk/shop/opensou...
Crocoblock | https://bit.ly/3wUnrys
TemplateMonster | https://bit.ly/2RpjTVV
Elementor | https://bit.ly/3cladTI
Cybrancee Website: | https://bit.ly/3fSnllf
Cloudways Hosting | https://bit.ly/3fTS8OC
-------------------------------------------------------------------------------------------------------------------------------------
All opinions in this video are my own, I do not get paid to make this video. Whenever you see a link in any of my videos, if there is an affiliate program available, it's safe to assume that you are clicking on an affiliate link, so when you click on an referral link, and you make a purchase, I may receive a referral fee. There is no additional cost to you. If you would like supporting me please contact me via website. Thanks