Commit Graph

64579 Commits

Author SHA1 Message Date
Manish Menaria aa5d9debbf
Modify PR template and document that tests are required (#49331)
* Update PULL_REQUEST_TEMPLATE.md to include a checklist item for adding/updating tests

Added a new checklist item to the pull request template for contributors to confirm they have added or updated relevant tests (E2E, Unit, Integration, etc.) to ensure their fix or feature works as intended. This helps maintain the quality and reliability of the codebase by encouraging thorough testing.

* Update workflow to request reviewers to check test coverage along with testing instructions

Modified the review-testing-instructions workflow to enhance the review process by asking reviewers to not only review the testing instructions but also verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed. This change ensures a more thorough review process and helps maintain high code quality.

* Update action name

* Remove changes from Template
2024-07-17 18:04:12 +05:30
Veljko V. dd411f53e4
Fix flaky shopper checkout block creating user with custom password e2e test (#49596) 2024-07-17 13:37:32 +03:00
Karol Manijak 31b45d79e3
Bring back Product Filters pattern (#49601)
* Bring back Product Filters pattern

* Add changelog

* Fix lint

* Move docblock to the top

---------

Co-authored-by: Vladimir Reznichenko <kalessil@gmail.com>
2024-07-17 12:20:33 +02:00
Akeda Bagus b7563b6c3a
Add Woo product usage notice (#47697)
Nudges user when the store uses expired or unregistered paid Woo products on product-specific admin screens.
2024-07-17 16:38:08 +07:00
Chi-Hsuan Huang 21d08c7f56
Add a generic function to determine remote logging eligibility (#49371)
* Add wc remote logger

* Add changelog

* Add remote logging feature

* Update tests and remove private $latest_wc_version;

* Fix lint

* Rename is_user_opted_in -> is_tracking_opted_in
2024-07-17 08:59:55 +00:00
Adrian Moldovan b32c742f3f
[e2e tests] Fix basic spec for multiple environments (#49609) 2024-07-17 11:53:36 +03:00
Adrian Moldovan 2a877ecc7b
[testing workflows] Include wp-env config file in the tests jobs changes list (#49626) 2024-07-17 11:52:06 +03:00
Luigi Teschio 5e92ede8fa
CYS: Track move up/move down pattern (#49604)
* CYS: Track move up/move down pattern

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-17 09:59:38 +02:00
Luigi Teschio f583fb142a
CYS: fix arrow welcome tour (#49607)
* CYS: fix arrow welcome tour

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

* use hex color

* format file

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-17 07:52:20 +00:00
Bart Kalisz 06374b9691
Blocks E2E: Stabilize Product Collection tests where saving fails (#49590) 2024-07-17 09:50:02 +02:00
Vladimir Reznichenko 47a2ab5cba
CI: update linting script (no strict mode, additional information about linting steps) (#49629) 2024-07-17 09:47:04 +02:00
Ron Rennick 6d99ed6a1d
bump wp-env to 9.7.0, include blocks in syncpack (#49310)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-07-17 10:31:02 +03:00
louwie17 b698e07930
Add missing dependencies to generate variation script in classic product form (#49595)
* Add missing dependencies for product meta box script

* Add changelog
2024-07-17 04:22:43 -03:00
Adrian Moldovan a6cd46e971
Pin wp-env core version to 6.5 (#49620) 2024-07-17 09:46:57 +03:00
nigeljamesstevenson 3d7d7f0201
Prepare for WP 6.6 by updated tested / required versions. (#49619)
* Prepare for WP 6.6 by updated tested / required versions.

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

* Prepare for WP 6.6 by updated tested / required versions.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-17 11:46:20 +08:00
Niels Lange d3574290b7
Fix regression of #48180 (#49580)
* Fix regression of #48180

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

* Fix one more bug in the dropdown styling (#49585)

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
2024-07-16 21:46:39 +02:00
Nathan Silveira 7335645b70
SelectTree: allow navigation between items and input using tab and arrow keys (#49251)
* Hide help text in create-taxonomy-modal

* Expose onKeyDown and onBlur events in SelectedItems

* Increment isEventOutside function to consider remove button tags as well

* Add label to remove all button

* Handle navigation between added items and input using tab and arrow keys

* Add changelogs

* Prevent unwanted scroll

* Revert change in product editor and fix issue in component itself

* Change onKeyDown and onBlur to optional

* Move tags navigation to selectedItems and create lastRemoveButtonRef to avoid long CSS query

* Small refactor

* use useImperativeHandle hook in SelectedItems to abstract focusing on last remove button
2024-07-16 16:26:29 -03:00
Nathan Silveira eb2b3da95b
Adjust spacings for variations table notice (#49561) 2024-07-16 16:02:55 -03:00
Luigi Teschio ae42900f6d
CYS: Add reminder comment about the stability of the woo pattern domain (#49600)
* Add reminder comment about the stability of the woo pattern domain

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-16 15:01:34 +00:00
Cvetan Cvetanov 54dd7a621a
Add new shared payment methods logos component (#49300)
* Add WooPaymentMethodsLogos component

---------

Co-authored-by: Anurag Bhandari <anurag.bhd@gmail.com>
2024-07-16 17:42:52 +03:00
Nathan Silveira 4dbe1c96e7
Prevent high numbers from breaking currency inputs (#49489) 2024-07-16 10:22:44 -03:00
Chi-Hsuan Huang 8d23ac11a9
Add beta tester tool to force the coming soon landing pages to display on the front-end (#49341)
* Add tool to force the coming soon landing pages to display on the front-end

* Add changelog

* Revert line change

* Add doc comments and remove unnecessary check

* Invalidate caches

* Fix tools invalid json errors

* Set default value

* Call wc_beta_tester_override_coming_soon_options out of init
2024-07-16 11:55:38 +00:00
Mike Jolley b8fcc56e43
Hide username checkbox if using block checkout (#49389)
* Hide username checkbox if using block checkout

* Hide correct field and fix render if first field is hidden

* Changelog

* Use array filter to prevent empty array item lingering
2024-07-16 12:48:18 +01:00
Alba Rincón b11ec75df2
CYS - Add tracking for patterns (#49556)
* Add tracking for patterns

* Fix type

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

* Fix lint error

* Add missing import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-16 13:24:55 +02:00
Albert Juhé Lluveras 6689e6e0d1
Add tests to verify Featured Product/Category image editor works (#49478)
* Add tests to verify Featured Product/Category image editor works

* Add changelog file
2024-07-16 13:23:09 +02:00
Mike Jolley 6d52388b8b
Avoid reserving stock for draft orders under payment is attempted (#49446)
* Use wc_reserve_stock_for_order only before taking payment

* Release stock on exception

* changelog
2024-07-16 12:00:23 +01:00
Luigi Teschio f3e003c236
CYS: not enable PTK features on WordPress 6.5 (#49591)
* CYS: not enable PTK features on WordPress 6.5

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-16 10:19:00 +00:00
Thomas Roberts a71fb4d7a6
[Enhancement]: Add option to show price on the place order button (#49252) 2024-07-16 10:59:09 +01:00
Luigi Teschio cd96149362
CYS: Improve patterns order (#49204)
* CYS: Improve order patterns

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

* fix order

* improve documentation

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-16 09:52:58 +00:00
Luigi Teschio 86ff31b7f2
CYS: Enable PTK feature flag (#49565)
* CYS: Enable PTK feature flag

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

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

* enable CYS on dev env

* skip homepage test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-16 11:35:51 +02:00
Alba Rincón 9934ba4c00
CYS - Disable the Full Composability for CYS AI flows (#49290)
* Disable the Full Composability for CYS AI flows

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-16 11:22:01 +02:00
Tom Cafferkey 714621737c
Block Hooks: Remove feature gate and replace with woocommerce_hooked_blocks_version option (#49302)
* Remove the block hooks feature gate by getting and setting a the wc_hooked_blocks_version option and assigning versions to each hooked block

* Update apply_filters comment

* Add action for users switching themes that don't have an option set

* Update condition for current_theme_supports usage

* Update comment

* Unit tests

* Change unit test file name

* Update hooks for option update

* Changelog

* Add database tests for wc_hooked_blocks_version actions

* Update option name from wc_hooked_blocks_version to woocommerce_hooked_blocks_version

* Update option name in function comments

* Fix linting

* Update comment typo

* Add strict types to new files

* Update tests

* Move unit tests for block hooks

* Set option to "no" for sites that dont have an approved block theme

* Return early if WC option already exists

* Reorder conditions for performance reasons

* Change incorrect to lower

* Fix typo

* Remove unncessary false check and add additional unit tests

* Update comment
2024-07-16 09:31:48 +01:00
Paul Sealock de73d57a9c
[Store Alerts] Adjust inner styles (#49174)
* apply CSS

* adjust margin

* cleanup

* adjust gap between buttons

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

* Update plugins/woocommerce-admin/client/layout/store-alerts/index.js

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* remove button sizes media query

* remove marketplace styles

* fix tests

* fix marketplace css, again

* reapply narrow margin

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-07-16 06:19:33 +00:00
Ilyas Foo ae75ae17da
Clean up core profiler jetpack copy experiment (#49452)
* Remove Jetpack copy experiment request

* Changelog
2024-07-16 12:46:31 +08:00
Nathan Silveira af571585b6
Hide variation related notices when product type is not variable (#49400)
* Hide variation related notices when product type is not variable

* Revert "Hide variation related notices when product type is not variable"

This reverts commit 66a67b6ada.

* Hide variation related notices when product type is not variable
2024-07-15 16:38:14 -03:00
Fernando Marichal 67ecc95633
Add reference to number control (#49357)
* Add ref to NumberControl

* Add identifier

# Conflicts:
#	packages/js/product-editor/src/hooks/use-error-handler.ts

* Remove console.log

* Add changelog

* Stop using setTimeout and use mutation observer to check if the tab is visible before focusing field

* Rename prop

* Refactor number-control functions

* Fix lint

* resetIncrement funciton

---------

Co-authored-by: Nathan Schneider <nsschneider1@gmail.com>
2024-07-15 15:49:19 -03:00
Fernando Marichal 6bc551c71b
Add tests for snackbar error handling hooks (#49498)
* Add tests for use-error-handler

* Add tests for useBlocksHelper

* Add changelog
2024-07-15 15:01:24 -03:00
Roy Ho a145575b01
Put product filters overlay template part behind feature flag (#49564)
* Put product filters overlay template part behind feature flag

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-15 10:41:47 -07:00
Vlad Olaru 1c981034a7
Fix specs evaluation logging constant control (#49563)
* Fix the logic for determining if we should log based on constant

* Add changelog
2024-07-15 19:25:04 +03:00
Mike Jolley 77428b973d
Checkout: Add password strength meter to new field (#49164)
* Add validation message and fix rendering when account is required

* Adjust validation so we can change the label in messages with custom callback

* Add and style password meter

* Add validation feedback and zxcvbn support

* changelog

* Accessibility fixes

* Update lock file

* Fix initial state in safari

* Announce strength as you type

* Use React.ReactElement

* update lock file

* Update lock

* Downgrade local pnpm and recreate lock

* Feedback should only be shown when `showError` is true, not `hasError`

* Feedback should default to null
2024-07-15 16:22:42 +01:00
Vlad Olaru 320873a4dc
Fix Task list - Reminder bar lack of left and right content spacing (#49532)
* Add margin to the reminder bar close button

* Add changelog

* Add left and right padding to the reminder bar instead of margin-right to close button

---------

Co-authored-by: Cvetan Cvetanov <cvetan.cvetanov@automattic.com>
2024-07-15 18:08:46 +03:00
Mike Jolley b462cd58bc
Store API: Ensure Store API recalculates cart totals prior to running validation hooks (#49455)
* Recalc totals on checkout route before validation

* changelog
2024-07-15 15:37:26 +01:00
Fernando Marichal a9de74df6f
Add link into the error snackbar (#49246)
* Add link to snack bar

# Conflicts:
#	packages/js/product-editor/src/hooks/use-product-manager/use-product-manager.ts

# Conflicts:
#	packages/js/product-editor/src/contexts/validation-context/validation-provider.tsx

* Fix variations

* Add useBlocksHelper

* Remove old tests

* Remove timeout

* Fix typo

* Fix errors

* Add changelog
2024-07-15 11:00:40 -03:00
Gabriel Manussakis 09bf08e1b1
[Accessibility] Add scope attributes to the order table on My Account (#49201) 2024-07-15 14:38:39 +01:00
Luigi Teschio e38137ed70
CYS: move `sidebar-navigation-screen-homepage-ptk` to the right folder (#49541)
* CYS: fix filename

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-15 14:02:56 +02:00
Vladimir Reznichenko 444f105eba
CI: Re-group PHPUnit jobs. (#49443)
In this PR, we reduce build time for REST API tests (lightweight build) and regroup a bit of PHPUnit jobs (fewer jobs with the same coverage).
2024-07-15 13:39:07 +02:00
Mike Jolley 13d3e11d40
Checkout: Add password field to create account form (#48985)
* Add site title to account checkbox

* Add customer_password support to Store API

* Hide password nag if defining own password

* Add woocommerce_registration_generate_password option to block assets

* Change login prompt to just "log in"

* Add default styling to password inputs

* Reset line height for checkbox inputs

* Add customer password to store

* Add password field to contact information block

* Handle customer password in checkout processor

* Styling for new elements

* Update tests so they match new create account label

* Update log in link in tests

* Add e2e tests for password field

* Add validation message and fix rendering when account is required

* Changelog

* Add missing api to tests

* Remove console log

* rerender checkout

* Update log in link in test

* Adjust validation so we can change the label in messages with custom callback

* Use queryByText in test

* Make sure password generation is on in tests

* Create password if provided password is empty

* Skip "Place order" button translation test

* Revert "Skip "Place order" button translation test"

This reverts commit 7aed6137e88cdb3577f74f6f0c05258b531ed534.

* Update plugins/woocommerce-blocks/assets/js/blocks/checkout/inner-blocks/checkout-contact-information-block/block.tsx

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update plugins/woocommerce-blocks/assets/js/data/checkout/reducers.ts

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Comment empty condition

* Update CSS classnames

* Return null in CreateAccountUI if nothing to display

* Linting: Return return param

* Document $password param

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2024-07-15 11:43:02 +01:00
Ian Yu-Hsun Lin c269a86efc
Fix variation name in WC Analytics Variations report (#49440)
* Show "Any [ATTRIBUTE_NAME]" for variation product if attribute is empty

Like that in the product variation edit page:
35a0ee2e8a/plugins/woocommerce/includes/admin/meta-boxes/views/html-variation-admin.php (L36)

* Add changelog
2024-07-15 16:55:06 +08:00
Miguel Pérez Pellicer e1b314229c
[WooCommerce Analytics] Fix: Show variations only for the selected product's variations (#49470)
* Allow to filter variation per its parent.

* Changelog

* Lint

* Lint

* Remove unused mapping
2024-07-15 12:43:52 +04:00
Vlad Olaru 1bc6e3e0ae
Fix specs rule evaluation logging not working (#49167)
* Better docs and minor refactoring for the EvaluationLogger

* Add support for logger args to EvaluateSuggestion methods

* Provide evaluation logger args to EvaluateSuggestion methods

* Improve docs and use short array syntax

* Log when spec rule is not an object

* Sanitize logger arguments for sanity

* Don't use short array syntax because of linter

* Lint fixes

* Add changelog

* docs: Spacing and alignment

* refact: Sanitize only the suggestion tile

* Add filter for rule evaluator logging enabled

* test: Add tests for suggestion evaluation logging

* test: Replace deprecated withConsecutive

* Simplify logic

* test: Cleanup

* test: Add rule logging tests for shipping partnerships

* Lint fixes

* Lint fixes
2024-07-15 10:24:14 +03:00