Commit Graph

64069 Commits

Author SHA1 Message Date
Albert Juhé Lluveras 712ffa3381
Add zoom and flex slider functionatility gallery images for variable products with missing Product Image (#47714)
* Add zoom functionatility to Single Product gallery images when main Product Image is missing

* Alternative approach

* Add changelog file

* Still add placeholder class for extra backwards compatibility

* Bump template version

* Remove unnecessary class name change

* Fix wrong type
2024-05-30 10:41:05 +02:00
Néstor Soriano c6424c09d1
Make the plugin autoinstall process more robust (#47798)
* Fix PluginInstaller::install_plugin_core so it works on Windows

* Wrap the autoinstall of the Legacy REST API plugin in try-catch block
and log any exception thrown

* Make sure that the wc_installing transient is deleted even if install fails
2024-05-30 09:01:47 +02:00
Ilyas Foo c9752f1eaf
Fix analytics chart previous year data when date range includes 29 Feb (#45874)
* Temp commit

* Clean up unused codes and streamline logic

* More cleanups and add comment

* Better naming and fix logic

* Rename and comment

* Changelog

* Changelog

* Lint

* Moved leap year utils to date package, added tests

* Moved functions to utils, add tests

* Add more test

* Fix changelog
2024-05-30 12:54:00 +08:00
Ilyas Foo 98b32b5ecc
Fix getPreviousDate default behaviour to compare previous year (#47951)
* Add default compare previous_year and add tests

* Changelogs
2024-05-30 11:31:10 +08:00
Paul Sealock a39ca21df5
[LYS] Add woocommerce_coming_soon_exclude hook (#47787) 2024-05-30 10:58:14 +12:00
Toby Herbert 0f21660277
Prevent the possibility of unpublished coupons from being available (#47739)
* Clean up the cache when a coupon is updated

When the coupon’s status transitions from publish to future, the ‘coupon_id_from_code’ cache entry needs to be deleted otherwise the coupon will remain available for use.

* Remove coupon cache entries when not published

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

---------

Co-authored-by: Toby Herbert <tobyherbert@nialtoservices.co.uk>
Co-authored-by: github-actions <github-actions@github.com>
2024-05-29 17:31:02 -05:00
jonathansadowski f56d3e3ee0
Update PR template and auto change log with better no-entry support (#44023)
* Update PR template and auto change log

* Ignore .github md files in linting

* Rebuilt monorepo-utils to solve conflict

* Updated regex pattern to include uppercase X

* Move the changelog entry not required checkbox on top of the description.

* Return the comment even if shouldAutomateNoChangelog is false

* Updated tests

* Rebuilt monorepo-utils

---------

Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-05-29 17:06:59 -03:00
Jonathan Lane 2f4c9ecf57
Update pnpm lock file with react 18 (#47973)
* Update pnpm-lock file with new react

* Changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-05-29 17:03:48 -03:00
Damián Suárez 6f8bce8bb0
Product Block Editor: load and create shipping classes optimistically (#47848)
* define ans use shippingClassRequestQuery

* do not invalidate getProductShippingClasses

* changelog
2024-05-29 19:59:24 +01:00
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