Repository navigation
Limit the number of requests for products in Editor - #60863
Conversation
Testing GuidelinesHi @gigitux @dinhtungdu , Apart from reviewing the code changes, please make sure to review the testing instructions (Guide) and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed. Reminder: PR reviewers are required to document testing performed. This includes:
|
|
Size Change: +97 B (0%) Total Size: 5.84 MB |
Test using WordPress PlaygroundThe changes in this pull request can be previewed and tested using a WordPress Playground instance. Test this pull request with WordPress Playground. Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit. |
📝 WalkthroughWalkthroughAdds a changelog entry and updates editor block logic to limit unnecessary product data requests by conditionally wiring product data. Introduces an experimental REST API flag in the Price block, splits Product Template rendering into data-wired vs non-wired paths based on context, and refines product ID selection in the product data HOC. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant E as Editor (Gutenberg)
participant PT as ProductTemplate (edit.tsx)
participant PC as ProductContent / ProductContentWithProduct
participant H as withProduct / ProductDataContextProvider
participant API as REST API
E->>PT: Render Product Template editor
PT->>PT: Detect parent is 'woocommerce/single-product'?
alt Inside Single Product
PT->>PC: Use ProductContentWithProduct
PC->>H: Wrap with ProductDataContextProvider
H->>API: Fetch product by computed id
API-->>H: Product data
H-->>PC: Provide product context
PC-->>E: Render inner blocks with product data
else Not inside Single Product
PT->>PC: Use ProductContent (no data wiring)
PC-->>E: Render inner blocks without product data
end
sequenceDiagram
autonumber
participant B as Price Block (edit.tsx)
participant FF as Feature Flag
participant API as REST API (v4 experimental)
Note over B,FF: On mount, evaluate isExperimentalWcRestApiV4Enabled() once
B->>FF: Check experimental API flag
alt Flag enabled
B->>B: Render with product + isAdmin=true
B->>API: Use experimental data path
else Flag disabled
B->>B: Render without product + isAdmin=false
Note over B: Legacy/fallback path (old fetching)
end
sequenceDiagram
autonumber
participant H as with-product-data-context.js
participant Q as Query Loop Context
participant API as REST API
H->>Q: Read isDescendentOfQueryLoop, productId, postId
H->>H: id = getProductId(isDescendentOfQueryLoop, productId, postId)
H->>API: Fetch product by id
API-->>H: Product data
H-->>Caller: Provide ProductDataContext
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Pre-merge checks (5 passed)✅ Passed checks (5 passed)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. ✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (7)
plugins/woocommerce/changelog/fix-52960-limit-excessive-product-requests (1)
1-5: Fix changelog format: add Comment key and remove stray character.Woo changelog parser expects a Comment field; a bare line plus a dangling "5" will likely fail validation.
Apply:
Significance: patch Type: performance -Product Collection: limit the number of requests for product data in Editor -5 +Comment: Product Collection: limit the number of requests for product data in the Editorplugins/woocommerce/client/blocks/assets/js/atomic/blocks/product-elements/price/edit.tsx (2)
34-36: Context type missing postId.PriceEdit uses
context.postId(Line 80) butContextdeclares onlyqueryId. This breaks type-safety and can fail TS builds.Apply:
-interface Context { - queryId: number; -} +interface Context { + queryId?: number; + postId?: number; +}
27-32: Align Attributes with stored flags.You set
isDescendentOfQueryLoopandisDescendentOfSingleProductTemplateviasetAttributes, but they’re not inAttributes. Add them to avoid implicitanyand improve editor state stability.interface Attributes { textAlign: 'left' | 'center' | 'right'; - isDescendentOfSingleProduct: boolean; - isDescendentOfSingleProductBlock: boolean; - productId: number; + isDescendentOfSingleProduct?: boolean; + isDescendentOfSingleProductBlock?: boolean; + isDescendentOfSingleProductTemplate?: boolean; + isDescendentOfQueryLoop?: boolean; + productId?: number; }plugins/woocommerce/client/blocks/assets/js/blocks/product-template/edit.tsx (4)
89-99: Fix type mismatches: productId/postId should be numbers.They are numbers in practice (from REST responses), but typed as strings. This later causes equality checks to fail.
type ProductContentProps = { - attributes: { productId: string }; + attributes: { productId: number }; displayTemplate: boolean; blocks: BlockInstance[]; blockContext: { postType: string; - postId: string; + postId: number; }; setActiveBlockContextId: ( id: string ) => void; };
122-158: Type ProductContentWithProduct to remove ts-ignore at call site.Cast HOC output to a component that accepts
ProductContentProps.-const ProductContentWithProduct = withProduct( +const ProductContentWithProduct = ( withProduct( ( { isLoading, product, displayTemplate, blocks, blockContext, setActiveBlockContextId, }: ProductContentProps & { isLoading: boolean; product: ProductResponseItem; } ) => { return ( <BlockContextProvider key={ blockContext.postId } value={ blockContext } > <ProductDataContextProvider product={ product } isLoading={ isLoading } > { displayTemplate ? <ProductTemplateInnerBlocks /> : null } <MemoizedProductTemplateBlockPreview blocks={ blocks } blockContextId={ blockContext.postId } setActiveBlockContextId={ setActiveBlockContextId } isHidden={ displayTemplate } /> </ProductDataContextProvider> </BlockContextProvider> ); } -) ); +) ) as unknown as ( props: ProductContentProps ) => JSX.Element;
236-239: Use numeric state foractiveBlockContextId.It holds product IDs (numbers). The current
stringtype causes===comparisons to fail later.-const [ activeBlockContextId, setActiveBlockContextId ] = - useState< string >(); +const [ activeBlockContextId, setActiveBlockContextId ] = + useState< number | undefined >();
446-466: Remove ts-ignore and fix ID typing in preview rendering.Once
ProductContentWithProductis typed andactiveBlockContextIdis numeric, we can drop the ignore and ensure proper comparisons.- // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore isLoading and product props are missing as they're coming from untyped withProduct HOC. - <ProductContentComponent + <ProductContentComponent key={ blockContext.postId } attributes={ { productId: blockContext.postId, } } blocks={ blocks } displayTemplate={ displayTemplate } blockContext={ blockContext } setActiveBlockContextId={ setActiveBlockContextId } />Also ensure the display toggle compares numbers:
-const displayTemplate = - blockContext.postId === ( activeBlockContextId || blockContexts[ 0 ]?.postId ); +const displayTemplate = + blockContext.postId === ( activeBlockContextId ?? blockContexts?.[ 0 ]?.postId );
🧹 Nitpick comments (3)
plugins/woocommerce/client/blocks/assets/js/atomic/blocks/product-elements/price/edit.tsx (1)
93-113: PassisDescendentOfSingleProductTemplatedirectly to Block.Relying on the async
setAttributesupdate can cause a transient mismatch on first render. Pass the computed value explicitly in both branches.- isExperimentalWcRestApiEnabled ? ( + isExperimentalWcRestApiEnabled ? ( <Block { ...blockAttrs } + isDescendentOfSingleProductTemplate={ + isDescendentOfSingleProductTemplate + } isAdmin={ true } product={ product } isExperimentalWcRestApiV4Enabled={ isExperimentalWcRestApiEnabled } /> ) : ( <Block { ...blockAttrs } + isDescendentOfSingleProductTemplate={ + isDescendentOfSingleProductTemplate + } product={ undefined } isAdmin={ false } isExperimentalWcRestApiV4Enabled={ false } /> )plugins/woocommerce/client/blocks/assets/js/shared/hocs/with-product-data-context.js (1)
36-36: Normalizeidbefore fetching to keep hook input stable.Prevents passing undefined/NaN to
useStoreProducts.-const id = getProductId( isDescendentOfQueryLoop, productId, postId ); +const id = Number( getProductId( isDescendentOfQueryLoop, productId, postId ) ) || 0;plugins/woocommerce/client/blocks/assets/js/blocks/product-template/edit.tsx (1)
70-83: Accessibility/compat: replace deprecated onKeyPress.Use
onKeyDownand react to Enter/Space to keep the element keyboard-activable.- onKeyPress={ handleOnClick } + onKeyDown={ ( e ) => { + if ( e.key === 'Enter' || e.key === ' ' ) { + handleOnClick(); + } + } }
📜 Review details
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
plugins/woocommerce/changelog/fix-52960-limit-excessive-product-requests(1 hunks)plugins/woocommerce/client/blocks/assets/js/atomic/blocks/product-elements/price/edit.tsx(2 hunks)plugins/woocommerce/client/blocks/assets/js/blocks/product-template/edit.tsx(5 hunks)plugins/woocommerce/client/blocks/assets/js/shared/hocs/with-product-data-context.js(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{php,js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/code-quality.mdc)
**/*.{php,js,jsx,ts,tsx}: Guard against unexpected inputs
Sanitize and validate any potentially dangerous inputs
Ensure code is backwards compatible
Write code that is readable and intuitive
Ensure code has unit or E2E tests where applicable
Files:
plugins/woocommerce/client/blocks/assets/js/shared/hocs/with-product-data-context.jsplugins/woocommerce/client/blocks/assets/js/atomic/blocks/product-elements/price/edit.tsxplugins/woocommerce/client/blocks/assets/js/blocks/product-template/edit.tsx
**/*.{php,js,ts,jsx,tsx}
⚙️ CodeRabbit configuration file
**/*.{php,js,ts,jsx,tsx}: Don't trust that extension developers will follow the best practices, make sure the code:
- Guards against unexpected inputs.
- Sanitizes and validates any potentially dangerous inputs.
- Is backwards compatible.
- Is readable and intuitive.
- Has unit or E2E tests where applicable.
Files:
plugins/woocommerce/client/blocks/assets/js/shared/hocs/with-product-data-context.jsplugins/woocommerce/client/blocks/assets/js/atomic/blocks/product-elements/price/edit.tsxplugins/woocommerce/client/blocks/assets/js/blocks/product-template/edit.tsx
🧠 Learnings (3)
📚 Learning: 2025-06-23T05:47:52.696Z
Learnt from: samueljseay
PR: woocommerce/woocommerce#59051
File: plugins/woocommerce/client/blocks/assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-footer-block/index.tsx:66-70
Timestamp: 2025-06-23T05:47:52.696Z
Learning: For WooCommerce mini-cart blocks in plugins/woocommerce/client/blocks/assets/js/blocks/mini-cart/, the standardized conditional pattern for experimental features should be `if ( isExperimentalMiniCartEnabled() ) { blockSettings.save = () => <InnerBlocks.Content />; }` - defaulting to the traditional Save component and only overriding when the experimental feature is enabled.
Applied to files:
plugins/woocommerce/client/blocks/assets/js/atomic/blocks/product-elements/price/edit.tsx
📚 Learning: 2025-06-13T13:37:35.793Z
Learnt from: ralucaStan
PR: woocommerce/woocommerce#58782
File: plugins/woocommerce/client/blocks/assets/js/blocks/checkout/inner-blocks/checkout-shipping-address-block/customer-address.tsx:76-90
Timestamp: 2025-06-13T13:37:35.793Z
Learning: In plugins/woocommerce/client/blocks/assets/js/blocks/checkout/inner-blocks/checkout-shipping-address-block/customer-address.tsx, the `shouldAnimate` flag is expected to be `false` only on initial render and may remain `true` after the first edit; it does not need to be reset.
Applied to files:
plugins/woocommerce/client/blocks/assets/js/atomic/blocks/product-elements/price/edit.tsx
📚 Learning: 2025-07-24T05:37:00.907Z
Learnt from: dinhtungdu
PR: woocommerce/woocommerce#59900
File: plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/inner-blocks/attribute-filter/inspector.tsx:0-0
Timestamp: 2025-07-24T05:37:00.907Z
Learning: The DisplayStyleSwitcher component in plugins/woocommerce/client/blocks/assets/js/blocks/product-filters/components/display-style-switcher/index.tsx has been updated so that its onChange prop accepts only a string type (not string | number | undefined), eliminating the need for type assertions when using this component.
Applied to files:
plugins/woocommerce/client/blocks/assets/js/atomic/blocks/product-elements/price/edit.tsxplugins/woocommerce/client/blocks/assets/js/blocks/product-template/edit.tsx
🧬 Code graph analysis (2)
plugins/woocommerce/client/blocks/assets/js/atomic/blocks/product-elements/price/edit.tsx (2)
plugins/woocommerce/client/blocks/assets/js/settings/blocks/feature-flags.ts (1)
isExperimentalWcRestApiV4Enabled(25-31)plugins/woocommerce/client/blocks/assets/js/atomic/blocks/product-elements/price/block.tsx (1)
Block(68-208)
plugins/woocommerce/client/blocks/assets/js/blocks/product-template/edit.tsx (1)
plugins/woocommerce/client/blocks/assets/js/types/type-defs/product-response.ts (1)
ProductResponseItem(59-103)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build
- GitHub Check: Check Asset Sizes
🔇 Additional comments (4)
plugins/woocommerce/client/blocks/assets/js/atomic/blocks/product-elements/price/edit.tsx (1)
78-79: Good: single evaluation of the feature flag.Caching the flag avoids repeated
getSettingcalls and keeps render cheap.plugins/woocommerce/client/blocks/assets/js/blocks/product-template/edit.tsx (3)
100-121: LGTM on splitting a lean ProductContent.Cuts unnecessary product data wiring for collection previews. Good for perf.
258-266: LGTM: derivingisInSingleProductBlockvia parents.Efficient and avoids extra context wiring in collections.
361-364: LGTM: conditional selection of ProductContent variant.This keeps withProduct only where necessary.
| const isExperimentalWcRestApiEnabled = isExperimentalWcRestApiV4Enabled(); | ||
|
|
||
| const { product } = useProduct( context.postId ); | ||
|
|
There was a problem hiding this comment.
🛠️ Refactor suggestion
Guard useProduct with a numeric postId and avoid conditional hooks.
context.postId may be undefined or a string. Normalize to a number and always call the hook with a safe value.
-const isExperimentalWcRestApiEnabled = isExperimentalWcRestApiV4Enabled();
-
-const { product } = useProduct( context.postId );
+const isExperimentalWcRestApiEnabled = isExperimentalWcRestApiV4Enabled();
+const postId =
+ Number.isFinite( Number( context.postId ) ) ? Number( context.postId ) : undefined;
+const { product } = useProduct( postId as number | undefined );📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const isExperimentalWcRestApiEnabled = isExperimentalWcRestApiV4Enabled(); | |
| const { product } = useProduct( context.postId ); | |
| const isExperimentalWcRestApiEnabled = isExperimentalWcRestApiV4Enabled(); | |
| const postId = | |
| Number.isFinite( Number( context.postId ) ) ? Number( context.postId ) : undefined; | |
| const { product } = useProduct( postId as number | undefined ); |
🤖 Prompt for AI Agents
In
plugins/woocommerce/client/blocks/assets/js/atomic/blocks/product-elements/price/edit.tsx
around lines 78 to 81, the call to useProduct is passed context.postId which can
be undefined or a string; you must always call hooks unconditionally with a
numeric id. Normalize context.postId to a safe number before calling the hook
(e.g. const postId = Number(context.postId) || 0) and then call
useProduct(postId) so the hook always receives a numeric value and you avoid
conditional hook usage.
| const getProductById = ( products, id ) => | ||
| products.find( ( product ) => product.id === id ); |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Ensure strict equality matches by normalizing types.
If id is a string, product.id === id fails. Normalize to number.
-const getProductById = ( products, id ) =>
- products.find( ( product ) => product.id === id );
+const getProductById = ( products, id ) => {
+ const nId = Number( id );
+ return products.find( ( product ) => product.id === nId );
+};📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const getProductById = ( products, id ) => | |
| products.find( ( product ) => product.id === id ); | |
| const getProductById = ( products, id ) => { | |
| const nId = Number( id ); | |
| return products.find( ( product ) => product.id === nId ); | |
| }; |
🤖 Prompt for AI Agents
In
plugins/woocommerce/client/blocks/assets/js/shared/hocs/with-product-data-context.js
around lines 10 to 11, the product lookup uses strict equality without
normalizing types so string ids will not match numeric product.id; update the
function to normalize types before comparing (e.g., coerce the incoming id to a
Number or coerce product.id to string) and then use === for comparison to ensure
correct matches while avoiding loose equality.
| const getProductId = ( isDescendentOfQueryLoop, productId, postId ) => { | ||
| // Keep for backwards compatibility of Products (Beta) block. | ||
| if ( isDescendentOfQueryLoop ) { | ||
| return postId; | ||
| } | ||
|
|
||
| return productId || postId; | ||
| }; | ||
|
|
There was a problem hiding this comment.
🛠️ Refactor suggestion
Coerce IDs to numbers to avoid mismatches and missed lookups.
postId/productId can be strings (e.g., from block context). Ensure getProductId returns a finite number.
-const getProductId = ( isDescendentOfQueryLoop, productId, postId ) => {
+const toInt = ( val ) => {
+ const n = Number( val );
+ return Number.isFinite( n ) ? n : 0;
+};
+const getProductId = ( isDescendentOfQueryLoop, productId, postId ) => {
// Keep for backwards compatibility of Products (Beta) block.
if ( isDescendentOfQueryLoop ) {
- return postId;
+ return toInt( postId );
}
- return productId || postId;
+ return toInt( productId || postId );
};📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const getProductId = ( isDescendentOfQueryLoop, productId, postId ) => { | |
| // Keep for backwards compatibility of Products (Beta) block. | |
| if ( isDescendentOfQueryLoop ) { | |
| return postId; | |
| } | |
| return productId || postId; | |
| }; | |
| const toInt = ( val ) => { | |
| const n = Number( val ); | |
| return Number.isFinite( n ) ? n : 0; | |
| }; | |
| const getProductId = ( isDescendentOfQueryLoop, productId, postId ) => { | |
| // Keep for backwards compatibility of Products (Beta) block. | |
| if ( isDescendentOfQueryLoop ) { | |
| return toInt( postId ); | |
| } | |
| return toInt( productId || postId ); | |
| }; |
🤖 Prompt for AI Agents
In
plugins/woocommerce/client/blocks/assets/js/shared/hocs/with-product-data-context.js
around lines 13 to 21, getProductId may return string IDs which causes lookup
mismatches; coerce postId and productId to numbers and ensure they are finite
before returning. Specifically, when isDescendentOfQueryLoop is true, convert
postId to a Number and return it only if Number.isFinite; otherwise return
undefined/null; when not in a query loop, convert both productId and postId to
Numbers, prefer the finite productId, fall back to a finite postId, and return
undefined/null if neither is a finite number. Ensure no other behavior changes.
| { | ||
| // If experimental WC API is not available we must fallback to "old" way of fetching product data. | ||
| // Once it's available everywhere we can remove this fallback. | ||
| isExperimentalWcRestApiEnabled ? ( |
There was a problem hiding this comment.
Can you explain why we need this? The Block component of the price block already handles the REST API v4 checking.
There was a problem hiding this comment.
Yeah, it does but that creates a gap.
If we pass product from edit.tsx then it's used as a context for Block in block.tsx but then if isExperimentalWcRestApiEnabled is not enabled then the whole mapping here doesn't happen which results in... no data. We kind of tell the provider there's a product data and bail last minute just before rendering.
It worked before this PR only because of withProduct which provided product data no matter what. After getting rid of it, we need to rely on withProductDataContext mechanism that either:
- uses
productif provided (this is the case whenisExperimentalWcRestApiEnabledis true) - fetches
productotherwise.
This is to avoid situation when we provide product that's not enough to display data in editor.
Does it make sense? 😅
There was a problem hiding this comment.
This is to avoid situation when we provide product that's not enough to display data in editor.
Can you provide a specific example? I tested the price display in the Product, All Products, and Products Beta blocks, and it shows correctly in all cases.
In the Block component of the price block, we only use the passed product context in the following location:
If the experimental REST API is not available, it passes undefined to useProductDataContext. Checking for REST API v4 in the Edit component does not seem to make a difference.
There was a problem hiding this comment.
Here's the demo with this condition reverted: #60889 (branch name: try/revert-price-edit-demo). When you insert Product Collection there is no price displayed.
I made a mistake in previous explanation trying to base on memory, apologies. So here's how the broken flow goes (if we removed this condition):
- In
edit.tsxwe pass product fromuseProduct - Then
block.tsxexports Block wrapped withwithProductDataContext
3.Here
because inAdmin is true and we have a product OriginalComponent is returned without going through OriginalComponentWithContext which actually renders a context provider.
4. So then, when we go into block.tsx and make a decision to fallback to product provider in the place you showed:
it returns the default product (id: 0, price: 0 etc.) because there's no provider.
Does that explain it better? We can sync if that would be helpful 😄
There was a problem hiding this comment.
So we need this condition to make sure block is wrapped with ProductDataContextProvider in here
otherwise we can't fallback in block.tsx since it's too late.
dinhtungdu
left a comment
There was a problem hiding this comment.
Thank you for the explanation. It looks good to me now!
Submission Review Guidelines:
Changes proposed in this Pull Request:
Product Collection was using
withProductHOC that has no caching and that had terrible effect on Editor when viewing All Templates (and similar views presenting many templates) resulting in product requests for each product in each preview.Also, we're doing another set of requests for each product since we're migrating product elements to new data source (via
@wordpress/core-data). This one is cached and shared between previews so only happens once.This PR makes the Product Collection rely on
useStoreProducthook inside ofwithProductDataContextHOC that was skipped due to always relying onwithProduct. TheuseStoreProductis cached so only single request per product happens across previews.In practical example, let's say we had 5 instances of Product Collection displaying 30 products each.
Was: 5 blocks * 30 requests from withProduct + 30 from core-data = 180 requests
Is: 30 requests from useStoreProduct + 30 from core-data = 60 requests.
Overall:
N - Product Collection nblocks
M - products
Was: N * M + M requests
Is: 2 * M requests
The more templates (and template parts!), the more gains.
Practical test:
productsFetch/XHR requestsproductskeyword but the diff is signifcantNote: keep in mind we need
withProductstill if Product Collection is used within Single Product block but that's acceptable since it's much more rare case.Closes #60795
Closes #52960
(For Bug Fixes) Bug introduced in PR # .
Screenshots or screen recordings:
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Product Collection - performance gain
productstrunkthere should be multiple)Note: it is possible there is some more if you use Single Product block somewhere on your pages. Some other blocks may do some other request as well, then check other product id. But the rule of thumb is we're looking for 2 requests coming from Product Collection.
Product Collection - correct data displayed
Single Product + Product Collection
Legacy - All Products
Legacy - Product (Beta)
Testing that has already taken place:
Changelog entry
Changelog Entry Details
Significance
Type
Message
Changelog Entry Comment
Comment