-
Notifications
You must be signed in to change notification settings - Fork 219
Blockified Single Product Template: Show upsells. #9636
Conversation
The release ZIP for this PR is accessible via:
Script Dependencies ReportThe
This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: +88 B (0%) Total Size: 1.09 MB
ℹ️ View Unchanged
|
4b27966
to
511269e
Compare
'hooked' => array( | ||
'woocommerce_output_product_data_tabs' => 10, | ||
'woocommerce_upsell_display' => 15, | ||
// We want to display the upsell products after the last block that belongs to the Single Product. | ||
// 'woocommerce_upsell_display' => 15. |
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.
This tested nicely however it seems very counterintuitive that commenting out the woocommerce_upsell_display
is the solution to display upsells
. Can you explain this?
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.
This PR restores the action that renders the grid that includes the upsell products.
The Compatibility Layer removes the default callbacks added to hooks by WooCommerce. This is necessary to avoid duplicate content (since that with the blockified templates, blocks render the HTML). As discussed in #9610, it could not sense that the merchant should see/add a block for product customization on the Single Product Template (a generic template). Since that, we want to enable the blockified templates in the next release, I think that enabling the default callbacks that render the upsells, is a good approach, at least for now.
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.
👍
This is a partial fix for woocommerce/woocommerce#42358. As @manospsyx noticed, it could not be the best approach to have every product feature represented by a Block in the Single Product template. It is necessary an in-depth discussion about the best approach. In the meantime, I think that we should restore the possibility to display the upsell products on the blockified Single Product Template (since that we will enable them in the new store #9551).
This PR restores the action that renders the grid that includes the upsell products.
Fixes #
Screenshots
Testing
Automated Tests
User Facing Testing
WooCommerce Visibility
Performance Impact
Changelog