-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Product Block Editor: Make it compatible with WooCommerce 8.6 #2249
Product Block Editor: Make it compatible with WooCommerce 8.6 #2249
Conversation
…nit' action handler.
…oocommerce_block_template_area_{$template_area}_after_add_block_{$block_id}" action handler.
…ProductBlocksService` and set its min support WC version to 8.6. Remove `PageController::is_admin_page()` due to a breaking change in WooCommerce 8.6. - The template of Product Block Editor is changed to be fetched via `/wc/v3/layout-templates` REST API. Ref: woocommerce/woocommerce#43589
…rted product types. In WooCommerce 8.6, the Product Block Editor starts supporting the grouped and external product types but they share the same template "simple-product".
…t been released yet.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## feature/support-product-block-editor #2249 +/- ##
========================================================================
+ Coverage 61.5% 63.1% +1.6%
- Complexity 4185 4188 +3
========================================================================
Files 748 455 -293
Lines 21538 17823 -3715
Branches 532 0 -532
========================================================================
- Hits 13244 11238 -2006
+ Misses 7843 6585 -1258
+ Partials 451 0 -451
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @eason9487, thanks for keeping this work up to date with the changes in core.
I'm seeing the Google Listings & Ads tab in the expected locations and only for the relevant product types so LGTM ✅
…0 has not been released yet." This reverts commit 955a9a6.
fc2ee13
into
feature/support-product-block-editor
Changes proposed in this Pull Request:
In WooCommerce 8.6, the Product Block Editor has some breaking changes:
/wc/v3/layout-templates
REST API.Before adjusting, some preprocessing makes the
ProductBlocksService
class easier to test:'init'
action handler."woocommerce_block_template_area_{$template_area}_after_add_block_{$block_id}"
action handler.To be compatible with the above, it requires a few adjustments:
ProductBlocksService
and set the minimum support WC version to 8.6.📌 Checklist for @eason9487
https://github.com/woocommerce/woocommerce/blob/8.6.0/[...]
point to the correct lines of code.Screenshots:
Kapture.2024-02-08.at.17.22.06.mp4
Detailed test instructions:
📌 Prepare test environment
npm install
npm start
📌 Test the visibility of this extension's tab and blocks
💡 By default, the supported product types of this extension are simple, variable, and variation.
Changelog entry