Commit Graph

64922 Commits

Author SHA1 Message Date
Michal Iwanow a15235d230
Update My Subscriptions screen labels and columns (#49985)
* Remove Marketplace feedback modal which is no longer used

The goal of the modal was not to be shown after 2023 (see https://github.com/woocommerce/woocommerce/pull/39609),
so we can remove it from the codebase now. Especially that it's a bit buggy - snackbar prompting for feedback
is displayed but the modal is not there because of the check for FEEDBACK_DIALOG_CAN_APPEAR.

* Marketplace Subscriptions - rename columns

* Marketplace subscriptions - show status badge in the Subscription column

Additionally, we remove the info icon from the status popover

* Marketplace subscriptions - add button helping to turn renewals on

* changelog

* Add focus handlers for accessibility

* Remove unused variable

* Fix sharing path url - My Subscriptions

* Change the status badge priority for expired

We should show the expired badge first, as it makes more sense with the
primary action.

---------

Co-authored-by: raicem <cem.unalan@automattic.com>
Co-authored-by: Cem Ünalan <raicem@users.noreply.github.com>
2024-08-01 14:12:32 +02:00
Adrian Moldovan 0ba308247a
[testing workflows] Add pre-release checks (#50204) 2024-08-01 13:48:58 +02:00
Manish Menaria a73c6e5546
Product Collection: Enable Context-Aware Previews by Adding `usesReference` to `registerProductCollection` (#49796)
* Allow registering custom collections with various context references

Implemented the registration of product collections with different context references using the `usesReference` property. These custom collections are now registered with specific contexts such as product, cart, order, and archive.

This enhancement allows for more tailored previews and functionality based on the specific context in which the product collection is used.

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

* Support multiple references for usesReference

* docs: update documentation to include `usesReference`

Enhanced the `register-product-collection` documentation to include details about the new `usesReference` property. This property allows collections to specify required references, enhancing their contextual relevance and preview capabilities.

- Added `usesReference` description to the collection fields section.
- Included examples demonstrating the usage of `usesReference` with single and multiple references.
- Clarified the behavior when required references are unavailable on the editor side but available on the frontend.

This documentation update provides third-party developers with the necessary information to utilize the `usesReference` property effectively in their custom product collections.

* test: add e2e tests for `usesReference`

Added end-to-end tests to verify the functionality of the `usesReference` property in product collections. These tests ensure that the appropriate preview labels are displayed.

- Created multiple custom product collections with different `usesReference` values: `product`, `cart`, `order`, `archive`, and combinations of these.
- Verified that collections show the correct preview label when the required reference is present.
- Ensured that the preview label is not shown in irrelevant contexts, such as posts or product catalog templates.

This addition enhances test coverage and ensures the robustness of the `usesReference` feature.

* Fixed issue with preview label showing in Specific Product and Archive templates.

* Handle cases when termId or productId is 0

This also improves the readability of the code by using better variable names.

* Make PC use postId context so location can be recognised correctly (#50152)

* Fix TS errors

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-08-01 15:33:27 +05:30
Bart Kalisz 63e212f9ce
Blocks: Update wp-env config to use production WP (#49704) 2024-08-01 11:59:42 +02:00
DAnn2012 e65e8bf83a
Made two strings translatable in slotfill.js (#50198)
* Update slotfill.js

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-08-01 09:13:18 +00:00
Alba Rincón 69ce0c6e3a
CYS - Document possible Intro pages (#50171)
* CYS - Document possible Intro pages

* Update README.md

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

* Fix lint errors

* Move images to the repo

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-01 10:33:03 +02:00
Akeda Bagus cf6268ec55
Use UTM parameters to link Tracks events: CTA from connect notice and successful site connection (#50126)
Pass UTM parameters to get events from clicking "connect" notice to site being connected
2024-08-01 14:01:21 +07:00
Ilyas Foo bb8090a165
Improvements to core profiler checkbox UX (#50151)
* Fix border and vertical align

* Changelog

* Add toggle event to plugin card

* Add test

* Fix double invocation and simplified onChange

* Fix unintended optional parameter change
2024-08-01 13:26:05 +08:00
Chi-Hsuan Huang e29d14b12e
Implement server-side remote error logging (#49599)
* Implement php remote logging

* Log fatal errors remotly

* Add tests

* Add changelog

* Improve code doc and type check

* Bug fixs

Fix Undefined variable $local_logger

* Rebase

* Fix tests

Fix tests

* Fix import path

* Use WC_Site_Tracking::is_tracking_enabled()

* Simplfy path checking/replace logic

* Rename log method -> handle

* Handle wp_safe_remote_post fails

* Fix lint

* Update plugins/woocommerce/includes/class-woocommerce.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* Update plugins/woocommerce/src/Internal/Logging/RemoteLogger.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* Use WC_Rate_Limiter

* Update wc_doing_it_wrong log method name

* Update is_third_party_error method signature in RemoteLogger.php

* Revert changes

* Update plugins/woocommerce/src/Internal/Logging/RemoteLogger.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* Update plugins/woocommerce/src/Internal/Logging/RemoteLogger.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* Update plugins/woocommerce/src/Internal/Logging/RemoteLogger.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* Update plugins/woocommerce/src/Internal/Logging/RemoteLogger.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* chore: Add 'php' tag to RemoteLogger in woocommerce

* Fix test

---------

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-08-01 04:56:14 +00:00
Chi-Hsuan Huang 76e1761cf7
Add JS remote logging package (#49702)
* Add remote logging package

* Update package.json

* Fix wca admin

* Add changefile(s) from automation for the following project(s): @woocommerce/remote-logging, @woocommerce/dependency-extraction-webpack-plugin, woocommerce

* Update .eslintrc.js

* Revert core changes

* Add tracks check and update tests

* Set hard limit to trace

* Fix filename

* Add filters to customise API endpoints

* Update REDAME.md

- Add filters
- Remove installation section

* Update REDAME.md

* Add composer.lock

* Fix filename

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-01 12:35:43 +08:00
Chi-Hsuan Huang c9f20f87d2
Fix e2e Google for WooCommerce strict mode violation error (#50189)
* Fix e2e Google for WooCommerce strict mode violation error

* Add changelog

* Fix test
2024-08-01 12:27:00 +08:00
DAnn2012 e8dfe754dd
Fix typo (README.md) (#50156)
* Update README.md

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

* Update heading to fix lint failure

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jonathan Lane <lanej0@users.noreply.github.com>
2024-07-31 11:37:15 -07:00
Adrian Moldovan 017fe40928
[testing workflows] Use choices for on-demand test run input (#50170) 2024-07-31 10:48:14 -07:00
Nathan Silveira d3bd80fc61
SelectTree: keep the focus on the input while navigating between menu items (#49989)
* Commit at a functional state

* Change role to 'listbox'

* Add --highlighted class rules

* Fix overflow in create category modal

* Add countNumberOfItems
Fix multiple bugs
Refactor
Rename and move use-linked-tree file to linked-tree-utils

* Add comments

* Escape regExp

* Allow to select/remove with the enter key

* Add changelogs

* Fix unit tests

* Fix bug on css selector, since role was changed

* Fix bug in index calculation and handle focus on checkboxes and expander button correctly

* Only add activedescendant when something is highlighted

preventDefault when pressing arrowUp

* Fix bug: items array was being used instead of using linked tree

* Call onSelect when pressing enter

* Add guards to prevent tests breaking

* Add additional tests for SelectTree

* Add comments and rename some functions in linked-tree-utils
2024-07-31 11:30:32 -03:00
Niels Lange 3dd6a4037b
Display address card for virtual products if shopper's address is known (#50127)
* Display address card for virtual products

* Remove obsolete dependency

* Optimise dependencies

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

* Adjust core e2e tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-31 15:17:21 +02:00
Niels Lange 6e2fbcae52
Text adjustments on shipping zones settings page (#50136)
* Text adjustments on shipping zones settings page

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

* Fix line error and escape output

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-31 15:16:59 +02:00
Maikel Perez 75d55a4a66
Product Block Editor: clicking outside of the attribute modal triggers an error (#50139)
* Fix clicking outside of the attribute modal triggers an error

* Add changelog file
2024-07-31 09:03:39 -04:00
Vladimir Reznichenko 045919d107
CI: git checkout speed tweaks in linting jobs. (#50169) 2024-07-31 14:31:41 +02:00
Vladimir Reznichenko 5d4733edd8
CI: re-introduce sharding in PHPUnit jobs (#50084)
In this PR we re-grouping PHPUnit jobs and introducing sharding based on two test suites - legacy and main, in order to reduce per-PR CI flow duration and release workers earlier.
2024-07-31 12:58:15 +02:00
Vladimir Reznichenko 4b90743ada
CI: add some comments to CI-workflow about intended jobs generation strategy. (#50114) 2024-07-31 08:46:55 +02:00
Tung Du 5ffad9a659
[Experimental]: Update: new title and icon for the Overlay Navigation block (#50011)
* update: rename Navigation block to Overlay Navigation with new icon

* chore: changelog

* chore: use comment instead of update

* reset lock file

* test: update block title

* test: update overlay navigation test
2024-07-31 12:56:53 +07:00
DAnn2012 4318dac7ec
Fix typo (class-wc-rest-wccom-site-ssr-controller.php) (#50145)
* Update class-wc-rest-wccom-site-ssr-controller.php

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-30 16:29:50 -07:00
Fernando Marichal e40d91c279
Always count variations without price (#50129)
* Always count variations without price

* Add changelog
2024-07-30 16:13:48 -03:00
Shani 752e80acfa
Docs/linter fixes code snippets (#50102)
* Adds merchant code-snippets

* Adds updated manifest.json

* Fixes linting issues on a number of files

* Adds manifest.json again

* Additional linter fixes

* Updates manifest.json

---------

Co-authored-by: Shani Banerjee <shanibanerjee@Shanis-MBP.lan>
2024-07-30 10:46:59 -04:00
Alex Florisca 13a79c821a
Express checkout buttons have a min-width of 240px (#49304)
* express checkout buttons have a min-width of 240px

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

* Fix linting issue

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-30 15:42:51 +01:00
nigeljamesstevenson 217d628199
Remove changelog file that was created for `9.1.4` (#50120)
Delete plugins/woocommerce/changelog/fix-woocommerce_product_add_to_cart_text-filter-core-approach

removing changelog that was created for `9.1.4`
2024-07-30 06:50:09 -07:00
Fernando Marichal e759036dcb
[Enhancement]: Change link label for duplicated SKU (#49729)
* Change link label for sku

* Add changelog

* Add id to product_sku

* Fix focus function

* Get element by id

* Fix tests

* remove hardcoded elements

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

* Add id to generic text

* Remove comment

* Fix e2e tests

* Add changelog

* Fix js tests

* Show example of empty useValidation

* Rename validator function

* Create method getParentTabIdByBlockName

* Fix errorhandler hook

* Fix tests

* Fix useBlocksHelper tests

* Fix e2e test

* Fix test

* Add tests

* Replace empty string by null

* Add errorContext null check

* Fix errorHandler hook tests

* Fix test description

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2024-07-30 10:00:17 -03:00
Maikel Perez dc2c2eda8e
[Product Editor] Attribute create term failed request causes unlimited loading state (#50093)
* Fix unhandled promise rejection when creating an attribute term and the create request fails

* Add changelog file

* Fix linter error

* Fix compilation error
2024-07-30 09:59:10 -03:00
Nathan Silveira 71b865fa63
Add abbreviations for fields GTIN, UPC, EAN, or ISBN (#50042)
* Add abbreviations for fields GTIN, UPC, EAN, OR ISBN

* Add translators comments
2024-07-30 09:51:29 -03:00
Alba Rincón 9d826e7b3b
CYS - Update the `show_on_front` setting to `posts` (#50083)
* Update the `show_on_front` setting to `posts`.

This is needed for the CYS flow to work properly

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-30 13:07:46 +02:00
Francesco 81d20d8d32
feat: add `aria-required` attributes to WC form fields (#48371)
* feat: add `aria-required` attributes to WC form fields

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

* added tests for radio fields

* WIP

* WIP

* yoda, space

* Update functions.php

* WIP

* WIP

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

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

* Update plugins/woocommerce/tests/legacy/unit-tests/templates/functions.php

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>

* fix checkbox required attribute, add tests

* lint

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

* importing changes from Thomas' branch, aria-hidden on abbr

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

* added hidden also on JS changes

* template number change

* forgot to commit these changes

* porting of changes from selectWoo repository

* undo unwanted changes

* Update checkout e2e to stop looking for * in field labels

* removed aria-hidden to abbr, to avoid regressions across multiple repos

* lint

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2024-07-30 16:11:23 +05:30
Luigi Teschio d080f44c17
CYS: Fix opt-in flow fonts (#50086)
* CYS: Fix opt-in flow fonts

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

* add E2E test

* fix e2e test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-30 12:10:51 +02:00
Luigi Teschio d4e686a063
CYS: Fix opt-in flow patterns (#50080)
* CYS: Fix opt-in flow patterns

* clean up not necessary state

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

* show spinner

* improve e2e test

* fix e2e test

* fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-30 12:10:16 +02:00
Adrian Moldovan d4696f0437
[e2e tests] Updated docs with new pnpm commands (#50117) 2024-07-30 10:58:05 +02:00
github-actions[bot] e750ba5592
Delete changelog files based on PR 49929 (#50095)
Delete changelog files for 49929

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-07-29 11:58:29 -07:00
Alexandre Lara ced27dddeb
[Experimental] Product Filters Redesign > Overlay: Replace Product Filters Block with Template Part (#49999)
* Modify Product Filters Overlay template part

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

* Add E2E tests for the Product Filters Overlay template part

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-29 15:36:53 -03:00
Alex Lykesas 26a6c9adba
Enhance Customer Email Password Reset include Login Username in Reset Password Link (#49737)
* Add login username in reset password links

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

* Move login param as final query param

* Bump template versions to 9.3.0

* `phpcs:ignore` should be specific

* `phpcs:ignore` should be specific

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-07-29 11:11:00 -07:00
github-actions[bot] 853c722b08
Delete changelog files based on PR 50076 (#50097)
Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-07-29 18:54:55 +02:00
Simon Porter f61a9bf37a
Allow rendering the quantity in cart when the quantity is not editable (#49450) 2024-07-29 16:12:15 +01:00
nigeljamesstevenson 77318c4a67
Cherry pick #351 and #363 into trunk (#50075)
* XSS vulnerability on various unescaped attributes

* escape Product Filter Stock status

* escape more blocks

* escape more blocks

* escape more blocks

* add changelog

* update changelog

* Fix misplaced json encode flags

* Add escaping to the block names

* Update changelog message

---------

Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: roykho <roykho77@gmail.com>
2024-07-29 15:29:34 +01:00
Miguel Pérez Pellicer 61d9b63f67
Add admin_install_timestamp in WC_Tracker (#50076)
* Add admin_install_timestamp in WC_Tracker

* Lint

* Tweak tests

* Tweak tests

* Lint
2024-07-29 18:12:55 +04:00
github-actions[bot] 191c8edd18
Update changelog.txt from release 9.1.4 (#50039)
* Prep trunk post release 9.1.4

* Satisfy changelog requirement.

---------

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-07-29 07:03:06 -07:00
RJ a92fbcaa07
fix: wcadmin react18 createroot shipping settings, payment method, wc beta tester (#48835) 2024-07-29 21:30:03 +08:00
Jonathan Lane 31c4ae8431
Adds concurrency limit to workflow run (#50034)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-07-29 16:25:26 +03:00
Vladimir Reznichenko 07a71106dc
Monorepo: actualize loaders paths filtering for better Webpack performance. (#49714) 2024-07-29 15:20:17 +02:00
github-actions[bot] a8b560a03f
Prepare Packages for Release (#50073)
* Automated change: Prep @woocommerce/onboarding for release.

---------

Co-authored-by: mordeth <mordeth@users.noreply.github.com>
Co-authored-by: mordeth <cvetan.cvetanov@automattic.com>
2024-07-29 16:18:37 +03:00
Karol Manijak edc268afa5
Product Collection: sync with current query doesnt display the correct products in the specific category templates (#49889)
* Recognize custom category templates as archive ones

* Disable the preview label if termId is recognized

* Fetch the product category template ID

* Prepare util to properly parse product taxonomies

* Utilise the taxonomies util and update the query accordingly

* Add tests

* Update tests to be more specific

* Improve selectors in E2E test

* Add changelog

* Update selectors

* Fix the order of expected products

* Remove unneceessery entries from array that are covered by another entries

* Rename the variable to beytter depict its purpose
2024-07-29 14:21:44 +02:00
Vladimir Reznichenko 63c77caf95
CI: improve monorepo setup time in PHPUnit and API tests. (#50032)
In this PR we introduce a new installation logic aiming only PHPUnit and API test jobs as part of monorepo setup.
2024-07-29 13:01:58 +02:00
Adrian Moldovan c12cb6ccdf
[tests] Move API core tests as a suite in e2e-pw (#50024) 2024-07-29 13:51:36 +03:00
Tom Cafferkey 640312d0d1
CYS: Insert Add Patterns button for no blocks placeholder (#49981)
* Add uninteractive button

* insertPatternByName

* Add comment explaining the event listener

* Add E2E test coverage

* Vertical align content

* Hide popover for interactive elements

* Replace not.toBeVisible with toBeHidden
2024-07-29 10:05:29 +00:00