d43b3af43f
* feat: Add related by setting to related products collection This commit adds a new setting to the related products collection that allows users to control how products are related. Users can choose to relate products by categories, tags, or attributes. * Remove attributes from related by control This commit removes the attributes option from the related by control in the Product Collection block. This option was not being used in the backend and was potentially misleading to users. Changes made: - Removed attributes checkbox from RelatedByControl component - Removed attributes from RelatedBy type definition - Cleaned up PHP code by using PHP_INT_MAX instead of magic number * feat: Set default values for related by setting This commit sets the default values for the relatedBy setting in the Product Collection block. By default, products will be related by both categories and tags. * Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce * Add tracking for related-by filter * Add e2e test for "Related by" setting in Related Products collection * Remove unused import for VStack * Add optional chaining operator for query.relatedBy Since relatedBy is an optional prop, add the optional chaining operator to safely access it and prevent potential undefined property access errors. * Add tracking for related by changes in Product Collection block This commit adds tracking for when users change the "Related by" settings in the Product Collection block inspector controls. It records whether categories and tags are enabled or disabled. * Update panel title from "Relate by" to "Related by" * Remove `blocks_product_collection_inspector_control_related_by_changed` track event --------- Co-authored-by: github-actions <github-actions@github.com> |
||
---|---|---|
.. | ||
inspector-advanced-controls | ||
inspector-controls | ||
toolbar-controls | ||
ProductPicker.tsx | ||
collection-chooser.tsx | ||
collection-selection-modal.tsx | ||
editor.scss | ||
index.tsx | ||
product-collection-content.tsx | ||
product-collection-placeholder.tsx |