-
Notifications
You must be signed in to change notification settings - Fork 219
Single Product Template - Related Products: fix items per page option #9286
Single Product Template - Related Products: fix items per page option #9286
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: 0 B Total Size: 1.11 MB βΉοΈ View Unchanged
|
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.
Works as expected! πͺ
I would only suggest testing steps improvement, to avoid confusion:
- Focus the Related Products block.
- Change the option Items per Page, for example put 1. (check the image below)
It's a Related Products Controls block that allows changing Items per Page, not Related Products.
Thanks for the review! I updated the testing instructions! I will merge after the E2E tests pass! |
π€ Generated by Copilot at 57a4e90
Summary
π οΈππ’
Added
posts_per_page
parameter toRelatedProducts
block query. This lets users control the number of related products displayed in the block.Walkthrough
posts_per_page
parameter to the query array returned bybuild_query
function inRelatedProducts
class (link). This allows the block to display the user's chosen number of related products in the editor and the frontend.Fixes #9122
Testing
User Facing Testing
Upgrade to Blockified Single Product template
.Related Products Controls
block.Items per Page
, for example put 1. (check the image below)WooCommerce Visibility
Performance Impact
Changelog