4ca6696f12
* Add order reference to Upsells and Cross-sells - Added 'order' to usesReference in cross-sells and upsells - Updated LinkedProductControl for order context - Enhanced ProductCollection to handle order references * Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce * Add PHP code for Cross-sells collection * Fix formatting * Add E2E tests 1. In the Cart Template, it checks that "From products in the cart" is selected by default for the "My Custom Collection - Cart Context". 2. In the Order Confirmation Template, it verifies that "From products in the order" is chosen by default for the "My Custom Collection - Order Context". * Add 'block' scope to cross-sells collection * Extract and use reference type constants This commit extracts the REFERENCE_TYPE_CART and REFERENCE_TYPE_ORDER constants to the top of the file and updates their usage throughout the code, including in the getFromCurrentProductRadioLabel function. * Align variable naming for product references in Product Collection This commit updates the ProductCollection class to ensure consistency in variable naming for product references across different collection types, particularly aligning with the naming convention used in Upsells. * Add "hadOrderReference" to conditional label display Key changes: - Removed `isUsesReferenceIncludesCart` parameter from `getFromCurrentProductRadioLabel` - Introduced `hasCartReference` and `hasOrderReference` parameters for consistency - Updated conditional logic to check for both cart and order references - Adjusted the function call in `LinkedProductControl` to pass both new parameters * Fallback to 0 for orderId in get_product_ids_from_order calls --------- Co-authored-by: github-actions <github-actions@github.com> |
||
---|---|---|
.. | ||
e2e | ||
js | ||
mocks/woo-test-helper | ||
utils |