Commit Graph

63713 Commits

Author SHA1 Message Date
Tom Cafferkey f040e3acf7
Customer Account: Don't hook block unless filter is available. (#47171)
* Check WP version before adding Customer Account hooked block due to usage of hooked_block_{} filter

* Changelog

* Replace global  with get_bloginfo('version') for getting WP version
2024-05-07 09:46:22 +01:00
github-actions[bot] 9b042534d0
Prepare Packages for Release (#47208)
Automated change: Prep @woocommerce/dependency-extraction-webpack-plugin for release.

Co-authored-by: psealock <psealock@users.noreply.github.com>
2024-05-07 20:33:45 +12:00
Paul Sealock 3cab2e6909
Dependency Extraction Webpack - add @woocommerce/price-format (#47099)
* add package

* remove log

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

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-07 08:20:54 +03:00
Ilyas Foo 82795a220b
Remove `noindex` meta from coming soon pages (#47178)
* Remove noindex robot call for coming soon page

* Changelog
2024-05-07 10:01:45 +08:00
Chi-Hsuan Huang e8af1c2ce4
Display `Import Product` task item text and header copies when merchant indicates they are already selling (#47164)
* Update product task header texts

* Update product task item item text

* Add changelog
2024-05-07 09:28:48 +08:00
Sam Seay fbb553be0f
Update tsconfigs to explicitly include files to avoid TS build errors (#47156) 2024-05-07 13:18:56 +12:00
Fernando Marichal e5e78a33bf
Request tags only when we need them (#47068)
* Get Tags conditionally

* Create file types.ts

* Add changelog

* Fix tests
2024-05-06 15:54:18 -03:00
Maikel Perez b7e30ea5b3
Prevent non used blocks to be registered in the product editor page (#47066)
* Create a hook to filter the woocommerce blocks that can be registered.
This will decrease the server execution time, the amount of css and javascript downloaded.
In the case of the product editor the woocommerce blocks are non needed or required, so it's not necesary to register them all.

* Add changelog file

* Fix php linter errors
2024-05-06 14:29:26 -04:00
kkmuffme 6c3ace8a5d
Logging: prevent file logger from writing only an empty line to a file (#47091)
* Fix https://github.com/woocommerce/woocommerce/issues/47090

* Update plugins/woocommerce/src/Internal/Admin/Logging/FileV2/File.php

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

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

* Update plugins/woocommerce/src/Internal/Admin/Logging/FileV2/File.php

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

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-05-06 10:25:43 -07:00
Kathy dd6295bdb6
Catch NotFoundException before `woocommerce_get_batch_processor` (#46975)
* use container's has() method instead of try/catch block to define processor instance.

* Add changelog file

---------

Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
2024-05-07 00:09:06 +07:00
Matt Sherman 10a14bd179
Product Editor: Fix undo/redo in modal block editor (description field) (#47151)
* Set BlockEditorProvider's value to temporalBlocks

* Remove unnecessary code

* Set initial blocks in editor history, so that the first edit on an existing description can be undone

* Changelog
2024-05-06 12:53:44 -04:00
Maikel Perez 5916bacebd
Tax reports not showing correct totals (#46248)
* Get the tax_rate from the woocommerce_order_itemmeta table and country, state and priority from woocommerce_order_items

* Add changelog file

* Fix the resulting items when searching by specific tax rates

* Add some comments to clarify the fix

* Fix php linter errors

* Show modified tax rates and tax names as well as the deleted ones to better show the total calculations

* Fix php tests

* fix Lint issue

* update tests

* Fix some tests

* Add teardown

* Remove tests that were not relevant anymore

* Update teardown function

* Fix linter errors

* Update comment typos

Co-authored-by: Matt Sherman <matt.sherman@automattic.com>

---------

Co-authored-by: Damián Suárez <rdsuarez@gmail.com>
Co-authored-by: Lourens Schep <lourensschep@gmail.com>
Co-authored-by: Matt Sherman <matt.sherman@automattic.com>
2024-05-06 12:44:37 -04:00
Albert Juhé Lluveras 249f83ab8b
Replace div element with main in block templates (#47119)
* Replace div element with main in block templates

* Add changelog file
2024-05-06 16:14:16 +02:00
Damián Suárez 6a77c3458d
Product Block Editor: request initial linked-products request only when tab is selected (#47130)
* add optional isInSelectedTab context type

* clean type def

* only filter linked products when tab selected

* changelog
2024-05-06 14:07:30 +01:00
github-actions[bot] 8005781387
Delete changelog files based on PR 47005 (#47177)
Delete changelog files for 47005

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-06 13:26:48 +02:00
Albert Juhé Lluveras f2bb11ffc3
Update block templates documentation (#47110)
* Update block templates documentation

* Add changelog file

* Linting

* Replace 'the' with 'a' to improve understandability
2024-05-06 11:06:40 +02:00
Sam Seay a8be4f3330
Checkout: fix a bug where the local pickup / shipping buttons are rendered incorrectly in the editor (#47157) 2024-05-06 20:57:52 +12:00
Luigi Teschio 2d87573a76
Product Reviews: not use useBlockProps twice (#47136)
* Product Reviews: not use useBlockProps twice

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-06 10:13:53 +02:00
Ilyas Foo 067879263e
Fix GLA site verification with coming soon mode (#47140)
* Set homepage to return 200, add robots hook to ensure no indexing on coming soon pages

* Changelog

* Remove use of 503 status for coming soon
2024-05-06 12:09:32 +08:00
ianlv 6ff0463f24
chore: remove repetitive words (#47158)
* chore: remove repetitive words

Signed-off-by: ianlv <sunlvyun@outlook.com>

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

---------

Signed-off-by: ianlv <sunlvyun@outlook.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-05-06 03:43:39 +00:00
79mplus Admin d2e94e9da6
Add manual_update parameter to v3/orders/<id> endpoint (#46900)
* added a new parameter manual_update when updating order through WC REST API

* added the new parameter to the item schema

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

* Update unit test

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-05-03 17:35:29 -07:00
Corey McKrill 78a21956bb
REST API: Add standalone wc/v3/refunds endpoint (#46895)
* REST API: Add endpoint to get refunds directly

This makes it possible to request a list of refunds that are untethered
from their associated orders, with options to specify a date range
and/or a sort order.

Fixes #27568

* Add changelog file

* phpcs cleanup

* Add unit test

* More phpcs cleanup

* Add parent_id to response object

* Appease phpcs
2024-05-03 16:26:04 -07:00
Nathan Silveira 5fbd502a17
Enable inline actions in the variations table for images (#47065)
* Increment ProductVariationImage type

* Allow adding images to variations from the main product screen through a button

* Add changelog

* Add changelog

* Change showSuccess parameter to optional
2024-05-03 15:26:22 -03:00
Nathan Silveira 08508dfecc
Add 'placeholder' attribute to taxonomy block and add 'placeholder' a… (#46938)
* Add 'placeholder' attribute to taxonomy block and add 'placeholder' attribute to category field in Simple Product Template

* Only show placeholder when nothing is selected

* Remove suffix from function parameters

* Add changelog for component

* fix unit tests
2024-05-03 15:26:08 -03:00
Fernando Marichal 163e579ac6
Avoid requesting product with id -1 while loading (#46769)
* Avoid requesting product with id -1

* Add changelog

* Move changelog

* Add options to useEntityRecord type

* Fix editedRecord

* Add comment

* Undo early return

* Avoid making a request for product if it isn't already loaded

* Avoid making a request for product if it isn't already loaded

* Add typing for useEntityId

* Rework header to avoid requesting product unless we have a product ID

* Avoid requesting product when getting productTemplateId and blocks

* Remove unused import (fix lint error)

---------

Co-authored-by: Matt Sherman <matt@jam123.com>
2024-05-03 11:52:57 -04:00
Fernando Marichal e21a78f8f0
Request variations only when the product has variations (#46963)
* Make variations api request conditional

* Add changelog
2024-05-03 11:37:22 -04:00
Damián Suárez f0765081fe
Product Block Editor: move logic to add new attributes to modal component (#47058)
* rename TS prop name

* save unsaved change

* onChange() value is required

* continue `value` is required

* move logic to add new attribute to modal component

* polish process to add attribute

* rename function argument

* improve jsdoc

* remove unused getProductAttributeObject helper

* jsdoc

* changelog

* remove unused import

* remove obsolete tests

* fix eslint issues
2024-05-03 12:25:35 +01:00
Albert Juhé Lluveras 2adde79286
Update the version number of some methods in AbstractTemplateCompatibility (#47118)
* Update the version number of some methods in AbstractTemplateCompatibility

* Add changelog file
2024-05-03 13:14:18 +02:00
Luigi Teschio 420207a1d7
Migrate Jest Puppeteer E2E tests to Playwright (#46671)
* try db reset in page teardown

* move reset to setup step

* Use wp db cli

* Fix global setup
That part is overriding the logged in user state and wipes out the nonce and rootUrl fields.

* Try importing instead from a generated dump

* Revert "Try importing instead from a generated dump"

This reverts commit 987dc471c9.

* Revert "Revert "Try importing instead from a generated dump""

This reverts commit c8d008cb20.

* Don't bypass visitSiteEditor so that the Welcome Guide is closed

* use createNewPost

* Revert "Revert "Revert "Try importing instead from a generated dump"""

This reverts commit 2684273582.

* [Blocks]: Fix E2E tests (#46344)

* Load local pickup enabled setting as bool not string

* Add changelog

* Remove unused import

* Update plugins/woocommerce-blocks/assets/js/extensions/shipping-methods/pickup-location/utils.ts

Co-authored-by: Niels Lange <info@nielslange.de>

* Use strict equality test

* try now

* try now

* add a new sql file

* remove default.sql

* fix welcome guide tour

* fix E2E tests

* Fix the template revert tests
...where the template is unreachable due to pagination.

* Add changelog entry

* improve logic to closeWelcomeGuideModal

* fix cart checkout tests

* improve flakiness

* improve flakiness

* fix flaky test

* fix company field

* fix E2E test

* fix E2E tests

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Replace beforeAll w/ beforeEach + remove all after* hooks

* Fix broken hooks

* Activate plugins via requestUtils API

* [Blocks - E2E]: Add `playwright/no-hooks` ESlint rule (#46432)

add ESLint configuration

* Clean up console logs

* Remove obsolete language setup steps

* Remove more unnecessary setup steps

* Remove even more obsolete setup steps

* tmp: add the LYS fix

* Try stabilizing the company field test

* Use canvas param instead of manually entering edit mode

* Remove double site editor redirect

* Revert "Use canvas param instead of manually entering edit mode"

This reverts commit 5e6cc17154.

* Revert "Remove double site editor redirect"

This reverts commit 69a57a82a8.

* Fix flaky products sorting test

* Blocks: Fix ESLint errors (#46595)

fix eslint error

* Fix ESLint errors (#46626)

* Fix ESLint errors

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

---------

Co-authored-by: github-actions <github-actions@github.com>

* Blocks: Migrate multiple tests to Playwright

* fix path

* migrate other tests

* add product best sellers E2E tests

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

* migrate jest-puppetter E2E tests to Playwright

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

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

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

* Remove obsolete waitForLoadState call

* improve E2E tests

* fix E2E tests

* improve E2E tests

* remove old test

* remove not necessary test

* fix number product

* fix E2E test

* fix number of products

* fix product count

* refactor store notice E2E tests

* update string

* fix E2E test

* fix E2E tests

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
2024-05-03 13:02:37 +02:00
Vishnu Gopal d81f49a046
Fix plugin registration on woocommerce.com for active plugins (#46780) 2024-05-03 17:43:39 +07:00
Albert Juhé Lluveras b0ab7ba213
Fix Merchant → Mini Cart in FSE editor can only be inserted once test (#47134)
* Fix Merchant → Mini Cart in FSE editor can only be inserted once test

* Add changelog file
2024-05-03 11:58:53 +02:00
Luigi Teschio e750b0ff3a
Product Details: not use `useBlockProps` twice (#46785)
* Product Details: not use  twice

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-03 10:21:06 +02:00
Sam Seay 3a5721c0d8
Replace @wordpress/components Button, Radio, RadioGroup with Ariakit Button (#45974) 2024-05-03 15:28:39 +12:00
Ilyas Foo 24348366b4
Fix missing shipping recommendation task (#47117)
* Add secret tasklist to exception for hidden list in tasklist API

* Changelog

* Lint
2024-05-03 11:06:33 +08:00
Khokan Sardar 51c629dee4
Fix extra /wp-admin from action url link for ticket 46993 (#47010)
* Fix extra /wp-admin from action url link for ticket 46993

* Fix extra /wp-admin from task LaunchYourStore get action url

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-03 10:46:57 +08:00
Naman Malhotra 1ba1e91a7e
HPOS - Made the query for retrieving meta keys more performant (#46985)
* Modified query for fetching meta key, making it more perfomant

* added changelog

* Improved query when include_private is true

* Address review feedback

* Address review feedback
2024-05-02 16:24:10 +01:00
Niels Lange 6066c082b0
Relocate helper (child) themes (#47080)
* Relocate helper (child) themes

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

* Correct wrong template slugs

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-02 21:23:52 +07:00
nigeljamesstevenson 296c0cfb23
Update to display full woocommerce version on status page rather than a shortened milestone style version (#46906)
* update to display actual woocommerce version on status page

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-02 14:44:21 +01:00
Moon f5d386f093
Remove wc_update_890_add_launch_your_store_tour_option (#47005)
* Remove wc_update_890_add_launch_your_store_tour_option

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-02 06:33:32 -07:00
Naman Malhotra 2b4b8be4e6
Improved readability and better UX for GitHub bug reports, by optimizing the format of the SSR (#47088)
* Improved readability and better UX for GitHub bug reports, by optimising the format of the SSR

* Added changelog
2024-05-02 18:26:37 +07:00
Gan Eng Chin 48f479fd67
Rename and sort filter options in "Add a filter" in Analytics (#46955)
* Rename filter options in Orders Analytics.

* Sort filter options in labels in Orders Analytics.

* Change filter labels to singular.

* Wider label column to accommodate label change.

* Rename filter options in Variations Analytics.

* Change filter options to Attribute, Category and Product in Variations Analytics.

* Revert "Change filter options to Attribute, Category and Product in Variations Analytics."

This reverts commit b3ca5d5807.

* Change "Add a Filter" to "Add a filter".

* Add changelog.

* Add changelog.

* Refactor getAvailableFilterKeys and getAvailableFilters into one function.

* Add code comment and remove unneeded code.

* Code refactor getAvailableFilters.

This is done by starting from allFilterKeys, and filtering with allowMultiple or not yet active.

With this, we don't need to have `inactiveFilterKeys` and "Ensure filters that allow multiples are always present."

* Fix tests and lint issues.

* Simplify code with Object.entries.
2024-05-02 18:34:17 +08:00
Chi-Hsuan Huang 36b3712860
[Launch Your Store] Remove "Powered by WooCommerce" footer (#47075)
* Remove unnecessary powered by WooCommerce link

* Add changelog
2024-05-02 16:52:06 +08:00
Luigi Teschio bbcc73ebeb
Migrate Jest Puppeteer E2E tests to Playwright (#46644)
* try db reset in page teardown

* move reset to setup step

* Use wp db cli

* Fix global setup
That part is overriding the logged in user state and wipes out the nonce and rootUrl fields.

* Try importing instead from a generated dump

* Revert "Try importing instead from a generated dump"

This reverts commit 987dc471c9.

* Revert "Revert "Try importing instead from a generated dump""

This reverts commit c8d008cb20.

* Don't bypass visitSiteEditor so that the Welcome Guide is closed

* use createNewPost

* Revert "Revert "Revert "Try importing instead from a generated dump"""

This reverts commit 2684273582.

* [Blocks]: Fix E2E tests (#46344)

* Load local pickup enabled setting as bool not string

* Add changelog

* Remove unused import

* Update plugins/woocommerce-blocks/assets/js/extensions/shipping-methods/pickup-location/utils.ts

Co-authored-by: Niels Lange <info@nielslange.de>

* Use strict equality test

* try now

* try now

* add a new sql file

* remove default.sql

* fix welcome guide tour

* fix E2E tests

* Fix the template revert tests
...where the template is unreachable due to pagination.

* Add changelog entry

* improve logic to closeWelcomeGuideModal

* fix cart checkout tests

* improve flakiness

* improve flakiness

* fix flaky test

* fix company field

* fix E2E test

* fix E2E tests

---------

Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Replace beforeAll w/ beforeEach + remove all after* hooks

* Fix broken hooks

* Activate plugins via requestUtils API

* [Blocks - E2E]: Add `playwright/no-hooks` ESlint rule (#46432)

add ESLint configuration

* Clean up console logs

* Remove obsolete language setup steps

* Remove more unnecessary setup steps

* Remove even more obsolete setup steps

* tmp: add the LYS fix

* Try stabilizing the company field test

* Use canvas param instead of manually entering edit mode

* Remove double site editor redirect

* Revert "Use canvas param instead of manually entering edit mode"

This reverts commit 5e6cc17154.

* Revert "Remove double site editor redirect"

This reverts commit 69a57a82a8.

* Fix flaky products sorting test

* Blocks: Fix ESLint errors (#46595)

fix eslint error

* Fix ESLint errors (#46626)

* Fix ESLint errors

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

---------

Co-authored-by: github-actions <github-actions@github.com>

* Blocks: Migrate multiple tests to Playwright

* fix path

* migrate other tests

* add product best sellers E2E tests

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

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

* Remove obsolete waitForLoadState call

* improve E2E tests

* fix E2E tests

* fix E2E test

* remove not necessary changelog

* improve E2E tests

* remove not necessary folder

* fix test

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
2024-05-02 10:36:51 +02:00
Chi-Hsuan Huang 75bb52c310
Fix core profiler email field overlapping with continue button in mobile screen (#47077)
* Fix core profiler email field is not positioned correctly in mobile screens

* Add changelog
2024-05-02 16:09:58 +08:00
Chi-Hsuan Huang 1e2133e78c
[Launch Your Store] Fix failed to load coming-soon resources (#47073)
* Fix failed to load coming soon css/js

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

* Update plugins/woocommerce/src/Blocks/BlockTypes/ComingSoon.php

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-05-02 14:41:36 +08:00
Adrian Moldovan de91a0881d
[ci-jobs] Add support for github event and include HPOS disabled e2e tests in ci (#46922)
* Update env setup script to disable hpos

* Use DISABLE_HPOS instead of ENABLE_HPOS

* Log HPOS state

* Configure project for core e2e with HPOS disabled

* Add event argument for ci-jobs util

* Add event option for test jobs

* Add support for github events

* Add changelog

* Configure HPOS tests to run on pull_request

* Fix utils tests for undefined commandVars

* Added some tests for the event configuration

* Revert event for HPOS e2e to push

* Use matrix name in artifact name to avoid duplication

* Test with pull_request event

* Use job-index for unique artifacts names

* Revert event for HPOS e2e to push

* Add api tests for HPOS disabled

* Use unique artifact name for api tests

* Revert event for HPOS disabled api tests to push

* Rebuild monorepo utils to fix a merge conflict

* Updated wording
2024-05-01 10:36:24 -07:00
jonathansadowski 96a8cd472b
Update package release readme with note about post-publish delay (#47097)
Add note about delay between release and update
2024-05-01 09:48:14 -07:00
github-actions[bot] 05e166e0f1
Prepare Packages for Release (#46977)
Automated change: Prep @woocommerce/onboarding for release.

Co-authored-by: rrennick <rrennick@users.noreply.github.com>
2024-05-01 11:22:50 -05:00
github-actions[bot] ad2b170f1d
Prepare Packages for Release (#46976)
* Automated change: Prep @woocommerce/components for release.

* fix changelog linting

---------

Co-authored-by: rrennick <rrennick@users.noreply.github.com>
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-05-01 11:21:29 -05:00
github-actions[bot] 8aed7ccecf
Delete changelog files based on PR 46935 (#47082)
Delete changelog files for 46935

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-01 11:19:39 +01:00