Your cart is currently empty!
How to enable Gutenberg Editor in WooCommerce
If you put the code below in functions.php and save it, you will be able to use Gutenberg Editor with WooCommerce.
// Enable Gutenberg on 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 );
// Turn on Gutenberg and enable taxonomy fields for woocommerce
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' );
Comments
Featured products
-
[WAV] Hiphop and Rap Music – Genx Beats
$7.00 or more -
[WAV] Hiphop and Rap Music Vol. 2 – Genx Beats
$7.00 or more -
[WAV] Hiphop and Rap Music Vol. 3 – Genx Beats
$7.00 or more
Leave a Reply