* Fix: Product collection inspector control showing empty section
Previously, the inspector controls were always rendering a PanelBody element even
when the collection type wasn't hand-picked, resulting in an empty section being
displayed. This change moves the PanelBody inside the conditional rendering so
it only appears when hand-picked products are being used.
Also adds missing placeholder text to the Hand-Picked products control to improve
user experience.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Introducing order status constants
* Replacing static calls
* Using order status constants in unit tests
* Additional comment blocks
* Updating PHP docs
* Updating PHP docs
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint issues
* Fix lint issues
* Fix lint issues
* Removing unnecessary order statuses group constants + more documentation
* Including the 'new' status (legacy)
* Merge branch 'dev/introducing-order-status-constants' of https://github.com/woocommerce/woocommerce into dev/introducing-order-status-constants
* Moving statuses to a new enum class
* Fix CS issues
* Fix lint issues
* Minor doc improvement
* Changing namespace to make it less granular
* Adding missing documentation for existing filters
* Update plugins/woocommerce/src/Enums/OrderStatus.php
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Update plugins/woocommerce/includes/class-wc-order.php
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Update plugins/woocommerce/src/Enums/OrderStatus.php
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Making the order status class final
* Adding missing filter comments
* Moving conditional filter back to if statement
* Merge branch 'dev/introducing-order-status-constants' of https://github.com/woocommerce/woocommerce into dev/introducing-order-status-constants
* Adding 'since' annotation to fix lint errors
* Adding 'since' annotation to fix lint errors
* Updating implementation with base branch
* Add changefile(s) from automation for the following project(s): woocommerce
* Replacing full namespace with class import
* Fix classes still using the old constant format
* Revert use of draft order status
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Co-authored-by: Vladimir Reznichenko <kalessil@gmail.com>
* Do not listen to changes made through the Options API before init.
This specifically relates to the Features Controller, which currently loads a list of feature definitions (and that involves translating strings, which is not recommended before init). Since we do not expect features to be enabled/disabled this early, this should be a reasonable adjustment.
* Update plugins/woocommerce/src/Internal/Features/FeaturesController.php
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
---------
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
* Fix CES style for WP 6.7 -- there has been HTML structure change with a different class name
* Add changefile(s) from automation for the following project(s): @woocommerce/customer-effort-score
---------
Co-authored-by: github-actions <github-actions@github.com>
* Hide product grid blocks from inserter
* Expose collections in the inserter
* Arrange collections imports alphabetically and registering by usage
* Add new keywords to collections
* Update tests
* Update block references
* Add changelog
* Update docs manifest
* Fix typo in collection name in test
* MAke adjsutments and cleanup of collections keywords
* Add one more keyword
* Hide Related Products from inserter
* Replace legacy Related Products with collection when transforming classic template into block one
* Replace legacy Related Products with collection in blockified Single Product Template
* Update block references and doc manifest
* Update block references
* Update tests to reflect new collection names
* Bring back pnpm-lock to original state
* Update Related Products E2E tests
* Fix the last Related Products test
* Add default queryId to Related Products pattern
* Regenerate block references and docs manifest
* Update product filters active block to new structure
* Build active chips items
* Add changelog
* Remove unneeded line-height
* Fix linting
* Fix e2e tests
* Refactor removeText
* Clean up
* Add clear button even without group
* Fix stock status name in e2e test
* Remove heading block
* Remove unused i18n module
* Remove period
* Add clear button variation description
* Fix typo
* Rename active chips to removable chips
* Extract data items from removable chips to make it reusable
* Fix e2e tests
* Add frontend script loading to null
* Don't render the block if no active filters
* Disable clear button by default
* Clean up
* Hide with iAPI
* Fix linting and e2e
* fix: add hidden tag serverside
---------
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
* Use WP 6.7 RC2 for Blocks env
* Update edited template heading selector
* Change selector in revertTemplate util due to issue in GB (WP 6.7)
* Update edited template heading selector in another suite
* Use page instead of editor.canvas to access components-popover
* Add changelog
* Update editor heading selector
* Update editor heading selector
* Fetch order snapshot for HPOS
* Fetch order snapshot for legacy order storage
* Include snapshot generation time
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix linter error
* Add unit test for order snapshot data
* Add unit test for snapshot generation time
* Fix phpcs error
---------
Co-authored-by: github-actions <github-actions@github.com>
* Optimize Coming Soon badge performance with early exits
Improves performance by preventing unnecessary code execution for non-admin users:
- Add early exit in setup_hooks() for non-admin users
- Move hook registration to init to ensure WordPress is loaded
- Prevent badge-related actions from being registered for non-privileged users
This change reduces unnecessary code execution and improves overall
performance by isolating the Coming Soon badge functionality to only
run for authenticated admin users.
* Add changelog
* Fix permission check
* Adds two new docs in Extensions and updates three general docs
* Removes LocalWP reference
* Updates manfiest
* Fixes new line linting issue
* Updates manifest.json
---------
Co-authored-by: Shani Banerjee <shanibanerjee@Shanis-MBP.lan>
* Introducing order status constants
* Replacing static calls
* Additional comment blocks
* Updating PHP docs
* Updating PHP docs
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix lint issues
* Fix lint issues
* Fix lint issues
* Removing unnecessary order statuses group constants + more documentation
* Including the 'new' status (legacy)
* Merge branch 'dev/introducing-order-status-constants' of https://github.com/woocommerce/woocommerce into dev/introducing-order-status-constants
* Moving statuses to a new enum class
* Fix CS issues
* Fix lint issues
* Minor doc improvement
* Changing namespace to make it less granular
* Adding missing documentation for existing filters
* Update plugins/woocommerce/src/Enums/OrderStatus.php
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Update plugins/woocommerce/includes/class-wc-order.php
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Update plugins/woocommerce/src/Enums/OrderStatus.php
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Making the order status class final
* Adding missing filter comments
* Moving conditional filter back to if statement
* Merge branch 'dev/introducing-order-status-constants' of https://github.com/woocommerce/woocommerce into dev/introducing-order-status-constants
* Adding 'since' annotation to fix lint errors
* Adding 'since' annotation to fix lint errors
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Co-authored-by: Vladimir Reznichenko <kalessil@gmail.com>
* Product Collection: Add "Rating, low to high" and "Rating, high to low" sorting options
This commit adds a new sorting option to the Product Collection block that allows
sorting products by rating from low to high. The existing "Top Rated" option has
also been renamed to "Rating, high to low" for consistency.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* introduce file to define collection data types
* do not define `results` always like an array
* update passing types to useCollection intances
* allow to set the useCollectionData response type
* reuse RatingValues type
* tidy collection types in status filter
* clean types defined in type-defs pck
* change changelog type
* update attribute filter
* move Collection Data types to product-collection folder
* update WCStoreV1ProductsCollectionProps path
* improve defining the results type for the collection
* update path to import product collection types
* fix path to import RatingValues type
* Move email preview rendering into separate class
* Allow setting WC_Email $object
This is needed so in an email preview, we can set order to be rendered in an email
* Render "Processing order" with dummy order in email preview
* Always show shipping address in email preview
* Allow fetching dummy email preview product
* Add changelog
* Add unit test for EmailPreview
* Clean up filters after rendering email preview
* Improve duplicate filter comment
* Replace __return_true with a function to prevent accidental filter removal
* Avoiding shipping calculator prop drilling with context
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* useCallback for update functions
---------
Co-authored-by: github-actions <github-actions@github.com>
* Fix Product Collection rendering inside Single Product block
This commit addresses issue #51352 where the Product Collection block
inside a Single Product block was not rendering correctly on the frontend.
Specifically, the first product in the collection was being replaced by
the product selected in the parent Single Product block.
* Add changefile(s) from automation for the following project(s): woocommerce
* Fix issue for core/post-template block too
---------
Co-authored-by: github-actions <github-actions@github.com>