Commit Graph

65797 Commits

Author SHA1 Message Date
Thomas Roberts 4861ec250e
Ensure local state is not overwritten by server when using `extensionCartUpdate` (#49311)
* Update ExtensionCartUpdateArgs to allow overwriting dirty data

* Set isCustomerDataDirty when updating billing/shipping addresses

* Update docs

* Add e2e test to ensure overwriting dirty state isn't possible

* Organise tests better and add check pushed data isn't overwritten

* Check if data is changing when updating shipping/billing addresses

* Check input values in test

* Add test to ensure data can still be overwritten by extensions

* Add changelog

* Fix lint errors

* Remove rogue console log

* Remove unused import

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

* Fix lint error

* Remove unneeded mdlint ignore

* Update test to select a value instead of fill

* Add methods to get/set dirty customer data in local storage

* Push all customer data, not just dirty fields

* Update e2e test

* Update push changes unit test

* Update keys in mock expected arg

* Align localstorage key name with Gutenberg uppercase style

* Fix lost code after merge conflict

* Remove unnecessary metadata set in reducer

* Reimplement TS changes

* Debounce writing to localStorage

* Only update localStorage if billing/shipping changed

* Remove localStorage key when checkout is complete

* Remove unused import
2024-11-07 18:18:57 +01:00
Alexandre Lara 7d5d032145
[Experimental] Product Filters Redesign > Clear Button: Make the block respect the filter settings (#52246)
* Remove clear button when setting is disabled

* Add clear button when setting is enabled

* Move logic to a React hook

* Fix error preventing clear button from being inserted after full page reload

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

* Add e2e test

* Fix ancestor

* Fix clear button settings for the Status filter

* Move hook to the root Product Filters folder

* refactor: divide the logic into multiple functions

* refactor: move util functions to their own files

* feat: add clear button hook to all individual filters

* test: add e2e test to the Product Filter Price block

* fix: block being created with the wrong default attributes

* fix: eslint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-11-07 12:51:50 -03:00
Tung Du 3aa1a7e651
[Experimental] Fix: removing active rating filter (#52605) 2024-11-07 17:08:30 +07:00
Wesley Rosa 6434a7ad1d
Introducing internal order status constants (#52427)
* Introducing order status constants

* Replacing static calls

* Additional comment blocks

* Updating PHP docs

* Updating PHP docs

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

* Fix lint issues

* Fix lint issues

* Fix lint issues

* Removing unnecessary order statuses group constants + more documentation

* Including the 'new' status (legacy)

* Merge branch 'dev/introducing-order-status-constants' of https://github.com/woocommerce/woocommerce into dev/introducing-order-status-constants

* Moving statuses to a new enum class

* Fix CS issues

* Fix lint issues

* Minor doc improvement

* Changing namespace to make it less granular

* Adding missing documentation for existing filters

* Update plugins/woocommerce/src/Enums/OrderStatus.php

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

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

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

* Update plugins/woocommerce/src/Enums/OrderStatus.php

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

* Making the order status class final

* Adding missing filter comments

* Moving conditional filter back to if statement

* Merge branch 'dev/introducing-order-status-constants' of https://github.com/woocommerce/woocommerce into dev/introducing-order-status-constants

* Adding 'since' annotation to fix lint errors

* Adding 'since' annotation to fix lint errors

* Introducing order legacy status constants

* Removing unnecessary status

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

* Renaming legacy status class to internal status

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Co-authored-by: Vladimir Reznichenko <kalessil@gmail.com>
2024-11-07 09:00:24 +01:00
Sam Seay 30cc92fddc
Checkout: Add updated shipping method notice. (#52603) 2024-11-07 18:33:13 +13:00
Chi-Hsuan Huang 6425b72382
[Beta tester] Update "Reset Onboarding Wizard" tool to reset additional options (#52606) 2024-11-07 03:50:14 +00:00
Chi-Hsuan Huang 6d065ef4c4
Add global prop to Tracks events for user role (#52533) 2024-11-07 11:12:23 +08:00
Paul Sealock 5ba9d8027d
[Settings] Add layout areas and styles (#52501) 2024-11-07 10:47:44 +13:00
Luigi Teschio ed4670243b
Add To Cart With Options - Stepper layout: implement feature under feature flag (#52573)
* Add To Cart With Options - Stepper layout: implement feature under feature flag

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

* fix E2E tests

* fix E2E test

* fix E2E test

* use setFeatureFlag across e2e test suite

* use the right feature flag

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-11-06 20:56:13 +01:00
Albert Juhé Lluveras 94d6c7a9ec
CYS: stop using __experimental_get_template_for_link() function (#52623)
* Remove unnecessary React Fragments

* CYS: Migrate from __experimentalGetTemplateForLink() to getDefaultTemplateId()

* Add changelog file

* Remove changes that cleaned up AI flow logic

* Linting
2024-11-06 18:57:14 +01:00
Karol Manijak ca7fe4e576
Patterns: Remove "Product Hero 2 Column 2 Row" from Patterns Dictionary (#52624)
* Remove broken pattern from PatternsDictionanry

* Add changelog
2024-11-06 18:07:27 +01:00
Vladimir Reznichenko fb569c66e1
[dev] CI: drop mirrors.yml workflow. (#52613)
Drop mirrors.yml workflow from GitHub actions, passing but trying to update a non-existent production repository. The production repositories project is on hold, and we can restore the workflow if the project gets traction.
2024-11-06 15:00:54 +01:00
Mike Jolley 7eabbe4ecd
Consistent payment and shipping options empty states (#52192)
* Remove inspector notice

* Replace placeholder with generic version

* Implement new placeholder

* Fix shipping method count so it excludes rows which do not link to installed payment method

* changelog

* Set default so tests pass

* unused vars

* unused import

* Remove return type and fix import warnings
2024-11-06 12:50:50 +00:00
Mike Jolley 71f28210f6
Cart Block: Refactor shipping totals. Separate cart and checkout logic. More clearly distinguish between Collection and Delivery (#52546)
* Refactor shipping totals section

From https://github.com/woocommerce/woocommerce/pull/52313/files

* style

* changelog

* More specific imports
2024-11-06 12:29:15 +00:00
Adrian Moldovan 08dbc3b7de
[e2e tests] Remove check for http reponse when visiting the editor (#52577) 2024-11-06 11:22:18 +00:00
Vladimir Reznichenko 6dab688054
[dev] CI: bump actions/download-artifact and actions/upload-artifact actions version to v4. (#52611) 2024-11-06 10:30:56 +01:00
Damián Suárez a1af0608b7
Fix visual issue in the Display Style of the Product Categories List block (#52609)
* export ProductCategoriesEdit default component

* disable importing experimental TS warnings

* set ToggleGroupControl instance like a block

* changelog
2024-11-06 09:25:30 +00:00
Corey McKrill de369bd09d
Add card last 4 to order totals payment method row (#52474)
* Add card last 4 to order totals payment method row

* Add changelog file

* Only append when last4 actually contains a string

---------

Co-authored-by: Alba Rincón <albarin@users.noreply.github.com>
2024-11-06 09:29:22 +01:00
Albert Juhé Lluveras b887f9b51e
Update CYS class names to avoid conflicts with future updates of Gutenberg or WordPress (#52426)
* Create files with Gutenberg CSS code

* Prefix .edit-site class names with .woocommerce

* Add changelog file

* Fixes and linting

* Minor CSS fixes after merging Gutenberg stylesheets
2024-11-06 08:55:58 +01:00
Sam Seay fb7dfa2792
[Experimental] Allow disabling product descriptions in the order summary. (#52503) 2024-11-06 17:47:54 +13:00
Tung Du 4223bf28d8
[Experimental] Remove filter overlay blocks (#52599) 2024-11-06 11:32:33 +07:00
Tung Du 7c7895ade9
[Experimental] Rating filter: fix block focus and visibility (#52579) 2024-11-06 10:53:39 +07:00
Chi-Hsuan Huang f55759b892
Optimize `test_import_sample_products` unit test performance (#52523)
* Enhance onboarding tasks tests with fake image

* Remove @runTestsInSeparateProcesses

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

* Add doc

* Fix tests

* Remove echo

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-11-06 09:02:20 +08:00
Adrian Moldovan dbcd5f826e
[e2e tests] Update locator for block's font weight combobox - fix mini-cart tests for WP6.7 (#52581) 2024-11-06 00:29:21 +00:00
Alba Rincón a39445d691
Show the payment method as text if there's no `brand` or `last4` digits are present (#52578)
* Show the payment method as text if there's no brand or last4 digits

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-11-05 16:08:47 -08:00
Moon 58a59a04b9
Remove legacy coupon note (#52475)
* Remove CouponPageMoved note

* Stop displaying the legacy coupon menu for the newer versions

* Revert back should_display_legacy_menu logic change -- no need as we are not displaying the menu anymore

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-11-05 11:09:11 -08:00
And Finally 94c03c22c9
Run promotions WP Cron event twice daily (#51950)
* Changed cron event schedule to twice daily for greater freshness.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Herman <KokkieH@users.noreply.github.com>
2024-11-05 17:33:27 +00:00
Paulo Arromba 7fa8a8a5f0
Added wc_sanitize_phone_number() to remove invalid characters. (#52476)
* Added wc_sanitize_phone_number() to remove invalid characters.

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

* Added wc_sanitize_phone_number() to remove invalid characters.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-11-05 16:49:04 +00:00
Moon 9db02a248d
Fix the bug where CES requires a double-click on Give feedback (#52556)
* Update shown for action when the user navigates away to ensure we do not show the same notice again

* No need to call addActionToShownOption on dismiss since we are calling it on page change

* Use apiFetch to avoid re-render

* Use apiFetch from @wordpress/api-fetch

* Add changefile(s) from automation for the following project(s): @woocommerce/customer-effort-score

* Fix lint issue

* Fix lint issue

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-11-05 08:42:28 -08:00
Damián Suárez 6d74a1576f
[Experimental] Price Slider block: add colors panel (#52507)
* add color block attributes

* add constant to define the color attributes

* centralize Color type

* define color types

* use UpperCase for Edit component

* render colors panel. save color values in attrs

* add a doc about colors validation

* save CSS vars and classes in the block markup

* pick and apply colors to the styles

* update markup with block colors

* firx eslint issue

* changelog

* reset all colors properly

* 80 cols

* set Color type peroperties like optional

* apply color to slider background
2024-11-05 10:49:42 +00:00
Luigi Teschio 7ee8864a33
Add to Cart Form - Stepper Layout: Ensure Compliance with min, max, and step HTML Attributes (#52487)
* Add to Cart Form: Ensure Compliance with min, max, and step HTML Attributes

* add comment

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

* improve fallback value

* remove only

* add aria-label

* remove extra space

* Update plugins/woocommerce/changelog/52487-fix-add-to-cart-form-interactivity-api

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

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

* improve variable naming

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

* Merge branch 'trunk' of github.com:woocommerce/woocommerce into fix/add-to-cart-form-interactivity-api

* improve code style

* improve E2E tests

* improve fallback value

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2024-11-05 10:03:01 +01:00
Chi-Hsuan Huang 6dceb37611
Fix core profiler dropdown not closing when the arrow down icon is clicked (#52526)
* Disable pointer events for active select controls to allow dropdown closure by clicking the component

* Add changelog
2024-11-05 16:25:35 +08:00
Luigi Teschio b15b04620a
Add To Cart Form - Stepper Layout: remove flex (#52481)
* Add To Cart Form - Stepper Layout: remove flex

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-11-05 09:06:23 +01:00
Adrian Moldovan 85489b84d3
[e2e tests] Remove iterations for "Color palette should be applied" test (#52544) 2024-11-05 08:34:47 +01:00
Manish Menaria 21934d471b
Fix: Product collection inspector control showing empty section (#52543)
* Fix: Product collection inspector control showing empty section

Previously, the inspector controls were always rendering a PanelBody element even
when the collection type wasn't hand-picked, resulting in an empty section being
displayed. This change moves the PanelBody inside the conditional rendering so
it only appears when hand-picked products are being used.

Also adds missing placeholder text to the Hand-Picked products control to improve
user experience.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-11-05 12:59:17 +05:30
Wesley Rosa a5b95bacf1
Using order status constants in unit tests (#51920)
* Introducing order status constants

* Replacing static calls

* Using order status constants in unit tests

* Additional comment blocks

* Updating PHP docs

* Updating PHP docs

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

* Fix lint issues

* Fix lint issues

* Fix lint issues

* Removing unnecessary order statuses group constants + more documentation

* Including the 'new' status (legacy)

* Merge branch 'dev/introducing-order-status-constants' of https://github.com/woocommerce/woocommerce into dev/introducing-order-status-constants

* Moving statuses to a new enum class

* Fix CS issues

* Fix lint issues

* Minor doc improvement

* Changing namespace to make it less granular

* Adding missing documentation for existing filters

* Update plugins/woocommerce/src/Enums/OrderStatus.php

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

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

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

* Update plugins/woocommerce/src/Enums/OrderStatus.php

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

* Making the order status class final

* Adding missing filter comments

* Moving conditional filter back to if statement

* Merge branch 'dev/introducing-order-status-constants' of https://github.com/woocommerce/woocommerce into dev/introducing-order-status-constants

* Adding 'since' annotation to fix lint errors

* Adding 'since' annotation to fix lint errors

* Updating implementation with base branch

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

* Replacing full namespace with class import

* Fix classes still using the old constant format

* Revert use of draft order status

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Co-authored-by: Vladimir Reznichenko <kalessil@gmail.com>
2024-11-05 08:23:12 +01:00
Chi-Hsuan Huang 4c03ba8b60
Add coming soon newsletter feature flag (#52529)
* Add coming soon newsletter feature flag

* Add changelog

* Rename feature flag -> coming-soon-newsletter-template
2024-11-05 05:37:00 +00:00
Tung Du 22070a79ed
[Experimental] Expose filter params through block context (#52492) 2024-11-05 10:35:54 +07:00
RJ cb0d1b5020
fix: added noreferrer to printful link (#52524) 2024-11-05 11:13:20 +08:00
github-actions[bot] 243dde4e8a
Delete changelog files based on PR 52557 (#52563)
Delete changelog files for 52557

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-11-04 17:06:54 -08:00
Damián Suárez ed2f002f42
Remove duplicate TS definition for currency code (#52545)
* remove duplicate TS definition for currency code

* changelog
2024-11-04 16:59:10 -08:00
Barry Hughes d843637ce0
Do not listen to changes made through the Options API before init. (#52557)
* Do not listen to changes made through the Options API before init.

This specifically relates to the Features Controller, which currently loads a list of feature definitions (and that involves translating strings, which is not recommended before init). Since we do not expect features to be enabled/disabled this early, this should be a reasonable adjustment.

* Update plugins/woocommerce/src/Internal/Features/FeaturesController.php

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

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-11-04 16:51:45 -08:00
Emmanuel Ferdman e22c5baf8a
Update broken links (#52495)
* Update broken links

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>

* Update broken links

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>

* fix markdown errors

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>

* add changelog

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>

* Add manifest file

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>

---------

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2024-11-04 21:59:50 +00:00
github-actions[bot] 9b4f3a1eb3
Delete changelog files based on PR 52431 (#52542)
Delete changelog files for 52431

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-11-04 12:07:46 -08:00
Damián Suárez 5238d13632
Fix typo in useSetWraperVisibility function name (#52115)
* fix type in useSetWraperVisibility function name

* changelog
2024-11-04 19:21:34 +00:00
github-actions[bot] 8716143a77
Delete changelog files based on PR 52432 (#52539)
Delete changelog files for 52432

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-11-04 10:36:10 -08:00
Moon 7c3a4f729b
Fix CES style for WP 6.7 (#52499)
* Fix CES style for WP 6.7 -- there has been HTML structure change with a different class name

* Add changefile(s) from automation for the following project(s): @woocommerce/customer-effort-score

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-11-04 10:30:49 -08:00
Karol Manijak f5d9b3adaa
Hide AbstractProductGrid blocks from inserter (soft-deprecation) (#52209)
* Hide product grid blocks from inserter

* Expose collections in the inserter

* Arrange collections imports alphabetically and registering by usage

* Add new keywords to collections

* Update tests

* Update block references

* Add changelog

* Update docs manifest

* Fix typo in collection name in test

* MAke adjsutments and cleanup of collections keywords

* Add one more keyword

* Hide Related Products from inserter

* Replace legacy Related Products with collection when transforming classic template into block one

* Replace legacy Related Products with collection in blockified Single Product Template

* Update block references and doc manifest

* Update block references

* Update tests to reflect new collection names

* Bring back pnpm-lock to original state

* Update Related Products E2E tests

* Fix the last Related Products test

* Add default queryId to Related Products pattern

* Regenerate block references and docs manifest
2024-11-04 18:57:51 +01:00
Vladimir Reznichenko 02edbf101d
[dev] Monorepo: git-checkout tweaks in project-jobs. (#52534) 2024-11-04 12:28:37 +01:00
Karol Manijak a38a2052cb
[WordPress 6.7] Fix image aspect ratio in product grid blocks (#52431)
* Override user agent styling in Chrome

* Add changelog

* Change the approach

* Change the approach one more time
2024-11-04 11:38:46 +01:00