Whenever a category is requested, we need to do an additional request with the category param being the current category (overriding extensions/theme/business services).
Ideally the backend API would make a distinction between type (theme/extension/business service) and category, but this hack should do for now.
* Add searchResults to context
* Use setSearchResults in Content
* Add ribbons to the tabs
* Changelog
* Use setState as the function name
* Only show ribbon counts when there's an active search
* Refactor how 'setSearchResultsCount' is used (h/t @mcliwanow)
* Don't populate initial search results
* Unify css styling
* feat: Add memoization to EvaluateSuggestion class
This commit adds memoization to the `EvaluateSuggestion` class in order to improve performance by caching the results of the `evaluate_specs` method. The memoization is implemented using an associative array called `$memo`, which stores the results of previous evaluations based on the input specifications and logger arguments. The memoization logic checks if the results for a given set of specifications and logger arguments already exist in the `$memo` array, and if so, returns the cached results instead of re-evaluating the specs. This helps to avoid redundant computations and improves the overall efficiency of the `evaluate_specs` method.
* Add changelog
* Only use specs as key
* Move shipping test to correct folder
* Fix tests
* Fix tests
* Fix lint
* Address PR feedback
* Update order edit tests with shipping address tests
Update order edit tests with shipping address tests
* Add changelog
* Refactor new tests
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* Add storybook workflow
* Update version and add trigger for push on trunk
* Add workflow_dispatch for manual trigger also
* Add permissions
* Add trigger for current branch
* Set install to true for monorepo setup
* Add write permissions
* Use hashes for GH action versions and add --quiet for building storybook
* Remove on push trigger for now
* Update README.md
* Update 722.md
* Update 741.md
* Update docs-manifest.json
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Roy Ho <roykho77@gmail.com>
* Add classname to description section for business service card
* Decode HTML entities in product descriptions
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Raja sekar <raja.sekar.manimaran@automattic.com>
* Set product card price currency and suffix dynamically based on endpoint data
* Add changefile(s) from automation for the following project(s): woocommerce
* Remove unnecessary comment
* Update types to match data received from WCCOM after further changes to the API
* Apply suggestions from code review
Allow for future currencies that might switch the symbol/value order
Co-authored-by: Dan Q <dan@danq.me>
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Dan Q <dan@danq.me>
* Add product and group id properties to Tracks data for product card clicks
* Add changefile(s) from automation for the following project(s): woocommerce
* Update product tracksproperty to product_id
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
This PR adds the phone number to the FTS index on the order address table, and adds the migration routines so that we can recreate the index for shops that already have this enabled. Additionally, it also removes support for relevancy operators to make search performant.
Fixes#51213
* Blocks\Assets\Api: Do not attempt to update script_data transient with the same data
* Add changelog
* Update plugins/woocommerce/src/Blocks/Assets/Api.php
Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
* Update plugins/woocommerce/changelog/50962-dont-update-transient-with-same-data
Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
---------
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
* Updated storybook and renamed stories to use the *.story.js/tsx format
* Renamed stories within product editor and wc admin package
* Include *story files in product editor package
* Add storybook pages workflow
* Remove the 'on' param in storybook-pages
* Add changelogs
* Fix failing tests
* Add dirname for any other webpack configs that rely on the woocommerce-admin one
* Fix React 18 warnings
* Remove unneeded storybook packages from components package
* Remove storybook workflow, to be added as a follow up instead
* Revert @storybook/react back to fix unit tests
* Using new coupon_info metadata to determine the actual coupon id
Changes to make use of the new coupon_info meta data, if it exists, to determine the actually-used coupon.
If coupon_info meta data doesn't exist, I'm also adding an extra filter so, in case there are more than one active coupons with the same name, we filter out the ones that were created after the order.
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
* Update isAddressComplete to allow only specific fields to be checked
* Update tests for isAddressComplete
* Update wording on "enter address" prompt in Cart sidebar
* Update Shipping to Delivery in cart & checkout shipping total
* Only check the city, state, country, & postcode fields in shipping calc
* Update wording in the "Ships to" section of cart/checkout sidebar
* Update shipping calculator button to say delivery
* Update tests to use new strings
* Remove test that was falsely passing anyway
This test checked for presence of a string that wasn't in the codebase. It also doesn't seem like a valid test. Why would we want to remove the button just because default rates are available?
* Add changelog
* Left align text in shipping calculator button
It floats weirdly in the middle with the new text changes
* Update text in tests
* Update wording in unit tests
* Update shipping calculator text in test
* Update shipping text in test
* Update use of shipping in tests
* Skip test with no translation available
* Lint fixes
---------
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Remove title for Extensions and Themes tabs
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Dan Q <dan@danq.me>