- This topic has 10 replies, 4 voices, and was last updated 1 year, 5 months ago by Leo.
-
AuthorPosts
-
March 21, 2020 at 4:43 pm #1202172johnaps
Hello!
I am currently trying out generateblocks! Gudos on the release, always happy for your developments in any kind of plugin!
I just want to ask cause i have an ecommerce store (woocommerce)
Can i use it on product pages? Like lets say elementor lets you costumize the body of product pages just as you want…? is there a way to do this? It would be superawesome i think!!March 22, 2020 at 5:22 am #1204456DavidStaffCustomer SupportHi there,
not yet there isn’t. Maybe something for the future 😉
March 22, 2020 at 7:34 am #1205612johnapsWould be great! Maybe a workaround would be to make gutenberg take control of woocommerce product pages? Will look into it…
March 22, 2020 at 8:24 am #1206067DavidStaffCustomer SupportYou can enable the Gutenberg editor on Single Products like so:
// WP 5.0 Woo 3.4.1 or later // Edit Woo Product with Gutenberg function db_enable_gutenberg_single_product($editable, $post_type) { if($post_type == 'product'){ $editable = true; } return $editable; } add_filter('use_block_editor_for_post_type', 'db_enable_gutenberg_single_product', 10, 2);
But this will only allow you to edit the Short Description.
I would expect Woo has full product editing in its future scope.
March 22, 2020 at 2:05 pm #1206549johnapsFound this and i am trying it out, leaving it here for other fellow happy generatepressors!~ (looks complete at first glance…)
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);
March 22, 2020 at 2:47 pm #1206586LeoStaffCustomer SupportThanks for sharing 🙂
December 6, 2020 at 9:57 pm #1569864melvin wangHi Johnnaps,
I’ve enabled gutenberg in Product by using the code below,
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);
Everything work well except the “Product Category” & “Product Tag” are missing at the at the product back end for editorial.
Do you have the similar problem and any solution have you tried to make the “product category” and “product tag” appear?
Notes: Im able to configure out the Rankmath, Reviews, and other fields. But only unable to configure the “Product Category” & “Product Tag”
Thanks
December 7, 2020 at 12:41 am #1570003johnapsI think you can edit them from quick edit on “all products”
December 7, 2020 at 12:52 am #1570013melvin wangHi johnaps,
Thanks for your response. I appreciate it very much.
TQ and have a nice day
Regards,
MelvinNovember 3, 2022 at 9:46 pm #2400881BartoszI experienced a bug where the classic editor was still loading instead and wanted to share an updated solution:
• Changed add_filter $priority from default (10) to a value of 20
• Added taxonomy for WooCommerce category and tags// Enable Gutenberg Blocks in Product Descriptions 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', 20, 2 ); // Show taxonomy for woocommerce category and tags 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' );
November 4, 2022 at 8:55 am #2401797LeoStaffCustomer SupportThanks for sharing!
-
AuthorPosts
- You must be logged in to reply to this topic.