Commit Graph

64060 Commits

Author SHA1 Message Date
Moon 8cdd549038
Use LYS API endpoint for woocommerce_admin_launch_your_store_survey_completed option (#47915)
* Add status-completed endpoint

* Use new status-completed endpoint

* Add changefile(s) from automation for the following project(s): woocommerce

* Revert back unwanted changes

* Cache /wc-admin/launch-your-store/survey-completed call

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-29 11:14:20 -07:00
louwie17 494e65f77b
Fix tracking files being loaded on the front end (#47938)
* Only init WC Site Tracking if in admin or a rest request

* Add changelog

* Refactor tracks logic

* Create helper function store store api requests and make use of this

* Move conditionals back to woocommerce class

* Remove use of is_rest_api_request within is_store_api_request

* Fix lint errors

* Add check to see if WC_Tracks exist

* Also include tracking in CLI

* Make use of wc_admin_record_tracks_event instead of WC_Tracks directly
2024-05-29 14:06:42 -03:00
Jorge A. Torres e0455f86ed
Add `woocommerce_order_note_deleted` hook (redux) (#47916)
* Add `woocommerce_order_note_deleted` hook for a successful order note delete

* Update plugins/woocommerce/includes/wc-order-functions.php

Co-authored-by: Jorge A. Torres <jorge@0xbad.com>

* Include `order_id` in order note object

* Introduce `woocommerce_order_note_deleted` hook

* Appease linter

* Adjust unit test

* Add changelog

---------

Co-authored-by: EVOKE <evoke.lektrique@gmail.com>
2024-05-29 09:42:48 -07:00
Sam Seay 82f5b84a80
Remove isFeaturePlugin and flag code from FeatureGating class (#47866) 2024-05-30 02:50:09 +12:00
Fernando Marichal 88970a72a9
Fix product tracks when importing (#47857)
* Fix product tracks when importing

* Add changelog

* Fix lint

* Fix lint

* Fix source value
2024-05-29 10:54:07 -03:00
Manish Menaria bb3f38a3d8
Fix: Product Collection block does not display when editing template/post (#47871)
* Fix issue where Product Collection wasn't showing anything

- Moved queryId logic to a new `useQueryId` custom hook to encapsulate the logic.
- Simplified attribute setting in `useEffect` by using a default attributes value.
- Utilized `fastDeepEqual` to check for attribute equality

These changes fix the issue where the Product Collection block did not display properly in the template editor, ensuring consistent rendering of products.

* Add comment

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Remove leftover comment

* Add e2e tests for Product Collection block visibility after refresh

Added end-to-end tests to verify the visibility of the Product Collection block after page refresh in both Product Archive and Post contexts.

- Added tests to ensure the Product Collection block remains visible after refreshing the template or post editor.
- Updated existing tests to use `BLOCK_LABELS` for better readability and maintainability.

* Improve E2E tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-29 16:35:36 +05:30
Jonathan Lane 938c7d97dc
Fix flaky core profiler e2e test (#47917)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-05-29 13:27:55 +03:00
Alba Rincón 02fdd916d3
[CYS] Patterns Migration: Performance - ensure the initial request to fetch patterns from the PTK is async (#47551)
* Add PatternsToolkit class to fetch patterns from PTK

* Pass the new PatternsToolkit class to the BlockPatterns constructor

* Extract the pattern registration code to the 'register_block_pattern' function

* Extract the file patterns registration to `register_block_patterns_from_files`

* Registers patterns from ptk

* Add ids of excluded patterns (because they have jetpack deps)

* Add PTK client tests

* Filter out patterns with post_type diff than "wp_block"

* Add missing excluded pattern

* Add error log and improve error messages from the PTK client

* Extract function to register patterns to PatternRegistry class

* Extract function to register patterns from PTK

* Rename PatternsToolkitClient to PTKClient

* Extract AI related code to the AIPatterns class

* Rename test to match class name

* Add missing package dep in BlockPatterns

* Cache and register PTK patterns

* Add feature flag

* Fix linting errors

* Add tests for the PatternRegistry

* Add tests for the PTKPatternsStore

* Add changefile(s) from automation for the following project(s): woocommerce

* Check pattern ID exists to filter

* Check title is set when registering the pattern

* Remove unnecessary code from test

* Add more patterns to the excluded list

* Add actions to reset the patterns transient on plugin deactivation and tracking option updates

* Schedule fetching pattern async when updating or activating the plugin and on allowing tracking

* Fetch patterns always async

* Add changefile(s) from automation for the following project(s): woocommerce

* Only schedule the fetch_patterns actions if it's not pending

* Add changefile(s) from automation for the following project(s): woocommerce

* Remove unnecessary import

* Fix tests

* Return empty array instead of error

* Fix imports and comments

* Remove unused function

* Fix lint errors

* Fix log

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-29 11:46:56 +02:00
Naman Malhotra bbeaac4892
Accessibility enhancement for the whole shop accounts section (#47144)
* Script to test Unique product sku

* Accessibility enhancement for the whole shop accounts section

* self Review changes

* added jQuery for compat - TBD

* self Review changes

* Added changelog

* Updated templae version

* Updated templae version

* Self review - Fix failing e2e

* review changes

* review changes

* review changes

* review changes

* review changes

* Added comment for more context about setTimeout
2024-05-28 16:11:19 -05:00
Jorge A. Torres 2c6a6bf1c4
Honor blank "additional content" in e-mails (vs using default text) (#47809)
* Add changelog

* Only include default 'additional content' in e-mails when it hasn't been configured

* Remove (now) unnecessary code from new order e-mail

* Simplify logic in `get_additional_content()`
2024-05-28 13:11:52 -07:00
Barry Hughes 8f7a9ced04
Add action `woocommerce_rest_delete_shipping_zone_method` (#47862)
Add action `woocommerce_rest_delete_shipping_zone_method` and remove inappropriate product review action.
2024-05-28 14:14:22 -05:00
Veljko V 0fdc4ddd7c
Fix skipped e2e tests Merchant product block editor create variable & flaky Marketing Overview (#47859)
* Improve test and unskip tests

* Add changelog

* Update tests

* Get rid of intro popup

* Update marketing overview test

* Add closing tour popup
2024-05-28 11:27:08 -07:00
Corey McKrill 3f38877a70
REST API: Update schema for rate_id property (#47779)
This changes the item schemas for Orders and Order Refunds API
endpoints to correctly specify that the rate_id property in a tax_line
object is an integer, not a string.

Fixes #32037
2024-05-28 11:13:52 -07:00
Maikel Perez 189476fcdf
Fix accessibility issues when using the keyboard to navigate/select tabs in the new product editor (#47860)
* Focus tab shows focus style

* Tabbing when inside the tabs takes you to the first focusable element inside the current tab's tab panel

* Users can press the left and right arrow keys to move between tabs

* When a tab is focused and the Home key is pressed the first tab in the list should be focused. When the End key is pressed the last tab should be focused

* Add changelog file

* Fix e2e tests

* Add changelog file

* Get last tab by index

* Fix linter errors
2024-05-28 17:44:21 +00:00
Bart Kalisz df7bb8d7b9
Blocks E2E: Clean up eslint comments after rules update (#47875) 2024-05-28 15:44:06 +00:00
github-actions[bot] b67ffdecad
Delete changelog files based on PR 47867 (#47903)
Delete changelog files for 47867

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-28 23:14:42 +08:00
Bart Kalisz c5e1639dc8
Blocks E2E: Streamline the usage of WP CLI (#47869) 2024-05-28 17:09:28 +02:00
github-actions[bot] 552195ee2e
Delete changelog files based on PR 47838 (#47898)
Delete changelog files for 47838

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-28 22:00:33 +08:00
github-actions[bot] e51dd0bb66
Delete changelog files based on PR 47589 (#47894)
Delete changelog files for 47589

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-28 21:40:38 +08:00
Alba Rincón 9075bf19a7
[CYS] Patterns Migration: Update the registration of patterns within WooCommerce, ensuring they are fetched from the relevant PTK categories (#47306)
* Add PatternsToolkit class to fetch patterns from PTK

* Pass the new PatternsToolkit class to the BlockPatterns constructor

* Extract the pattern registration code to the 'register_block_pattern' function

* Extract the file patterns registration to `register_block_patterns_from_files`

* Registers patterns from ptk

* Add ids of excluded patterns (because they have jetpack deps)

* Add PTK client tests

* Filter out patterns with post_type diff than "wp_block"

* Add missing excluded pattern

* Add error log and improve error messages from the PTK client

* Extract function to register patterns to PatternRegistry class

* Extract function to register patterns from PTK

* Rename PatternsToolkitClient to PTKClient

* Extract AI related code to the AIPatterns class

* Rename test to match class name

* Add missing package dep in BlockPatterns

* Cache and register PTK patterns

* Add feature flag

* Fix linting errors

* Add tests for the PatternRegistry

* Add tests for the PTKPatternsStore

* Add changefile(s) from automation for the following project(s): woocommerce

* Check pattern ID exists to filter

* Check title is set when registering the pattern

* Remove unnecessary code from test

* Add more patterns to the excluded list

* Add actions to reset the patterns transient on plugin deactivation and tracking option updates

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-28 14:42:53 +02:00
github-actions[bot] 7e643ff409
Delete changelog files based on PR 46857 (#47879)
Delete changelog files for 46857

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-28 20:15:27 +08:00
github-actions[bot] e639607d65
Delete changelog files based on PR 47749 (#47874)
Delete changelog files for 47749

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-28 19:43:29 +08:00
github-actions[bot] d0c7d75763
Release: Remove 9.0 change files (#47741)
Delete changelog files from 9.0 release

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-28 19:34:27 +08:00
github-actions[bot] e343069708
Prep trunk for 9.1 cycle (#47740)
Prep trunk for 9.1 cycle with version bump to 9.1.0-dev

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-28 19:34:10 +08:00
Niels Lange dec873926d
Partially revert #45767 (#47867)
* Partially revert #45767

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add test for description on checkout order summary block

* Add another test back in for order summary description

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2024-05-28 18:25:34 +07:00
Luigi Teschio 72d7a8b929
[CYS Full Composability] Ensure that the assembler doesn't crash when the feature flag is enabled, but the site doesn't have the latest version of Gutenberg. (#47546)
* CYS: allow to the user to move the pattern

* add feature flag

* Add changefile(s) from automation for the following project(s): woocommerce

* CYS: Add shuffle button

* CYS - add shuffle feature

* Add changefile(s) from automation for the following project(s): woocommerce

* use WooCommerce feature flag approach

* fix lint error

* Highlight the pattern when the user hovers it

* Add changefile(s) from automation for the following project(s): woocommerce

* CYS - Assembler: improve feature flag check

* Add changefile(s) from automation for the following project(s): woocommerce

* improve logic

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-28 08:40:16 +00:00
Luigi Teschio 8c1173c94b
Highlight main block at hover (#47415)
* CYS: allow to the user to move the pattern

* add feature flag

* Add changefile(s) from automation for the following project(s): woocommerce

* CYS: Add shuffle button

* CYS - add shuffle feature

* Add changefile(s) from automation for the following project(s): woocommerce

* use WooCommerce feature flag approach

* fix lint error

* Highlight the pattern when the user hovers it

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-28 08:16:25 +00:00
Luigi Teschio abbcb94709
CYS - add shuffle feature (#47356)
* CYS: allow to the user to move the pattern

* add feature flag

* Add changefile(s) from automation for the following project(s): woocommerce

* CYS: Add shuffle button

* CYS - add shuffle feature

* Add changefile(s) from automation for the following project(s): woocommerce

* use WooCommerce feature flag approach

* fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-28 07:32:26 +00:00
Luigi Teschio f12d6e4726
CYS: allow to the user to move the pattern (#47322)
* CYS: allow to the user to move the pattern

* add feature flag

* Add changefile(s) from automation for the following project(s): woocommerce

* use WooCommerce feature flag approach

* hide scrollbar on the body

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-28 08:55:14 +02:00
Paul Sealock 1c11d5a693
[LYS] Add Homescreen and Settings e2e tests (#47341) 2024-05-28 16:19:06 +12:00
Fernando Marichal 721da06b28
Fix some issues in performance tests (#47735)
* Close tour when it is open

* Use different matrix

* Fix performance include

* Add changelog

* Fix lint

* Add metrics to editor tests
2024-05-27 16:11:49 -03:00
Fernando Marichal 890fd87e7e
Update product name validation message (#47846)
* Update product name validation message

* Add changelog
2024-05-27 15:43:44 -03:00
Matt Sherman 8894850ce1
Product Editor: Fix styling of checkboxes in Categories and Tags fields with Gutenberg plugin installed (#47816)
* Remove styling of checkbox (use GB core styling)

* Remove setting of margin on checkbox control

* Remove unused CSS

* Changelog
2024-05-27 14:34:21 -04:00
Matt Sherman 988c3634b7
Doc: Update list of product editor generic blocks to include select and text-area (#47810)
* Add select and textarea fields to list

* Changelog
2024-05-27 14:34:01 -04:00
Maikel Perez fccff3e562
Add product id to product_edit_view track in classic product edit screen (#47853)
* Add product id to product_edit_view track in classic product edit screen

* Add changelog file
2024-05-27 14:42:15 -03:00
Albert Juhé Lluveras fae960c7bf
Fix typo in some tests and comments: 'blockbased' > 'block-based' (#47851)
* Fix typo in some tests and comments: 'blockbased' > 'block-based'

* Add changelog file

* Add JSDocs types

* Replace 'block based' with 'block-based' in stock-reservation.md
2024-05-27 19:21:10 +02:00
Sam Seay 91f91b5d82
Use github proxy to install WC beta tester in playground previews (#47837)
Use github proxy to install beta tester in playground links.
2024-05-27 14:19:56 -03:00
Damián Suárez f51b93359f
CRUD: populates `items` and `itemsCount` when a new item is created (#47632)
* minor change in reducer

* use organizeItemsById to compute new items

* add reducer test with pick optimisticUrlParameters

* rename constant name

* add optimisticUrlParameters to CRUD actions types

* use organizeItemsById to generate store IDs

* add more reducer tests

* compute nextItemsData based on ids

* tessstssssss

* add a order_by: name test

* fix sorting data when url parameters

* add tests

* introduce filterDataByKeys helper fn

* fix process to sort items optimistically

* rollback wrong change in actions

* changelog

* set action `options` as optional

* set default value for options
2024-05-27 16:34:12 +01:00
Bart Kalisz 460d73eee0
Blocks E2E: Streamline E2E utils implementation (#47660) 2024-05-27 14:54:06 +00:00
Ilyas Foo 012f0d3418
Fix redundant confetti on LYS task congrats page (#47838)
* Add useRef to ensure confetti is only trigerred once

* Changelog
2024-05-27 21:01:40 +08:00
Luigi Teschio 977f8289af
Remove checkstyle.xml file (#47844)
* Remove checkstyle.xml file

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-27 12:16:52 +00:00
Barry Hughes 86c3f28c12
Defensive check to reduce error/warning noise when regenerating images. (#47785)
* Defensive check to reduce error/warning noise when regenerating images.

* Coding standards, remove trailing whitespace.
2024-05-27 10:35:08 +00:00
Atanas Penchev 02a0bba3f4
Slide animations always use CSS3 transitions instead of .animate() (#46564)
* Slide animations always use CSS3 transitions instead of .animate()

* Update plugins/woocommerce/client/legacy/js/flexslider/jquery.flexslider.js

Fix typo

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>

* Changelog

* Newline

* Add changefile(s) from automation for the following project(s): woocommerce

* Delete manual changelog

---------

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-05-27 11:25:23 +02:00
Albert Juhé Lluveras ee656e1f0f
Fix two products being added to cart when Geolocate (with page caching support) was enabled and AJAX add to cart buttons disabled (#47761)
* Fix an issue that caused two products to be added to cart when Geolocate (with page caching support) was enabled and AJAX add to cart buttons disabled

* Add e2e test

* Add changelog file

* Move test to its own file

* Fix wrong default value in test reset
2024-05-27 09:54:22 +02:00
Karol Manijak 92fec889f7
Specify Product Price ancestor and simplify Product Elements ancestors (#47802)
* Extend product elements sharedConfig ancestor with Product Collection and Products (Beta)

* Utilise sharedConfig ancestor in Image block

* Utilise sharedConfig ancestor in Price block

* Utilise sharedConfig ancestor in Rating block

* Utilise sharedConfig ancestor in Sale Badge block

* Utilise sharedConfig ancestor in SKU block

* Utilise sharedConfig ancestor in Stock Indicator block

* Add changelog

* Bring back original ancestors for Summary and Title blocks

* Remove Product Price from a test as it's no longer available in global context
2024-05-27 09:15:32 +02:00
Chi-Hsuan Huang c70a09a57e
Fix core profiler extension installation track to use plugin track key for extension name (#47786)
* Update plugin installation error logger to use plugin track key for extension name

* Add changelog
2024-05-27 11:51:45 +08:00
Adrian Moldovan 97e7f86a15
Add the slack-test-report util (#47805)
* Add the slack-test-report util

* Error if the required GitHub context variables are not set

* Error if the required SLACK_CHANNEL env var is not set

* Use a more generic message to be able to report on jobs that are not tests, like build

* Add the alert-on-failure job in ci

* Run for pull_request to test the job

* Setup monorepo first

* Force a linting error

* Better logging

* Use inputs.trigger as report name if set

* Force an e2e test failure

* Set the commit message in the notification

* Use INPUT_TRIGGER for all notifications

* Revert test changes
2024-05-24 13:18:54 -07:00
Maikel Perez 55aafb9fc6
Remove the new old experience (#47814)
* Remove ProductTitle component

* Remove ProductSettings component

* Remove ProductMoreMenu component

* Remove ProductFormHeader component

* Remove ProductVariationFormHeader component

* Remove ProductFormFooter component

* Remove ProductFormLayout component

* Remove ProductForm component

* Remove ProductTourContainer component

* Remove AddProductPage component

* Remove ProductVariationForm component

* Remove EditProductPage component

* Remove ProductFormTab component

* Remove SingleImageField component

* Remove ProductVariationDetailsSection component

* Remove ProductVariationsSection component

* Remove DetailsSectionFills component

* Remove ImagesSectionFills component

* Remove ShippingSectionFills component

* Remove AttributesSectionFills component

* Remove PricingSectionFills component

* Remove InventorySectionFills component

* Remove product-form-fills file

* Remove product-form-variation-fills file

* Remove product-form-api-fills file

* Remove ClassicEditorIcon component

* Remove HiddenIcon component

* Remove VisibleIcon component

* Remove drag-and-drop.svg file

* Remove ProductSectionLayout component

* Remove products/constants.tsx file

* Remove new-product-management-experience feature flag

* Fix linter errors

* Add changelog files
2024-05-24 18:00:22 +00:00
Matt Sherman 660c550071
Product Editor: Set description properly if description consists only of a single non-paragraph block (#47763)
* Explicitly check whether the only block is a paragraph

* Update comment

* Move handling of empty block array into clearDescriptionIfEmpty

* Add areBlocksEmpty util function

* Check for empty block inside iframe editor

* Remove check for empty block from description block

* Add unit tests for areBlocksEmpty

* Changelog

* Update comment to clarify
2024-05-24 13:32:06 -04:00
Maikel Perez 4ddfd43864
Enhancement editor loading speed (#47425)
* Lazy load the PluginArea and the ModalEditor

* Remove repeated product request when editing a specific product

* Fix linter errors

* Add changelog files

* Fix linter errors

* Refactor the block editor to remove some extra rerenders

* Defer the publish button processing

* Defer the tab content render 500ms to reduce the total blocking time

* Fix linter errors

* Fix unit test and tabs unexpected rerender

* Fix linter errors

* Reduce the defered time to 300ms

* Fix get product url when the product has been duplicated since the new copy does not have permalink

* Fix the invalid unregistration of wc-admin-more-menu in the product page

* Fix compilation errors
2024-05-24 08:39:53 -04:00