Commit Graph

21700 Commits

Author SHA1 Message Date
RJ b74bd01ca1
fix: remove defaultProps in prep for react 19 (#50266) 2024-08-06 12:20:45 +00:00
Sam Seay 1488a02817
Remove unused php imports from BlockTemplatesRegistry that were accidentally left in a previous commit (#49757)
* Remove unused php imports that were accidentally left in ddabdb1bc2
2024-08-06 23:20:31 +12:00
Tarun Vijwani 5e5378e444
Remove Active Shipping Zones check for displaying shipping calculator on Cart Page (#49214)
* Remove active shipping zones check for displaying shipping calculator

- Remove active shipping zones check for displaying shipping calculator on Cart Page

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

---------

Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-08-06 10:41:26 +01:00
Bart Kalisz 52119dfcc9
Fix CI Metrics job (#50214) 2024-08-06 11:23:04 +02:00
Adrian Duffell 3d16f16ae1
Use admin password reset link on admin login screen (#50200)
* Use admin password reset link on admin login screen

* Add changelog

* Take a different approach that’s compatible with JN

* Update code comment

* use existing variable

* Update tests

* Lintfix

* Change to alternative aproach for detecting admin login form

* Whitespace

* Update test

* Lint fix
2024-08-06 10:29:01 +08:00
DAnn2012 ec6711346b
Fix typo (sidebar-navigation-screen-typography.tsx) (#50332)
* Update sidebar-navigation-screen-typography.tsx

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-06 00:36:17 +00:00
piinthecloud f7f280fd1b
create product collection category and move to main docs folder (#50368)
* create product collection category and move to main docs folder

* add readme

* update title

* update title

* add changelog and remove emojis

* Update docs/product-collection-block/register-product-collection.md

Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>

---------

Co-authored-by: Shani <shanibanerjee@gmail.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-08-05 11:51:32 -04:00
Luigi Teschio fd2dbf5517
CYS: improve CTA (#50278)
* CYS: improve CTA

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-05 15:13:39 +00:00
Seghir Nadir ef224a1a70
Fix new account notice not showing in Checkout block. (#50138)
* Correctly cast the account creation nag option

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-05 17:08:46 +02:00
Gabriel Manussakis a00c61481d
[Accessibility] Remove opacity from the hover style of the mini cart button (#50240)
* Remove opacity from the hover style of the mini cart button

* Add changelog file
2024-08-05 15:58:48 +02:00
DAnn2012 162874a408
Fix typos (920.md) (#50335)
* Update 920.md

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-08-05 15:56:35 +02:00
Gabriel Manussakis 0223715af6
[Accessibility] Fix address heading level on My Account page (#49764)
* Change address title from h3 to h2 on my account

* Bump up my-address template version

* Add changelog file

* Change address title from h3 to h2 on edit address page

* Bump up form-edit-address template version

* Update form-edit-address.php

* Update my-address.php

---------

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2024-08-05 14:51:23 +01:00
github-actions[bot] a757c53e8b
Delete changelog files based on PR 50126 (#50357)
Delete changelog files for 50126

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-05 12:51:02 +01:00
Fernando Marichal 54b29ec50e
[E2E tests]: Add product description using the block editor (#50232)
* Add product description

* Add changelog

* Add changelog

* Always use same label for ToolbarItem
2024-08-05 08:43:22 -03:00
Luigi Teschio 854c81d9ad
Compatibility Layer: fix documentation (#50348)
* Compatibility Layer: fix documentation

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

* Update plugins/woocommerce-blocks/docs/internal-developers/blockified-templates/compatibility-layer.md

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2024-08-05 09:59:25 +00:00
DAnn2012 6c22840dcf
Fix typos (Produts) (#50334)
* Update config.js

* Update data.json

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-05 05:54:52 +00:00
Marianne380 0ca152fa0d
[Enhancement] Create new filter `woocommerce_is_store_page` for filtering if the URL is a store page. (#50174)
Create a new filter woocommerce_is_store_page for filtering if the URL is a store page.

Fixes #50173

* Create new filter  for filtering if the URL is a store page

* Fix brace

* Update plugins/woocommerce/src/Admin/WCAdminHelper.php

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>

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

* Remove extra whitespace

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 17:10:57 -07:00
piinthecloud d92161cbd1
Move checkout docs to main v2 (#49984)
* move checkout docs with front matter to main folder (#49186)

* move checkout docs with front matter to main folder

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>

* initial commit to reapply changes from PR #49186

* update html tags to unicode and clean up hashlinks

* revert unicode

* remove emoji

* update manifest

* test readme page

* remove avail-filters since it is now redundant with the readme

* update links

* test htmlentity

* pdate links

* typo fix

* update readme with actual doc

* fix links

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
2024-08-02 20:12:06 +02:00
Alba Rincón f8854e0a4f
CYS - Improve the error when a request fails due to permissions (#50211)
* Improve the error when a request fails due to permissions

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

* Fix regression and copy

* Fix feedback: improve types

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 17:50:13 +02:00
Luigi Teschio 5e78db0585
CYS: Improve tracking survey (#50196)
* CYS: Improve tracking survey

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 17:38:25 +02:00
Ames Plant dbc3056845
[WIP][Accessibility] Add field for the email footer text color (#49648)
Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 16:14:21 +01:00
Adrian Moldovan 8849f54491
[e2e tests] Implement the flaky test reporter for core e2e tests (#50259) 2024-08-02 13:32:41 +02:00
DAnn2012 66daa66aa3
Fix typo (filter-setter.php) (#50157)
* Update filter-setter.php

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2024-08-02 11:24:48 +01:00
Luigi Teschio 83b12d59ee
CYS: add E2E tests for fonts installation (#50210)
* CYS: add E2E tests for fonts installation

* remove check

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

* remove console.log

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 08:43:35 +00:00
Adrian Moldovan 4e2c72ec23
[e2e tests] Remove Github reporter (#50256) 2024-08-02 11:38:24 +03:00
RJ c4beb062bf
fix: fixed react18 React.render deprecation notice for WCAdmin (#48785) 2024-08-02 06:53:49 +00:00
louwie17 89e8df826a
Update linked product search to use GB combobox in order to fix timing issue (#50128)
* Make use of GB Combobox for the product select

* Update E2E tests

* Add changelog

* Small CSS changes

* Fix create variable product E2E test

* Add changelogs

* Use our internal wrapper of the combobox

* A couple small fixes

* Fix bug and address feedback

* Address small formatting in comments

* Move search products back to consolidated function
2024-08-02 03:24:14 -03:00
DAnn2012 1759672206
Fixed typos in CSS classes (#50243)
* Update index.scss

* Update index.js

* Update style.scss

* Update task-list.tsx

* Update task-list-placeholder.tsx

* Update setup-task-list.tsx

* Update task-list-completed-header.scss

* Update task-lists.scss

* Update task-list-completed-header.tsx

* Update page-loads.spec.js

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-02 05:15:13 +00:00
Ames Plant 2eff30de04
[Accessibility] Add a label to the product pagination for the woocommerce pagination (#49924)
* Add a label to the product pagination for the woocommerce pagination

* Bump template version

---------

Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
2024-08-02 10:22:23 +07:00
DAnn2012 ef85173041
Fixed typo WooCommmerce (#50247)
* Update README.md.mustache

* Update README.md

* Update page-controller.md

* Update README.md

* Add changefile(s) from automation for the following project(s): @woocommerce/create-woo-extension, woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-08-02 03:14:15 +00:00
Chi-Hsuan Huang e8dacef7a6
Track frequency of unhandled JS errors with MC Stats (#50155)
* Add bumpStat and fix tests

* Add changelog

* chore: Update dependencies and add @woocommerce/tracks for remote logging

* feat: Track frequency of unhandled JS errors with bumpStat

* chore: Update error boundary to log unhandled JS errors with bumpStat

* Add changelog

* Fix lint

* Check if tracks is enabled before bumping stats

* Fix test

* Fix lint

* chore: Refactor buildQuerystring to buildQueryParams for clarity and consistency

* Add bumpStat to wc tracks mock
2024-08-02 03:04:31 +00:00
Chi-Hsuan Huang ed81aa8201
Integrate JS remote logging package in WooCommerce Admin (#50134)
* Update remote logger to check dev env and whether logging is enabled

* Add changelog

* Integrate JS remote logging package in WooCommerce Admin

* Add changelog

* Update remote logger package

* Update test

* Log error in error boundary

* Update remote logger

* Fix webpack config

* Update log stack format

* Update handleError

* Add init debug
2024-08-02 10:25:39 +08:00
Vladimir Reznichenko a3f4d722b9
CI: speedup 'Check Asset Sizes' job (take 3) (#50178)
* CI: attempt 3 to speedup 'Check Asset Sizes' job.

* CI: cleanup

* CI: changelog entry.
2024-08-01 14:15:10 -07:00
Gabriel Manussakis fa3d8233da
[Accessibility] Keep focus on shipping option input once selected (#49360)
* Keep focus on shipping option input once selected

* Add changelog file

* Remove unnecessary space

* Manage focus of the shipping methods inputs on checkout

* Refactor the code to use native JS instead of jQuery

* Revert native JS usage on jQuery code

* Focus shipping input after re-initing payment methods on checkout

* Replace includes with indexOf for consistency

* Revert usage of native JS

* Remove unnecessary if statement

* Check if event exists before assigning current target

* Get current target with native JS

* Remove unnecessary spaces
2024-08-02 03:14:18 +07:00
Andrej Mernik f20afed89c
Optimize maybe_assign_default_product_cat to drop caches only if changes were made (#50006)
* Optimize maybe_assign_default_product_cat

maybe_assign_default_product_cat should flush cache, delete transients and update term counts only if changes were made

* Fix whitespace

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-08-01 12:58:16 -07:00
github-actions[bot] 38d2d82e2d
Delete changelog files based on PR 50236 (#50238)
Delete changelog files for 50236

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-08-01 11:40:07 -07:00
Jorge A. Torres 4d1e61a8ce
Prevent creation of password-protected coupons (#50236)
* Warn when creating password-protected coupons

* Add changelog
2024-08-01 11:31:38 -07:00
Corey McKrill 864d7b52e8
Logging: Add parameter to avoid log directory creation (#49766)
* Logging: Add parameter to avoid log directory creation

The `get_log_directory` method, by default, attempts to create the
directory if it doesn't exist yet. However, the method is called early
in the initialization of the WooCommerce plugin, regardless of whether
the logging system is configured to use the filesystem. This adds a
parameter to `get_log_directory` to specify whether to attempt directory
creation, and ensures that the parameter is set to false in a couple
of specific places.

* Remove usage of method from old log file handler

* Don't initialize log directory when getting size

* Add missing translator note

* Rename  param to

* Reduce usage of wp_upload_dir
2024-08-01 11:21:53 -07:00
Ames Plant 806f2efdc6
[Accessibility] Update product order status colors to ensure accessible color contrasts (#49934)
Update product order status colors to ensure accessible color contrasts

Co-authored-by: amesplant <95257231+amesplant-dmv@users.noreply.github.com>
2024-08-01 18:19:59 +01:00
Thilina Pituwala 03fa96d7f3
Fix subscription activations when user own multiple subscriptions of same product install on different stores (#49803)
* When matching subscriptions to installed products, giving priority to subscriptions available for activation.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-01 19:04:55 +02:00
Fernando Marichal 03bbc139de
Enable skipped E2E tests for attributes (#50143)
* Enable test to add existing attributes

* Enable test to update product attribute

* Add changelog

* Locate item by aria-label instead of label

* Add blur to the summary field
2024-08-01 13:45:11 -03:00
Nathan Silveira 6a9278d7c2
Strip HTML tags from aria-label in wc_help_tip function (#50103)
* Strip HTML tags from aria-label in wc_help_tip function

* Run same escape sequence for aria_label string

* Refactor wc_help_tip and add additional test case

* Remove blank line
2024-08-01 12:35:41 -03:00
Thomas Roberts e2bd308e8e
Prevent Store API orders being placed with empty/invalid fields (#50028)
* Fix spacing/capitalisation on comments.

* Use get_fields_for_location to prevent numeric keys going into locale

* Merge default locale with current locale

Required because the current locale only contains a diff against the default

* Iterate over current locale to get validate required fields

* Add unit tests to cover the state/postcode checks

* Add changelog

* Fix lint errors

* Ensure locale filter runs when tests need it.

* Update tests to reset locale after running

* Add validate_required_additional_fields function

* Add test to ensure required additional fields are passed

* Add throws tag to docblock
2024-08-01 15:58:06 +02:00
Mike Jolley 02c639c2a3
Store API: Remove the need for nonces when using cart tokens. Remove deprecated `X-WC-Store-API-Nonce` header. (#50025)
* Tweak token validation to handle empty nonce

* Disable nonce check if you have a valid token

* Docs for Cart-Token

* Remove deprecated X-WC-Store-API-Nonce (was due to be removed blocks 7.5)

* Token should default to empty string

* Changelog
2024-08-01 15:52:54 +02:00
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
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 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
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
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
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
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
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
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
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
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
Brian Taylor 406cc67c47
Update link to caching documentation in store launch message (#49961) 2024-07-26 09:46:43 +00: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
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
Tung Du 234f5d7e49
[Experimental] Attribute Filter: Update Inspector Control Settings (#49751)
* add: new inspector controls

* update: cleanup the edit component

* chore: remove unused old inspector component

* tweak: add formatting to help text

as Jarek said:

> Here’s the copy. Please mind the formatting.

* add: default attribute id that closest to 30

* update: pass the whole attribute object

* update: use default attribute term in Product Filters template

* add: style settings

* add: sorting and show empty behavior in the editor preview

* tweak: use hideEmpty to align with existing settings

* chore: changelog

* test: add basic e2e tests

* chore: restore previous default value

* add: attribute help text and border support

* chore: lint

* fix: add missing context
2024-07-25 09:13:56 +07:00
Alexandre Lara 6000a1e83c
[Experimental] Product Filters Redesign: Create the template part (#49692)
* Add Product Filters template part

* Improve Product Filters template part description

* Hide Product Filters block from the inserter

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

* Add E2E tests

* Fix lint error

* Fix lint error

* add: register variation for unmodified template part

We should move this to abstract class later.

* Fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2024-07-24 17:36:18 -03:00
Alba Rincón 3fab8e7519
CYS - Update the intro pages for different type of themes (#49910)
* CYS - Revert the button copy customize the TT4 theme

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

* CYS - Add banner for block themes

* Add banner for block themes

* Fix tests

* Fix tests

* Fix intro banners

* Add modal to the use store designer

* Fix tests

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

* Fix lint errors

* use sendEvent instead of redirect

* fix lint error

* fix logic on ai flow

* fix build

* improve check

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
2024-07-24 18:09:12 +02:00
Thomas Roberts df8d5b751e
Revert "[Enhancement]: Add option to show price on the place order button" (#49899)
* Revert "[Enhancement]: Add option to show price on the place order button (#4…"

This reverts commit a71fb4d7a6.

* Add changelog
2024-07-24 18:08:05 +02:00
Sam Seay 137a2e8aa6
Checkout: Add placeholder option to country and state select, add error validation (#49616)
* WIP

* Add empty option for state as well

* Add client-side validation to country select inputs

* Add validation messages for state.

* Clean up redundant destructuring.

* Fix up the validation logic, fix bug where empty select was shown in some cases.

* Remove unused import

* Use import aliases instead of large relative paths

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

* Fix a typo

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

* use SelectOption type

* Also handle when address changes, because we shouldnt validate state when there is an address change

* adjust validation to handle any address change, not just country. translate field validations and use lowercase

* add a lowercase label for the country select as well

* Fix an issue where scroll to would not scroll to invalid select

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2024-07-24 17:59:15 +02:00
Vladimir Reznichenko 474b7624d0
Monorepo: rework deps patching in favour of built-in pnpm functionality (#49892)
* Monorepo: added pach.

* Monorepo: added patch.

* Monorepo: added patch.

* Monorepo: added patch.

* Monorepo: added patch.

* Monorepo: cleanup.

* Monorepo: cleanup.

* Monorepo: changelog entry.
2024-07-24 08:38:32 -07:00
Gabriel Manussakis b796b90d68
[Accessibility] Add address title to edit/add buttons on My Account page (#49171)
* Add address title to edit/add buttons on my account

* Add chengelog file

* Bump my-address template version

* Use placeholder in the edit/add address translation

* Replace sprintf with printf
2024-07-24 16:15:08 +01:00
Tung Du ac5b051fc2
Fix: Make woocommerce/product-price available in the Single Product template (#49906)
* fix: register woocommerce/product-price using registerBlockSingleProductTemplate

* fix: remove unnecessary blockMetadata

* chore: changelog

* Enable Product Price in post editor

---------

Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-07-24 15:58:20 +02:00
Mino e39da623cf
enhancement: making tooltips message be selected based on order status slug. changes to get_order_status_label filter (#49812)
* enhancement: making tooltips message be selected based on order status. passes order object in woocommerce_get_order_status_labels filter for more personalized tooltips.

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

* fix: change incorrect keys of order status in order_status array

* remove duplicate changelog file

* fix: linting issues

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2024-07-24 13:04:59 +00:00
Tom Cafferkey 193f4e47bd
CYS: Remove strong tags from patterns (#49901)
* Remove strong tags from patterns

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

* remove bold header

---------

Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-07-24 13:57:42 +01:00
Tom Cafferkey 1372a4bc8c
CYS: Update Patterns and Fonts usage tracking modal content (#49911)
* Update content within modal

* Changelog
2024-07-24 12:55:25 +00:00
Karol Manijak 0824b7e65d
Product Collection: Revert rename of "Sync with current query" option (#49907)
* Revert renaming Sync with current query option

* Add changelog
2024-07-24 14:17:37 +02:00
Alba Rincón 2a00c2f163
Minimal Header - Add the customer account block to fix the spacing (#49893)
* Add the customer account block to control the spacing

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-24 12:14:45 +02:00
Luigi Teschio 83ab1f5351
CYS: Ensure that the button in the Intro page redirects to the Customizer when a classic theme is enabled (#49804)
* CYS: Ensure that Customizer redirect is always enabled when a classic theme is enabled

* CYS: Ensure that the button in the Intro page redirects to the Customizer when a classic theme is enabled

* clean up logic

* add site preview

* mark CYS as complete when user saves customizer changes

* improve comment

* fix unit test

* fix unit test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-24 12:07:42 +02:00
Karol Manijak dace7ba296
Product Collection: add control to toggle whether block is filterable in non archive context (#49627)
* Add syncWithFilters attribute to Product Collection

* Add SycnWithFilters Inspector Control to PC

* Minor import adjustments

* Move the controls to Inherit as they share the same labels

* Rename the attirbute to filterable

* Hide control for collections

* Consume the filterable

* Consume filterable attribute so it enables the filtering

* Bring back file format

* Bring back filterable

* Move filterable from attribute to query

* Improve checks

* Fix incorrent function name

* Add changelog

* Set the default filterable value on insert

* Update test selector

* Add E2E tests to #49627 (#49715)

* Remove unnecessary call to create new post

* Fix "Use page context" control tests

* Fix post ↔ template collection sync test

* Fix non-thenable linter errors

* Extend the "Use page context" default setting test

* Add test for filtering in non-archive context

* Add test for combining editor and front-end filters

* Fix lint

* Update plugins/woocommerce-blocks/assets/js/blocks/product-collection/edit/inspector-controls/inherit-query-control.tsx

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>

* Improve query properties access

* Rename inherit-query-control to use-page-context-control to better depict its purpose

* Lint fix

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-07-24 11:51:53 +02:00
Tom Cafferkey e6d3890bdd
CYS: Update usage tracking content (#49894)
* Update opt in content

* Changelog
2024-07-24 08:52:56 +00:00
Chi-Hsuan Huang f9598fbed1
Deprecate and create new coming soon block version (#49786)
* Migrate coming soon block

* Update coming soon patterns

* Enqueue styles

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

* Fix entire site block

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-24 15:12:38 +08:00
Chi-Hsuan Huang ef1a26e69c
Fix the undefined array key "name" warning in ComingSoonRequestHandler.php when the font name is not set (#49795)
* Fix undefined array key "name" warning in ComingSoonRequestHandler.php when font name is not set

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-24 09:55:19 +08:00
mujuonly 9fbf143df9
Fix warning: Attempt to read property "order_awaiting_payment" on null (#45821) 2024-07-24 03:09:44 +02:00
Akeda Bagus d5dcf91ee2
Ensure expiration-related modal is shown to the installed subscriptions (#49747)
Ensure expiration-related modal is shown to the installed subscriptions
2024-07-24 08:02:55 +07:00
Tomek Wytrębowicz 8fb0953204
Fix flaky orphaned refund test (#49741)
Make sure the `date_paid` -> `date` -> order is deterministic.

Fixes #49630

Co-authored-by: github-actions <github-actions@github.com>
2024-07-23 21:44:23 +02:00
Vladimir Reznichenko 4ae9dee2e5
Monorepo: rework deps patching in admin plugin for better Webpack performance. (#49703)
* Monorepo: rework deps patching in admin plugin.

* Monorepo: changelog entry.
2024-07-23 16:27:42 -03:00
Alba Rincón efa506afdb
CYS - Schedule fetching patterns only once an hour (#49754)
* Schedule fetching patterns only one an hour

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

* Add notice

* Fix lint error

* Update copy

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-23 21:03:26 +02:00
github-actions[bot] 37441c6c52
Delete changelog files based on PR 49797 (#49809)
Delete changelog files for 49797

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-07-23 19:12:26 +01:00
Thomas Roberts afe245fdce
Make the address 2 line visible when a value is autofilled (#49730) 2024-07-23 16:44:20 +01:00
Thilina Pituwala 158930ef4d
Add tracking for enable auto renew links (#49710)
* Add tracking for enable auto renew link.

* Add UTM parameters to in-app enable auto-renew notice.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-23 17:40:23 +02:00
Thomas Roberts ad7a49df4c
Prevent error on Cart Shipping Calculator when using Additional Checkout Fields API (#49685) 2024-07-23 16:38:54 +01:00
Mike Jolley e8d899b6f3
Block Checkout: Fix default shipping selection on toggle pickup (#49718)
* Default selection is blank so it can be selected on mount

* Prevent notice displaying until rate selections are complete

* changelog
2024-07-23 16:25:35 +01:00
Daniel W. Robert bbdb289c84
CYS: Add Tracking for Fiverr Logo Maker CTA (#49783)
* Add tracking for new  event.

* Correct the naming convention for tracking event.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-23 15:12:44 +00:00
Paulo Arromba 1ba24e1937
Fix/Fix new order triggers when creating/moving orders into draft or from draft to valid statuses (#49098)
* Prevent new order hook if moving or creating order status into a non-triggering status (drafts&failed refunded etc) when using CPT for orders.

* Removed rogue error_log()

* Lint

* Prevent new order hook if moving or creating order status into a non-triggering status (drafts&failed refunded etc) when using HPOS for orders.

* Added changelog

* Fixed wrong if simplification

* Unit tests for update methods

* Renamed var

* Renamed vars to snake_case.

* Introduced remove_status_prefix() utility function.

* Added default 'new' status to an Order that doesn't exist yet in the database for the update method in HPOS

* Added default 'new' status to an Order that doesn't exist yet in the database for the update method in CPT

* Linting.

* Missing class import.

* Added a new test for updating new processing Orders.

* Linting.

* Tests fix.

* Tests fix.

* Removed statuses from triggering the new order hook.

* tweak

* Test tweak

* Test tweak

* Test tweak

* Test tweak

* Test tweak

* Tweak to rule out db querying failure.
2024-07-23 20:38:53 +05:30
Paulo Arromba 3d148e2577
Added Firefox support for making Order Summary sticky when not longer than view (#49744)
* Added getComputedStyle for Firefox support

* Added changelog

* Reverted pnpm-lock.yaml
2024-07-23 15:38:12 +01:00
Adrian Duffell 7e13bbcbf4
Update the footer section in "Add products" task (#49782)
* Update printful feature flag

* Remove footer

* Add upload icon

* Add importCSVItem constant

* Add footer stack

* Delete footer test

* Remove redundant printful inclusion

* fixed types

* Update CSS

* Changelog

* Lint

* Fix test

* Fix test again

* Fix SVG to use theme color

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
Co-authored-by: rjchow <me@rjchow.com>
2024-07-23 21:31:46 +08:00
louwie17 726e5fb0d8
Revert "Fix terms counts in wcadmin_product_add_publish Tracks event" (#49797)
* Revert "Fix terms counts in wcadmin_product_add_publish Tracks event (#48194)"

This reverts commit 7d5b3a81a2.

* Add changelog

* Add comment back in to fix linter
2024-07-23 13:08:07 +00:00
Chi-Hsuan Huang 572b497ec7
Move remote logger to `./src` and enhance `fetch_latest_woocommerce_version()` logic (#49639)
* Move remote logger to ./src

* Change fetch_latest_woocommerce_version transient expiration to a week

* Add changelog

* Add retry timeout to prevent repeated attempts to connect to the API when it errors

* Fix Remote_Logger

* Remove class_wc_remote_logger.php

* Update changelog

* Rename remote logger directory

* Move to internel

* Move to internel

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

Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>

* Rename folder/namespace Logger -> Logging

---------

Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2024-07-23 11:57:20 +00:00
Tom Cafferkey 8906783e80
Pattern: Update content on pattern "Content right with image left" (#49792)
Update content
2024-07-23 11:18:18 +01:00
Tom Cafferkey c29d70f3c3
Pattern: Update text to be vertically aligned like image (#49791)
* Update text column to be vertically aligned

* Changelog
2024-07-23 11:18:06 +01:00
Luigi Teschio 859fd9f001
CYS: Hide shuffle button when only one pattern is available (#49790)
* CYS: Hide shuffle button when only one pattern is available

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-23 09:43:01 +00:00
Alba Rincón 7f390a3663
CSY - Fix intro banner copy for existing themes (#49787)
* Fix intro banner copy for existing themes

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

* Fix linting errors

* Fix tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-23 11:13:20 +02:00
Luigi Teschio 440442f0fd
CYS: fix selected header/footer pattern (#49788)
* CYS: fix selected header/footer pattern

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-23 10:59:08 +02:00
Manish Menaria 7e54c5a589
Fix tip block syntax in register-product-collection.md (#49785)
* Fix tip block syntax in register-product-collection.md

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

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-23 13:58:42 +05:30
Luigi Teschio b586a28436
CYS: Remove margin last pattern preview (#49767)
* CYS: Remove margin last pattern preview

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-23 09:57:28 +02:00
Karol Manijak d85acc7e09
Product Collection: allow custom collections hiding each of the filters (#49713)
* Allow hiding all of the filter controls in PC block

* Add new test

* Add changelog

* Update documentation with information about hideControls values
2024-07-23 09:03:27 +02:00
Akeda Bagus 5fdc8fa520
Fixes issue where expired and expiring notice displayed incorrectly (#49717)
Fixes issue where expired and expiring notice displayed incorrectly

Consider connected (to the current site) product when checking expired
and expiring notice.

* Cache site subscriptions instead of just site_id
* Add helper method get_installed_subscriptions
* Bail out of installed subscriptions are empty
* Return early for invalid site ID
2024-07-23 13:46:02 +07:00
Chi-Hsuan Huang 7f23702018
Fix broken coming soon template in dataview (#49749)
* Set coming soon preview body aspect ratio to 1/1 to fix borken template

* Add changelog

* Update plugins/woocommerce/changelog/fix-broken-coming-soon-template

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

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-07-23 14:11:32 +08:00
Elio Rivero 1c23c5f2b4
Core profiler: set default for props to avoid crashes (#49519)
* fix(core-profiler): set default for props to avoid crashes. Fixes #49512

This fix solves an issue where if some of the onboarding profile properties from the context are undefined, it will prevent the user from proceeding with the core profiler. 

Related issue #49512 has a description of the issue.

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

* feat(core-profiler): improve onboarding profile assignment logic

This commit improves the logic for assigning the onboarding profile in the core profiler. It now checks if the output of the event is an object before assigning it to the context. If the output is not an object, it keeps the existing context. This prevents crashes and allows the user to proceed with the core profiler.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-07-23 10:45:58 +08:00
Jorge A. Torres d53744187f
Prevent type error in `BatchProcessingController` (#49728)
This PR introduces some type checking around the value of options involved in batch processing, particularly the one controlling which processors are enqueued.

* Add changelog

* Make BatchProcessingController's handling of internal options more robust

* Remove queue if invalid

* Implement suggestion
2024-07-22 10:34:41 -07:00
Daniel W. Robert 8c82d8dff3
CYS: Add Tracking String to Fiverr CTA Link (#49745)
* Update Fiverr LP link to add proper tracking string (per internal request).

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-22 11:33:44 -04:00
Miguel Pérez Pellicer dd8f9686fb
Rename Google Listings and Ads with Google for WooCommerce (#47614)
* Rename Google Listings and Ads with Google for WooCommerce

* Revert change regarding changelog

* Add changelogs

* Add changefile(s) from automation for the following project(s): @woocommerce/data, packages/php/remote-specs-validation, woocommerce

* Lint

* Lint

* Lint

* Rename Google Listings and Ads with Google for WooCommerce

* Lint

* Lint

* Tweak updated tests

* Add changefile(s) from automation for the following project(s): @woocommerce/data, packages/php/remote-specs-validation, woocommerce

* Lint

* Fix flaky tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-22 18:59:43 +04:00
Alex Florisca ab8517fa08
Render an aria-label for the initial mini cart html (#48329)
* Render an aria-label for the initial mini cart html

* Add changelog

* add changelog

* delete duplicate changelog entry

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

* Delete plugins/woocommerce/changelog/48329-fix-42289-mini-cart-aira-label

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-22 15:34:37 +01:00
Vladimir Reznichenko b28ee008c6
CI: improve flacky test reporting job execution time (#49665)
In this PR we use pre-build version of flaky jobs reporter, in order to speed up the job.
2024-07-22 16:33:31 +02:00
Luigi Teschio 2e54b88c26
CYS: Fix border width pattern preview (#49753)
* CYS: Fix border width pattern preview

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

* format CSS

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-22 15:46:11 +02:00
Ivan Stojadinov 182380943a
[e2e] Run full e2e suite against external hosts (#49597)
Co-authored-by: github-actions <github-actions@github.com>
2024-07-22 16:00:51 +03:00
Veljko V. 406a6c07f7
Fix failing tests in Gutenberg stable and nightly tests (#49548) 2024-07-22 15:52:21 +03:00
louwie17 f6035610a6
Address React 18 race condition issue and `setCategories` console error (#49642)
* Add missing script handle dependency

* Only register/unregister blocks if product page is being mounted/unmounted

* Set hasResolved to the product object

* Create new refresh action for product when generating variations

* Add changelog

* Revert changes around product update
2024-07-22 09:22:35 -03:00
Niels Lange 0c9e33bb7c
Adjust input field height and input label text size (#49636)
* Field height and label text size adjustments

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

* Kepe initial height of child element

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-22 12:53:59 +02:00
Vedanshu Jain 7b2a972405
Update Jetpack new SSO classes and methods to prevent deprecation notices (#49752)
Update Jetpack new SSO classes and methods to prevent deprecation notice.
2024-07-22 10:55:21 +02:00
Mike Jolley 79e89f6d44
Fix lost password page visibility when logged in (#49670)
* Split logged in/logged out views in my account rendering

* Redirect to edit account when using lost password when logged in

* changelog

* logout before running test

* esc_url_raw
2024-07-19 16:18:20 +01:00
Luigi Teschio fd5362218a
CYS: Fix tooltip overlap with pattern (#49700)
* CYS: Fix tooltip overlap with pattern

* 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>
2024-07-19 12:52:26 +00:00
Luigi Teschio 8313050d37
CYS: Remove not necessary placeholder on homepage sidebar (#49705)
* CYS: Remove not necessary placeholder on homepage sidebar

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-19 12:26:24 +00:00
Vladimir Reznichenko c4584bd6df
Monorepo: zips build script update (frozen lock files) (#49640) 2024-07-19 13:07:48 +02:00
Vladimir Reznichenko 83e7730f95
Tests: skip a flaky test (test_get_reports_with_orphaned_refund). (#49711) 2024-07-19 13:04:11 +02:00
Niels Lange 2baa82b750
Spacing adjustments for coupon code in the Cart and Checkout blocks (#49603)
* Spacing adjustments for coupon code

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-19 12:47:17 +02:00
Luigi Teschio 86ec35c599
CYS: Fix button background on Featured Category Cover image (#49659)
* CYS: Fix button background on Featured Category Cover image

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

* improve logic to handle multiple patterns

* improve implementation

* fix color on WordPress 6.5

* remove not used import£

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-19 10:15:10 +00:00
Bart Kalisz 800cf7e9ed
Blocks E2E: Fix DB snapshot removal step in setup script (#49677) 2024-07-19 12:02:56 +02:00
Chris Lilitsas 67d360a4ae
[Product Collection] Flatten query telemetry data to JSON-encoded string for proper data handling (#49680)
* flatten filters

* Add changelog
2024-07-19 11:58:48 +03:00
Adrian Moldovan a5a5c0503f
[testing workflows] Add new workflow to trigger any jobs in ci.yml on demand (#49674) 2024-07-19 10:14:12 +02:00
Adrian Moldovan 4534829ecd
[e2e tests] Fix tests for WP 6.6 (#49634) 2024-07-19 08:12:02 +00:00
Jorge M 0240a50ec0
Fix Tax Report Pagination (#49562)
* Parse limits and offsets

* Remove unsused variable

* Add tests for pagination

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

* Add missing doc

* Use get_sql_clause limit

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-19 10:08:02 +02:00
Luigi Teschio 1a7619a4fa
CYS: show logo when the header is updated (#49681)
* CYS: show logo when the header is updated

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-19 10:03:56 +02:00
Thilina Pituwala d0bd9f193a
Add UTM parameters to links in subscription renewal notices (#49645)
* Fix typo.

* Update UTM parameters of the PU renewal link on settings page and in-app my subscriptions tab.

* Update the UTM parameters of the PU renewal link on plugins page.

* Update link with UTM params when multiple subscriptions are expiring.

* Fix campaign name.

* Add UTM params to WC Settings PU renewal links.

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

* Fix campaign name.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-19 09:52:42 +02:00
Vladimir Reznichenko 46f952eeb5
Monorepo: enable babel-loader and Jest caching (inc. CI) (#49656)
In this PR, we are consolidating babel-loader caching and adding Jest caching, improving build/testing times locally and in CI. The improvement comes from cache covering transpile steps in the mentioned processes.
2024-07-19 09:40:01 +02:00
Alba Rincón e865e1e4f2
Product rating - Inherit the color of the star when no ratings (#49678)
* Inherit the color of the star

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-19 09:23:24 +02:00
Prahesa Kusuma Setia c2bcb0b386
utm params for add payment method notice (#49621)
* add utm params for add payment method notice

* extract missing payment method notice data to different function

* rename utm params

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

* fix lint issue

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-19 12:44:39 +07:00
Alexandre Lara 12b701d35c
[Experimental] Product Filters Redesign: Move icons to @woocommerce/icons package (#49646)
* Move icons to @woocommerce/icons package

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-18 15:53:39 -03:00
Roy Ho 038ef3d751
[Experimental] Add Product filters overlay settings (#48732)
* Add overlay settings

* Tweak icon size slider

* Add overlay template part link

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

* Fix scss linting

* Fix php linting

* Remove preview

* Rename setting props to be more clear

* Remove unused import

* Update plugins/woocommerce-blocks/assets/js/blocks/product-filters/editor.scss

Co-authored-by: Tung Du <dinhtungdu@gmail.com>

* Update plugins/woocommerce-blocks/assets/js/blocks/product-filters/edit.tsx

Co-authored-by: Tung Du <dinhtungdu@gmail.com>

* Update plugins/woocommerce-blocks/assets/js/blocks/product-filters/types.ts

Co-authored-by: Tung Du <dinhtungdu@gmail.com>

* Update plugins/woocommerce-blocks/assets/js/blocks/product-filters/edit.tsx

Co-authored-by: Tung Du <dinhtungdu@gmail.com>

* Move experimental controls to last of list

* Improve typescript code

* Remove unneeded constructor code

* Extract icons into own component

* Moved overlay template part link to the bottom

* Add apply button

* Hide overlay settings when in always mode

* Remove overlay template part from list and put into general area

* Update api version to 3

* Update plugins/woocommerce-blocks/assets/js/icons/library/filter.tsx

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

* Update plugins/woocommerce-blocks/assets/js/icons/library/filter-three-lines.tsx

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

* Fix overlay button link style and clickable

* Remove edit overlay link from never mode

* Add e2e tests for the filters overlay settings

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2024-07-18 11:33:25 -07:00
Jorge A. Torres 0a651c41e6
Improve rendering of order list table on mobile (#49592)
* Include date/status in order number column for use on smaller screens

* Rework responsiveness of order list a bit

* Add changelog

* Adjust related E2E tests

---------

Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com>
2024-07-18 19:19:01 +01:00
Gabriel Manussakis 49db63ab3f
[Accessibility] Replace simple CSS red with an accessible red color (#48742)
* Replace red color with $red sass variable

* Add chegelog file

* Use CSS red variable instead of the SASS one
2024-07-18 18:18:10 +02:00
Luigi Teschio de4a8ffdd4
CYS: show default TT4 fonts pair (#49675)
* CYS: show default TT4 fonts pair

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-18 14:41:52 +00:00
Luigi Teschio bbed30ccdb
CYS: Fix no block placeholder style (#49673)
* CYS: Fix no block placeholder style

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-18 14:31:19 +00:00
Alba Rincón e067a11c5f
CYS - Fix spacing in patterns (#49669)
* CYS - Fix the column spacing for the "Four Image Grid Content Left" pattern

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

* Remove the dash in the testimonials single name

* Add spacing to the testimonial 3 col patterns

* Add spacers to pattern titles

* Remove symbol before customer names

* Fix chessboard spacing

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-18 16:17:33 +02:00
Bart Kalisz 720c1de6bf
Blocks E2E: Refactor Product Collection vs classic template test for stability (#49638) 2024-07-18 15:50:25 +02:00
Alba Rincón 7f797c041c
Replace the customer account line logo (#49666)
* Replace the customer account line logo

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-18 15:47:07 +02:00
Nathan Silveira f7153daa61
Prevent adding global_unique_id to old schema versions (#49472)
* Update changelog from PR that added new field to product lookup table

* Update db_version variable and use it to prevent adding global_unique_id when the lookup table was not yet updated

* Add woocommerce_schema_version to get_default_option_permissions

* Add changelog

* Remove schema version from default_option_permissions
2024-07-18 19:11:33 +05:30
Moon 5736b7a056
Add refresh & delete notification tools (#48961)
* Add Remote inbox notifications tools

* Add sanitize_text_field

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

* Update plugins/woocommerce/src/Admin/RemoteInboxNotifications/RemoteInboxNotificationsEngine.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-07-18 11:01:21 +02:00
Luigi Teschio 824bf8e218
CYS: fix drag to resize bar (#49657)
* CYS: fix drag to resize bar

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-18 10:57:17 +02:00
Ilyas Foo 91ce199bf7
Fix add product task to create products according to selected types (#49631)
* Fix add product task to create template first and simplify logic

* Changelog

* Lint
2024-07-18 15:27:25 +08:00
Corey McKrill 5ca3921c28
Add some robots.txt rules (#49432)
* Add some robots.txt rules

WooCommerce creates some subdirectories within the
WordPress uploads directory. This adds some rules
to the robots.txt file generated by WordPress that
tells bots not to index these subdirectories.

---------

Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2024-07-18 09:19:40 +02:00
Roy Ho 6216408511
Prevent individual filters from being able to drag outside of parent wrapper (#49606)
* Prevent individual filters from being able to drag outside of parent wrapper

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-17 13:30:59 -07:00
Gabriel Manussakis 74ee55d515
[Accessibility] Make the edit/delete actions of shipping/products accessible in manual orders (#48238)
Fixes #26875

* Add aria label to edit/delete shipping buttons

* Add aria label to edit/delete product item buttons

* Make edit/delete order items accessible via keyboard

* Add changelog file ralated to the fix of #26875 issue

* Init tiptip when adding shipping

* Remove unnecessary white space

* Add tooltips to buttons on the fee line

* Replace em unit with px
2024-07-17 10:33:25 -07:00
Miguel Pérez Pellicer a5c9db8fac
[WooCommerce Analytics] Add Guest label when no customer name (#49594)
* Show Guest when there is no Customer name

* Show Guest when there is no Customer name
2024-07-17 21:12:11 +04:00
Benjamin Conrad acea491755
Fix a bug where woocommerce removes the current-menu-item class (#45095)
* Fix a bug where woocommerce removes the current-menu-item class from a menu item (e.g. taxonomy) because its id matches with page_for_posts option

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

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

* Apply suggestions from code review

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2024-07-17 15:30:17 +00:00
Gabriel Manussakis ece00533e4
[Accessibility] Convert edit address link to a button (#49471)
* Update edit address button style

* Add input prop to the ValidatedTextInputHandle type

* Add optional isEditing prop to the AddressFormProps

* Convert edit address link to button

* Focus first input after opening the address form

* Pass along the editing prop to children components in the shipping address block

* Add changelog file

* Clear timeout used to delay the focus on the first input

* Adjust checkout toggler buttons for dark themes

* Get first address field by id
2024-07-17 16:54:41 +02:00
Luigi Teschio e16a866cc5
CYS: Fix E2E tests on WordPress 6.6 (#49632)
* CYS: Fix E2E tests on WordPress 6.6

* try now

* fix test

* try now

* fix tests

* run e2e tes against WordPress 6.5

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

* restore changes

* fix test

* run against WordPress 6.6

* restore changes

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-17 14:36:34 +00:00
Alexandre Lara 7dd0c1a055
[Experimental] Product Filters Redesign: Rename individual inner filter blocks to "Filter Options" (#49579)
* Rename blocks to "Filter Options"

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

* Add icon to Filter Options block

* Remove unused import

* Fix e2e tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-17 11:12:32 -03:00
Ramon Ahnert c16714c3c5
Allow receipt rendering template to be overridden (#48872) 2024-07-17 14:39:02 +01:00
Alba Rincón 16513b346a
CYS - Make the patterns content translatable (#49633)
* Make the patterns content translatable

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

* Remove json parsing

* Move dictionary to a class

* Fix lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-17 15:01:29 +02:00
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
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
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
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
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
Alba Rincón 6baddf6cd1
Update the `Customer Account` block icon for the line style (#49401)
* Update the customer icon for the line style

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

* Import Circle and Path and fix attribute case

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-15 08:53:47 +02:00
Paulo Arromba f3cafa2f17
Fix Store API response for very large price amounts (#49361)
* Fixed overflow when formatting price for Store API responses

* Added explanation comment.

* Added changelog.

* Linting.

* Ensure wc_format_decimal doesn't return decimal points and trims .00

* Update comment.

* Removed unnecessary rounding modes.

* Updated comment.

* Updated comment.

* Updated comment.

* Updated Unit Tests.

* Lint.

* Fix tests.

* Re-add rounding modes.

* Prevented a fatal if an array is supplied to the method. This was the old behaviour, although it will produce erroneous prices, but before we let this throw a fatal we need to warn devs and track usage.

* Added doing_it_wrong() for unexpected types for $value arg.

* Early return, removed translation, renamed unit test method.

* Added expect notice to unit test.

* Add further tests to rounding modes.

* Renamed $mock_formatter. This is not a mock.

* Fixed tests and added provider for types.

* Linting.
2024-07-15 02:03:33 +01:00
Sam Seay 9fa32b4f2b
Migrate StateInput, CountryInput and custom fields to native `<select>` (#48180) 2024-07-12 21:17:54 +00:00
Julia Amosova c31e274616
Update stable tag to 9.1.2 (#49501)
woorelease: Update stable tag to 9.1.2

Co-authored-by: Julia Amosova <juliaamosova@ultraw-mbp.mynetworksettings.com>
2024-07-12 15:57:38 -04:00
Néstor Soriano 0f2f331b90
Check if parent product exists when creating attribute lookup data for variations (#49474)
* Check if parent product exists in LookupDataStore::create_data_for_variation

If it doesn't exist it will thrown an exception, which will be
catched by the caller an a proper log entry will be written.
Previously a fatal error would be thrown.

* Add changelog file

Fixes #33730
2024-07-12 12:04:39 -07:00
Veljko V 4b58049979
Fix logo picker e2e tests with flaky wait for response (#49451)
* Fix flaky waiting for response in logo picker e2e test

* Add changelog

* Remove wait for response header

* Wait for success message

* Relogic logo picker e2e test
2024-07-12 11:31:55 -07:00
Corey McKrill aa1eae6c17
Docs: Updates to the Logging doc (#49430)
* Docs: Updates to the Logging doc

This tweaks the wording in a few places and adds
a new suggestion under the "Customizing" header
about changing the directory where log files are
stored.

* Update docs manifest
2024-07-12 11:11:08 -07:00
Naman Malhotra 43d9f10200
Update Action Scheduler to 3.8.1 (#49483) 2024-07-12 08:44:00 -07:00
Jorge A. Torres 79172bca82
Trigger doing_it_wrong for CPT order queries with HPOS query args (#47457)
* Trigger doing_it_wrong for CPT queries using HPOS-only args

* Add changelog
2024-07-12 16:06:14 +01:00
Miguel Pérez Pellicer f8f4cbf826
[WooCommerce Analytics] Adapt Order Report CSV Export structure to the one used in the client side. (#49356)
* Equalize data in Order export with data in Client side CSV export

* Add changelog

* USe Net total without format
2024-07-12 19:01:49 +04:00
Mike Jolley e0c62dce79
Extensibility: Format currency config so it can be consumed more easily (#48727)
* Export pre-formatted SITE_CURRENCY object from settings

* Fallback to SITE_CURRENCY

* Changelog

* Fix typedef

* Update mocks

* Inject site currency into cart preview data

* Update test

* Add currency formatting to preview data

* Mock currency in tests

* More currency mocking
2024-07-12 14:24:22 +01:00
Vlad Olaru 892c44a27a
Update APMs BNPL suggestions when WooPayments can handle them (#49234)
* Update BNPLs default payment gateway suggestions

* Update default payment gateway suggestions priorities

* docs: Fix return type

* Fix Affirm default payment gateway visibility rules

* refact: Introduce WCPay rules

* Add WCPay BNPL pseudo-gateway recommendation

* Replace deprecated prop

* Add WCPay BNPL suggestion component

* Remove short array syntax

* Add svg for default WCPay BNPL suggestion

* Update Payment Gateway Suggestions with WCPay BNPL

* test: Update Payment Gateway Suggestions tests

* Add changelog

* Remove needles rule for payment gateways suggestion

* test: Fix payment gateways suggestions test

* Only hide Klarna if in a WooPayments eligible country

* MX is not a WooPayments-eligible country

* Make sure we don't inadvertently promote WCPay BNPL to non-eligible countries

* Lint fixes

* Escape default payment gateway suggestions translatable strings

* Revert translatable strings escaping as it has too many implications

* Revert char change to avoid invalidating translations

* Lint fixes
2024-07-12 12:40:24 +03:00
Alba Rincón 45486bc1c7
CYS - Update the full composability layout to match designs (#49303)
* Update the full composability layout to match designs

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

* Fix lint errors

* Remove unnecessary important

* Update colors

* Fix empty logo color

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-12 09:53:10 +02:00
Alba Rincón 0d76b21f39
CYS - Fix marking the CYS task as completed only by accessing the Intro page (#49374)
* Improve the conditions to check if the customize store task should be marked as completed

Before we were relying in a json string to check if the global styles were the default,
but that string had a hardcoded version. Since the version has changed this was failing.
We are now checking that the global style json only has two keys: version and
isGlobalStylesUserThemeJSON, regardless of their values.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-12 09:52:23 +02:00
RJ b6ed6223bd
fix: LYS success page overflows (#49127)
* fix: LYS success page overflows

* css

* Update plugins/woocommerce-admin/client/launch-your-store/hub/styles.scss

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

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-07-12 14:12:45 +08:00
Vladimir Reznichenko 4ce23d5343
Monorepo: fix linting script (side-effects from enabling strict mode earlier (#49436) 2024-07-12 07:49:07 +02:00
Sam Seay e59decd222
Clean up unused files and dependencies from when WooCommerce Blocks was merged into the monorepo (#49319) 2024-07-12 16:40:07 +12:00
Julia Amosova 35a0ee2e8a
Update stable tag to 9.1.1 (#49429)
woorelease: Update stable tag to 9.1.1

Co-authored-by: Julia Amosova <juliaamosova@ultraw-mbp.mynetworksettings.com>
2024-07-11 18:31:47 -04:00
Ivan Stojadinov 9e3eb2d024
[e2e] Add support for WPCOM site (#49403)
* Add support for WPCOM site

* Add support for WPCOM site

* Change the default Pressable site

* Change the default Pressable site

* Add .env.enc for WPCOM site

* Add .env.enc for WPCOM site #2

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

* Update changelog

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

* Update changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-07-11 23:37:10 +03:00
Adrian Moldovan 7e86b23761
[blocks e2e] Update config for retries and trace retention (#49416)
* Update config for retries and trace retention

* Add changelog

* Update maxFailures
2024-07-11 11:14:14 -07:00
github-actions[bot] cb85e9265f
Delete changelog files based on PR 49404 (#49422)
Delete changelog files for 49404

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-07-11 13:37:54 -04:00
Corey McKrill 4d68cd486e
PluginUtil: Add method to get active valid plugins (#48709)
* PluginUtil: Add method to get active valid plugins

When getting a list of active plugins directly from the options table,
you can run into an error if you try to then access one of the plugin
files if it doesn't actually exist. WP Core has a method that verifies
that the files exist before returning the list. But it's marked as a
"private" method, which means it could change and break backcompat.
That seems very unlikely, though, so we're using the method (it was
already in use actually), but putting in some safeguards so we can
detect if a backcompat issue arises.

Fixes #48132

* Modify to accommodate multisite
2024-07-11 18:18:33 +01:00
Niels Lange 79786c5443
Revert #46362 (#49404)
* Revert #46262

* Remove pnpm-lock.yaml

* Revert "Remove pnpm-lock.yaml"

This reverts commit df4b87940d.

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

* Revert pnpm-lock.yaml

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-11 19:00:49 +02:00
Jorge A. Torres aeab61838c
Change case for CLIRunner namespace to meet autoloader expectations (#49390)
* Correct case in `CLIRunner` namespace

* Rename a few `@packages`

* Add changelog
2024-07-11 09:54:27 -07:00
Jorge A. Torres 21cc919094
Return HTTP 404 in REST API for non-existent product reviews (#48726)
* Return HTTP 404 when accessing non-existent product views via REST API

* Fix unit tests

* Add changelog

* Address feedback
2024-07-11 16:30:20 +01:00
Albert Juhé Lluveras ec95afc178
Fix sidebar attribute control in Products by Attribute block (#49351)
* Fix sidebar attribute control in Products by Attribute block

* Add changelog file

* Linting
2024-07-11 15:52:57 +02:00
Adrian Moldovan 3ff155182e
Fix Blocks e2e environment setup in release checks (#49379) 2024-07-11 15:45:30 +03:00
Vladimir Reznichenko 9fef18cd0d
CI: missing jobs on changes in components package. (#49330)
This PR addresses issues in building a CI jobs matrix (resolving dependent packages and running CI jobs for them).
2024-07-11 14:36:56 +02:00
Veljko V e049d93681
Fix flaky e2e merchant tests (#49381) 2024-07-11 15:31:57 +03:00
Mike Jolley d18a722501
Store API: Reduced number of recalculations on Store API cart routes (#48944)
* woocommerce_removed_coupon event should recalculate totals automatically

* Remove early calculation from cart routes

* get_cart_for_response ensures late calculation if needed

* Remove calculation when removing coupons

* Calc totals already does shipping

* Remove calc on checkout route

* Update cart controller to load session if needed and introduce new helper methods

* Changelog
2024-07-11 13:12:51 +01:00
Tung Du 6d6271260d
E2E: Fix flaky CYS logo picker tests (#49364)
* test: fix flaky cys logo picker e2e tests

* chore: changelog

* try: unfocus the input

* fix: use toHaveCSS to leverage auto waiting

* fix: duplicated Promise

* fix: blur is unnecessary
2024-07-11 14:04:37 +02:00
nigeljamesstevenson da4de031f0
Update stable tag to 9.1.0 (#49383)
Update readme.txt
2024-07-11 12:32:00 +01:00
Vladimir Reznichenko f8c0e6e02f
E2E: enable reporting slow blocks test. (#49367) 2024-07-11 12:21:59 +02:00
rodelgc ab21f5981f
Delete changelog file from #49370 (#49378) 2024-07-11 18:18:42 +08:00
Ivan Stojadinov 236fe48f97
Cherry-pick #303 into trunk (#49373)
* Improve mu-compatibility of `WC_Customer_Data_Store::get_last_order()`.

* Use the blog prefix as a suffix rather than a prefix (readability).

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>

* Extract site-specific user meta handlers into their own set of reusable methods.

* Make the customer data store's get_order_count and get_total_spent methods network-aware.

* Support deletion of site-specific user meta.

* Update cache invalidation (make multisite-aware) for money spent, order count, and last order.

* Further fixes for mu-aware order and spend caching.

* Add migration to remove unneeded/unused user meta data.

* Revert change to handling of `paying_customer` user meta (out-of-scope for this fix).

* Be stricter when obtaining current blog prefix.

* Add missing `@since` tag to historic filter hook.

Archaeology: https://github.com/woocommerce/woocommerce/compare/4.9.0...4.9.1#diff-8dcda80485fb4b7bc3cb9544ecf4b73aa78dc448bc574b1e56271ee8b56e7189R330

* Ensure the 'last order ID' references an order that actually belongs to the current customer.

* Fix docblock.

* Add additional test to describe safeguards around fetching a customer order.

* Unset `$last_order_id` if the order is not of type `WC_Order`

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>

* Merge 9.1.0 update functions list.

* Logging best practices (do not translate).

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>

* Logging best practices (do not translate).

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>

---------

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-07-11 12:33:26 +03:00
Ivan Stojadinov fa693249db
Cherry-pick #331 into trunk (#49370)
* Wrap order note saving with wc_sanitize_textarea

* Add changelog

* Change note output to wp_kses with no allowed HTML

* Add totalsMock for order confirmation test

* Add Totals test

* Add classic checkout test to ensure notes are cleaned

* Change wp_kses_post to wp_kses for all order note usage

* wp_kses the order note before editing too

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2024-07-11 11:49:33 +03:00
Vladimir Reznichenko ba9f0a1625
Monorepo: set strict mode for WooCommerce plugin linting script. (#49366) 2024-07-11 09:18:23 +02:00
Néstor Soriano c4ddaef3bc
Optimize the method that gets the downloads count for a given download (#49008)
The old code was retrieving all the existing download entries from
the database and then counting them locally. Now a SQL COUNT query
is used instead.

---------

Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com>
2024-07-11 09:14:24 +02:00
Caleb Mazalevskis 2a90d1e06b
Fix typo (index.tsx) (#49233)
* Fix typo (index.tsx)

"Congratuations" -> "Congratulations"

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

---------

Co-authored-by: Paul Sealock <psealock@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-07-11 11:24:11 +08:00
Nathan Silveira c16b5e578b
Add new unique ID to the classic product form (#49312)
* Update wc_update_product_lookup_tables_column function

* Rename error message

* Create 'form-flex-box' class and increase icon size

* Persist global_unique_id for main product and variations

* Add global unique id field to main product

* Add global unique id field to variations

* Add changelog

* Update error message
2024-07-10 20:06:29 +00:00
Daniel W. Robert e0d6c981ea
CYS: Add `rel="noreferrer"` to External Fiverr Link (#49314)
* Add `rel="noreferrer"` to external link

This is a precautionary security measure to to prevent the new page
from accessing the original page’s `window` object.

See pb22l9-304-p2 (internal link) for additional context.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-10 15:41:48 -04:00
Jonathan Lane a50a2a95b0
Fix failing e2e tests on daily run (#49313)
* Fix inability to activate twentytwenty theme

* Fix linting error

* Fix command palette test

* Change locator for Gutenberg tests

* Revert locator — Gutenberg adds an iframe

* Use regex for command palette

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-07-10 13:26:08 -03:00
piinthecloud cae3937ee6
Revert move docs (#49354)
* revert moving docs to main folder ahead of issues with subcategories

* add changelog

* add changelog
2024-07-10 17:33:15 +02:00
piinthecloud ec82b3f08f
move checkout docs with front matter to main folder (#49186)
* move checkout docs with front matter to main folder

* add manifest

* add core changelog

* Remove emojis, unsupported links and table of contents

* pr comments

* update folder name and remove toc

* title fix

---------

Co-authored-by: Jacklyn Biggin <hi@jacklyn.dev>
2024-07-10 16:53:52 +02:00
Miguel Pérez Pellicer 39b8b23fc8
Fix order_count inconsistency between stats and reports (#49283)
* Fix order_count consistency between stats and reports

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-10 17:19:33 +04:00
Vladimir Reznichenko 4311640de2
Monorepo: caching deps per target package in GH actions (#49020)
In this PR, we are implementing per-package build and caching, which optimizes build and fetching cached dependencies times across our workflows.
2024-07-10 14:39:49 +02:00
Néstor Soriano f1399c9d77
Fix the namespace of the RestApiControllerBase class (#49333)
* Fix the namespace of the RestApiControllerBase class

* Add changelog file
2024-07-10 13:10:03 +01:00
Sam Seay eaf57e9f15
Create a separate bundle for cart and checkout (#48010) 2024-07-10 21:23:17 +12:00
Adrian Moldovan a862dab4f7
Disable Metrics job in CI (#49328) 2024-07-10 11:12:23 +03:00
Alba Rincón fb421397be
CYS - Bring back footer and header borders on hover and selected patterns (#49299)
* Bring back footer and header borders on hover and selected patterns

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

* Fix the selected pattern color

* Fix lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-10 09:14:23 +02:00
Alba Rincón 620fd4efed
CYS - Update delete button copy to `Delete` (#49295)
* Update delete button copy to match Dotcom

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-10 09:13:55 +02:00