Commit Graph

64884 Commits

Author SHA1 Message Date
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
Bart Kalisz d731edc868
Product Collection: Fix max price filter query value inclusion (#49917) 2024-07-29 11:51:26 +02:00
Alba Rincón df4bd38297
CYS - Run appropriate tests depending on the WordPress version (#50016)
* WIP

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

* Add missing code in before all

* Fix lint

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-29 10:32:29 +02:00
Ilyas Foo 11c8567c4c
Hide main payment settings save changes button (#50064)
* Hide save changes button for main payment settings screen

* Changelog

* Moved logic
2024-07-29 05:30:01 +00:00
Gabriel Manussakis 928271b427
[Accessibility ]Fix typos in experimental select control test (#48643)
* Fix "begining" and "fullfiled" typos

* Add changelog file
2024-07-29 03:16:01 +00:00
Gabriel Manussakis b2a822d44d
[Accessibility] Fix typo in Find Country Option test (#48648)
* Fix "comparsion" typo

* Add changelog file
2024-07-29 11:06:24 +08:00
Gabriel Manussakis c7003646ce
[Accessibility] Fix typos in packages/js/ resolvers error messages (#48646)
* Fix "retriving" typo

* Add changelog file
2024-07-29 11:05:55 +08:00
Veljko V. 0ccf3c013d
Remove unnecessary pause in e2e test (#50043) 2024-07-26 21:34:17 +02:00
rodelgc 8be71d467d
Whitelist a line in WC Beta Tester from QIT security tests (#49965)
* Whitelist succeeding line from QIT's security scanner

* Add changelog
2024-07-26 12:31:51 -07:00
nigeljamesstevenson 236cd442d6
Update stable tag to 9.1.4 (#50037)
woorelease: Update stable tag to 9.1.4
2024-07-26 19:15:52 +01:00
Seghir Nadir 0dcd359b25
Add validation to select fields and add placeholder option to additional fields API (#49929)
* Add validation and empty value to select components

* address feedback

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

* remove console log

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/additional-checkout-fields.md

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

* Update plugins/woocommerce-blocks/docs/third-party-developers/extensibility/checkout-block/additional-checkout-fields.md

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

* remove test

* Fix tests

* also move select to parent

* fix tests

* add empty enum to schema

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2024-07-26 16:38:44 +00:00
Marco Almeida 9fefa6a54d
Fix #49982 - "Creation of dynamic property WC_Beta_Tester::$wporg_data is deprecated" on PHP 8.2 (#49983)
* Fix #49982

Fixes #49982

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

---------

Co-authored-by: Vladimir Reznichenko <kalessil@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-07-26 09:31:44 -07:00
Mike Jolley 0b13563a2f
[WIP] Fix logout endpoint handling (#49605)
* `wc_get_account_endpoint_url` should handle nonces for logout endpoint

* Handle logout without redirect, unless a nonce is missing.

* `wc_logout_url` should not use the account page endpoint because that does not support custom redirects

* Handle navigation nonces

* changelog

* Bump versions

---------

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-07-26 15:26:35 +01:00
RJ 68cdc2941c
add: render react placeholders for offline and woocommerce_payments settings sections (#50008)
* Added a whitelist of sections to render an alternative output in the WC_Settings_Payment_Gateways_React class.

* Renamed constant and updated its contents to only include 'offline'

* Added a branch in the `output()` method to output an appropriate div with an id if the current section is in the whitelist.

* Added "experimental" prefix to payment settings div ID.

* Replicated the render for the offline section similar to the main payments settings.

* Added a new settings-payments-offline screen to the WooCommerce admin plugin.

* Implemented new offline settings page component.

* Removed the ErrorBoundary components from the SettingsPaymentsMainWrapper and SettingsPaymentsOfflineWrapper.

* Added a new SettingsPaymentsOfflineWrapper component and its corresponding SCSS styles.

* Implemented the WooCommerce Payments section in the settings page.

* Removed WooCommerce Payments settings logic and replaced with a placeholder.

* Added a placeholder for the offline payments screen.

* Added 'main' to the REACTIFY_RENDER_SECTIONS array and refactored the output method to improve readability and maintainability.

* Renamed `render_gateway_section` method to `render_classic_gateway_settings_page` in the `class-wc-settings-payment-gateways-react.php` file.

* Added a filter for the REACTIFY_RENDER_SECTIONS so that plugins can modify this list.

* Added inline documentation for the filter in the `get_reactify_render_sections` method.

* changelog

* Matched the CSS styles for the WooCommerce Payments section to the offline section.

* Removed unnecessary Card component and placeholder text from WooCommerce Payments settings.

* Linted the `class-wc-settings-payment-gateways-react.php` file, addressing the reported linting issues.

* Refactored the payment settings UI to use React components and lazy loading.

* lint

* Nit: Removed unnecessary comment and moved a small code

* Update name to experimental

* Fix save button missing from section pages

* Fix saving sections

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-07-26 20:55:19 +08:00
Mike Jolley 7195ec2e32
Fix shortcode cart shipping calculator placeholder (#49684)
* Reset default placeholder in country select JS

* Handle shipping calculator in address-i18n

* changelog
2024-07-26 12:53:37 +01:00
nigeljamesstevenson cdf89ee951
Update my-account-orders Perf Test to ensure the variable boundary operates with new codebase (#48937)
* Update my-account-orders.js

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

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

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Tam Mullen <tam.mullen@automattic.com>
2024-07-26 12:46:13 +01:00
Adrian Moldovan f06302bbb5
[testing workflows] Harden the run condition for reporting jobs to only run in the monorepo (#50017) 2024-07-26 12:40:14 +01:00
Brian Taylor 406cc67c47
Update link to caching documentation in store launch message (#49961) 2024-07-26 09:46:43 +00:00
Vladimir Reznichenko 5a37ae4333
CI: tweaks around 'Build Live Branch' job start conditions. (#50005)
The PR scope was reduced to filtering out the `.github` folder from target changes, except the workflow itself. It should reduce the amount of the job runs when we are working with GitHub actions related files.
2024-07-26 11:41:10 +02:00
Vladimir Reznichenko 2d6811e689
CI: speedup 'Check Asset Sizes' job (take 2) (#49992) 2024-07-26 11:21:58 +02:00
Alba Rincón 85c6c0944c
CYS - Full composability tests (#49748)
* WIP

* Add e2e tests for the full composability

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

* Fix lint errors

* Enable the full composability flag for want more patterns banner

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-26 11:12:35 +02:00
Adrian Moldovan 142f7e5865
[e2e tests] Cleanup: remove console logging of environment data (#49997)
* Removed console logging or environmentData

* Add changelog
2024-07-26 11:21:49 +03:00
Chi-Hsuan Huang b2f4828c16
Use MC Stats for PHP fatal error counting (#49658)
* Add automattic/jetpack-a8c-mc-stats

* Count fatal errors

* Add tests

* Output as img tag

* Add changelog

* Fix lint

* Fix lint

* Move McStats to ./src/Internal

* Check user's consent before sending stats

* Remove test

* Send stats from server side

* Update plugins/woocommerce/src/Internal/McStats.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Add unit tests

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-07-26 08:00:53 +00:00
Niels Lange 752273e6ce
[React 18] Use `createRoot().render()` instead of `render()` (#48843)
* Use createRoot().render() instead of render()

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

* Replace `unmountComponentAtNode()` with `createRoot().unmount()`

* Adjust JS unit tests

* Remove obsolete import

* Remove “ReactDOM.render is no longer supported” check

* Update pnpm-lock.yaml

* Migrate JS unit test to React 18

* Revert "Update pnpm-lock.yaml"

This reverts commit 18bfc967aa.

* Migrate JS unit test to React 18

* Migrate JS unit test to React 18

* Minor refactor

* Unskip previously skipped tests

* Fix JS unit test error related to root.unmount()

* Remove obsolete dependency

* Fix failing blocks e2e test

* Fix failing core e2e tests

* Optimise memoisation to prevent “Maximum update depth exceeded” error.

* Fix Filters JS tests in #48796 (#49973)

* Run cleanup in Rating Filter JS tests

* Run cleanup and wait user interactions in Stock Status Filter JS tests

* Rename constant

* Simplify conditional statement

* Introduce TS type

* Address lint error

* Rename TS type

* Optimise multiple TS types

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-07-26 09:18:48 +02:00
Ilyas Foo 33222c20e2
Add reactified main payments screen (#49972)
* Add new payments settings class, add new settings-payments module and a demo main component

* Minor edits

* Changelog

* Lint

* Lint php

* Use createRoot

* Hide payment recommendations when feature flag is enabled

* Moved logic
2024-07-26 12:40:18 +08:00
github-actions[bot] fe85d2b1ab
Prepare Packages for Release (#50000)
Automated change: Prep @woocommerce/experimental for release.

Co-authored-by: lanej0 <lanej0@users.noreply.github.com>
2024-07-25 14:54:32 -07:00
Jonathan Lane d6fad9f6d5
Add changelogs to trigger version bumps in packages (#48645)
* Add changelogs to trigger version bumps in packages

* Don’t update already updated packages

* Don’t update other packages

* extend-cart-checkout-block has been released

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-07-25 13:57:30 -07:00
79mplus Admin a39d926457
fixed warning: Undefined array key "class" (#48079)
* fixed warning: undefined index class

* Update plugins/woocommerce/includes/admin/class-wc-admin-profile.php

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

* add changlog

* Tweak changelog.

---------

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com>
2024-07-25 12:56:07 -07:00
github-actions[bot] 0f26b50972
Prep trunk for 9.3 cycle (#49962)
* Prep trunk for 9.3 cycle with version bump to 9.3.0-dev

* Add comment explaining why no changelog is needed.

---------

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-07-25 18:16:31 +00:00
Adrian Moldovan 1b2e06a6f6
[e2e tests] Add environment info rest route and environment reporter (#49988) 2024-07-25 11:07:25 -07:00
github-actions[bot] e74464fa17
Release: Remove 9.2 change files (#49963)
Delete changelog files from 9.2 release

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-07-25 08:57:20 -07:00
Ames Plant 9b521edda4
[Accessibility] Fix/43628 view button orders page (#49424)
* Add an aria-label to the View order buttons

* Add changelog

* Add translator comment

* Bump template version number

* Fix space / tab formating issue

* Update plugins/woocommerce/changelog/fix-43628-view-button-orders-page

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Fix translation

* Fix linting errors in orders.php

---------

Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2024-07-25 15:07:01 +01:00
Mike Jolley 95ba494d03
Only filter page title on order confirmation page when using an FSE theme (#49986)
* Only filter page title on order confirmation page

* changelog
2024-07-25 15:06:44 +01:00
Gabriel Manussakis 2840c2f3d3
[Accessibility] Inform screen reader users when mini cart updates (#48295)
* Create add_to_cart_success_message method in WC_Product_Simple class

* Add data-success_message attribute to remove item button in cart

* Add data-success_message to Add to cart button

* Make screen readers announce mini cart updates

* Add changelog file related to #37597 #37598

* Add translator comment to remove button data-success_message attribute

* Add docblock to woocommerce_product_add_to_cart_success_message filter

* Bump mini-cart template version

* Refresh mini cart live region by removing it from the DOM

* Add mini cart live region to DOM beforehand

* Remove aria-relevant attribute before adding new content to live region

* Add a delay before updating live region

* Bump mini-cart template version from 9.1.0 to 9.2.0

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>

* Bump version of woocommerce_product_add_to_cart_success_message filter

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>

* Add description to the $text param on woocommerce_product_add_to_cart_success_message filter

* Refactor logic in the add_to_cart_success_message function

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2024-07-25 14:22:40 +01:00
Herman c2fc236341
Ensure wccomHelper data is only added on In-App Marketplace pages (#49758)
* Ensure wccomHelper data is only added on In-App Marketplace pages

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

* Fix linting

- Looking for GET requests for admin users, so no nonce available to check

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-25 12:49:35 +02:00
Luigi Teschio 9d63830063
CYS: Skip PTK is down test on WordPress 6.5 (#49970)
* CYS: Skip PTK is down test 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-25 08:59:59 +00:00
Sam Seay 0a47061ace
Don't render aria described by if the arg is not passed in add-to-cart.php (#48969) 2024-07-25 20:16:16 +12:00
louwie17 4ac3ce099c
Add track unit tests for `wcadmin_product_add_publish` track (#49916)
* Add helper function to clear track events

* Add additional test cases for product_add_publish track event

* Add changelog

* Add empty save use case

* Address lint issues
2024-07-25 04:38:21 -03:00
RJ 0a48da3135
add: reactify payments settings feature flag (#49966) 2024-07-25 12:48:34 +08:00