Commit Graph

21023 Commits

Author SHA1 Message Date
Barry Hughes 660b2bcb6d
If the Legacy REST API plugin is auto-installed once, do not auto-install a second time. (#47563)
* If the Legacy REST API plugin is auto-installed once, do not auto-install a second time.

* Remove unused private constant (PluginInstaller records the info we need in a sitewide option).

* Introduce the woocommerce_history_of_autoinstalled_plugins option

This option holds the same data as woocommerce_autoinstalled_plugins,
the difference is that the data in this new option is never deleted.
It's also never updated, it just holds the information of the
first autoinstall for each plugin.

* Add a migration to create woocommerce_history_of_autoinstalled_plugins

* More robust check of previous autoinstall of the plugin

* Change migration to run in 8.9.1 instead of 9.0.0

---------

Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
2024-05-20 18:59:03 +05:30
Yan Sern caf1ee325b
Entrepreneur Signup: Hide site title when entering from Entrepreneur signup flow. (#47581)
* Hide site title when entering from entrepreneur signup.

* Add changelog.
2024-05-20 13:04:13 +02:00
Yan Sern ce42e92a80
Entrepreneur Signup: Hide progress bar when entering Design With AI from Entrepreneur signup flow. (#47574)
* Hide progess bar when entering Design With AI from entrepreneur signup flow.

* Add changelog.
2024-05-20 13:04:06 +02:00
Ilyas Foo 815d23bf09
Add `Cardo` and `Inter` fonts to global styles via theme json filter (#47417)
* Add global style font filter to add Cardo and Inter fonts when not available

* Changelog
2024-05-20 16:44:35 +08:00
Corey McKrill ad6eea6e00
Add an array_sum utility method to enhance PHP 8.3+ compatibility (#47595)
* Add validation for array_sum in Orders v1 controller

* Add an array_sum method to NumberUtil

* Update orders controller to use NumberUtil's array_sum

* Add NumberUtil array_sum to order item classes
2024-05-20 10:10:19 +02:00
Jonathan Lane 4d7a691953
Fix two flaky e2e tests (#47562)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-05-20 10:50:34 +03:00
Manzur Ahammed 7312f137d4
Display a notice for expired/expiring subscriptions along with a plugin update message. (#47076)
* add subscription expiry message on plugin list

* Update changelog

* fix lint

* refactor code

* update product price meta

* add tracks event for enable autorenew and renew subscription notices in plugin lists

* fix lint error

* check product price is set or not

* check product price is set or not

* added translator comment

* fix typo

---------

Co-authored-by: prahesa.setia <prahesa.kusuma.setia@automattic.com>
2024-05-20 03:06:03 +00:00
Sam Seay 8538ca3498
Make sure JS tests run in blocks when configs change (#47513) 2024-05-19 18:57:55 +12:00
Karol Manijak 96d951930c
Sync package.json and pnpm-lock.yaml (#47575)
* Add changes added automatically by install/postinstall

* Add changelog
2024-05-17 15:44:58 +02:00
Thilina Pituwala 52fef2c0c5
Remove old in-app marketplace pages and redirect to new in-app section (#47276)
* Remove the view file rendering old market-place page.

* Remove the function for rendering old market-place pages and introduce redirects to new in-app market-place.

* Remove unused code related to legacy market-place.

* Add exit after redirect.

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

* Redirect to search result page when a search term exists.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-17 20:19:11 +07:00
Dan Q edc22bca24
Add "Shared with you" badge to Extensions > My Subscriptions list as applicable (#46229)
* Add 'shared with you' badge

* Improve spacing where multiple badges span multiple lines

* Decrease font size of badges per new designs

* Include 'Manage on Woo.com' only for non-shared subscriptions

* Made TypeScript happier

* Add 'shared with you' badge

* Improve spacing where multiple badges span multiple lines

* Decrease font size of badges per new designs

* Include 'Manage on Woo.com' only for non-shared subscriptions

* Made TypeScript happier

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

* Addressing linter errors.

* Allow unusually-long email addresses of sharers to wrap

* Switch wordWrap for overflowWrap

Modern browesers interpret the former as an alias of the latter, including allowing the use of 'anywhere'. But the current version of https://www.npmjs.com/package/csstype only recognises 'anywhere' as valid for overflowWrap. Switching it prevents compilation errors, still exhibits the correct behavior.

* Prettier linting

* Update plugins/woocommerce/changelog/46229-add-wccom19063-in-app-shared-by-badge

Co-authored-by: And Finally <andfinally@users.noreply.github.com>

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

* Use pointer as cursor for status popovers

* Don't focus-within the status badge popover on load (prevents ugly link focus issue)

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
2024-05-17 13:22:50 +01:00
Seghir Nadir 1ae7ca5179
Make checkout sidebar (order summary) sticky on desktop (#47376)
* Make sidebar sticky on desktop

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

* limit sidebar sticky to cart only

* add useless new line

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-17 13:13:01 +02:00
Karol Manijak 40b43e8d9c
Prevent collection different than Product Catalog from being filtered (#45820)
* Prevent collection different than Produyct Catalog from being filtered

* Adjust Product Filters tests

* Split taxonomies filter into seperate filter per taxonomy

* Add changelog

* Improve onDeselect function

* Update Product Filter test handlebars so they all use Product Collection that inherits query from template

* Set Product Collection to inherit query from template in PHP unit tests

* Remove unnecessary empty space

* Add changelog

* Update tests

* Fix lint

* Update Product Collection attributes in filter E2E handlebars

* Update the Product Filters testing pages title

* Satisfy TS by returning single React element rather than array of elements

* Revert some incorrect changes

* Cleanup after accidental incorrect merge

* Add template utils to dynamic contents util

* Fix Attribute Filter tests

* Cleanup Attribute tests, refactor and fix types

* Add product filter on top of attirbute filter in handlebars

* Fix lint

* Update Rating filter tests to use Product Archive template instead of post

* Update Rating Filter handlebars

* Update Stock filter tests to use Product Archive template instead of post

* Update Stock Filter handlebars

* Add more granular util to update Produyct Catalog based on handlebar template

* Use Product Catalog util and simplify test scenarios

* Unify handlebar templates

* Fix Product Collection attributes in Product Filter handlebar templates

* Revert temporary timeouts increase

* Remove unused types

* Cleanup types

* Cleanup types

* Lint fix

* Rename updateTemplatesContent to updateTemplateContents to better depict its purpose

* Fix types

* Rename updateProductCatalogContent to updateProductCatalogTemplate to better depict its purpose

* Allow for beforeAll and afterAll in PW tests

* Use beforeAll and afterAll instead of using fixture in active filters test

* Use beforeAll and afterAll instead of using fixture in attribute filters test

* Use beforeAll and afterAll instead of using fixture in price filters test

* Use beforeAll and afterAll instead of using fixture in rating filters test

* Use beforeAll and afterAll instead of using fixture in stock status filters test

* Get rid of updateProductCatalogTemplate util as it's too specific

* Extract some constants

* Remove unused file probably added here by accident

* Adjust Attribute Filter block tests to the new logic

* Merge fix

* Bring back necessary handlebars file

* Merge fix

* Merge fix

* Update beforeAll

* Avoid relying on product collection page object in before all

* Bring back the original order of tests

* Switch Filter by Attribute tests to handlebars

* Fix typo

* Update test to new circumstances

* Fix hooks usage
We no longer use hooks other than `beforeEach` since we're resetting the DB for each test (#46125). Using other hooks was not caught by the linter (on this PR) because I accidentally removed the no-hooks rule in #47228 and restored it just now in #47500. 😅

* Fix the test

* Fix Price filter test

* Update attribute filter tests

* Share the handlebars between tests

* Update price filter tests

* Update rating filter tests

* Update stock filter tests

* Remove unnecessary product collection page object from filter tests

* Fix typo

* Fix Filter by Stock test

* Simplify Attribute filter test by remoiving one filter from page

* Try to wait for element to be visible

* Fix handlebars syntax for filters so it doesnt throw validation errors and warnings

* Wait for filters to be visible for sure before performing further part of test

* Wait for Site Editor canvas loader

* Fix linter error

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-05-17 11:23:56 +02:00
Alba Rincón 5427aa5de8
Replace the default image of the Testimonial single pattern (#47535)
* Replace the default image of the Testimonial single pattern

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-17 11:00:51 +02:00
Vedanshu Jain e19110c564
Fix: Deleting a shop coupon using API returns a 500 error (#47474)
* Fix: Deleting a shop coupon via the API returns a 500 error

* Add unit test for coupon delete.

* Add changelog.

* PHPCS fix.

---------

Co-authored-by: 79mplus Admin <36501099+79mplus-admin@users.noreply.github.com>
2024-05-17 11:25:01 +05:30
Moon 15d146fa84
Fix lint errors with remote spec validator endpoint (#47520)
* Fix lint errors

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 15:25:59 -07:00
Ron Rennick db50513c42
use valid repository url in blocks package (#46696)
* use valid repository url in blocks package

* add changelog file

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-05-16 13:32:41 -07:00
Alexandre Lara 0a5ab942bd
[Experimental] Product Filters Redesign > Clear Button: Fix CSS Not Found error (#47481)
* Fix CSS error on Product Filter Clear Button

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

* Fix css lint error

* Remove unnecessary css file from Product Filter Clear Button block

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 15:59:06 -03:00
Jonathan Lane ad19ff51a3
Add Buildkite reporting for e2e PR and daily runs (#47558)
* Add Buildkite reporting for e2e PR runs

* Set up Buildkite reporting on daily runs

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-05-16 15:31:21 -03:00
Seghir Nadir edb930e04b
Fix a11y issues in Cart/Checkout (#47470)
* return focus on drawer

* adjust notice button color

* adjust cart/checkout input label color

* return focus for shipping form button

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 18:32:22 +02:00
Matt Sherman d6288e2b2e
REST API: Add variation product type to response (#47377)
* Add type to response

* Add type to schema

* Changelog

* Update property count in schema test
2024-05-16 11:13:07 -04:00
Seghir Nadir 4f348eb540
remove the generic incompatible notice from Checkout block. (#47475)
* remove the generic incompatible notice

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 16:52:06 +02:00
Seghir Nadir 9b1e9344e0
Turn Cart change address link to button (#47460)
* Turn Change address link to button

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

* fix lint

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 16:51:03 +02:00
Bart Kalisz 90ee3f4ed9
Blocks E2E: Remove obsolete waitForSiteEditorFinishLoading util (#47547) 2024-05-16 16:39:30 +02:00
github-actions[bot] 7e01f4d39c
Delete changelog files based on PR 47514 (#47550)
Delete changelog files for 47514

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-16 16:25:37 +02:00
Seghir Nadir a13013e9a5
Skip serialization for customer meta and be more defensive around loading it. (#47514)
* skip data serialization for customer meta

* keep casting as is

* skip old comment

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

* actually leave the comment, it still make sense

* reduce code needed

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 15:24:36 +02:00
Bart Kalisz a7bbdb99a2
Blocks E2E: Wait for Site Editor canvas loader (#47541) 2024-05-16 14:49:32 +02:00
github-actions[bot] 8bf9e966d4
Delete changelog files based on PR 47507 (#47543)
Delete changelog files for 47507

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-16 13:23:44 +02:00
Sam Seay fcc421d550
Update cart/checkout usage of the @wordpress/components Slot Fill (#47105) 2024-05-16 21:46:24 +12:00
Michal Iwanow 5cd46f48ad
Fetch Marketplace promotions - ensure callback is always registered for `woocommerce_marketplace_fetch_promotions` action (#47262)
* Marketplace promotions - ensure action is always there

We started getting errors 'Scheduled action for woocommerce_marketplace_fetch_promotions will not be executed as no callbacks are registered.' on some environments.

In this commit we ensure that WC_Admin_Marketplace_Promotions::fetch_marketplace_promotions() is always added as a calback to our action hook.

* Marketplace promotions - switch from Action Scheduler to transients

We're switching fetching marketplace promotions from using Action Scheduler
every 12 hours, to a 1 day transient. This makes it easier to ensure that
the requests are triggered only for admins, and that they don't impact frontend
users of the stores.

* Changelog

* Clear action from Action Scheduler

Action woocommerce_marketplace_fetch_promotions is no longer used, so we're clearing it when it's triggered.
Since we cannot self-clear the action, we're triggering a new single action when woocommerce_marketplace_fetch_promotions is run.
This new action's sole responsibility is to clear the original action.
2024-05-16 09:56:59 +02:00
Manish Menaria a7a1264fec
Fix input clearing issue in PriceTextField with improved currency parsing (#47354)
* Fix input clearing issue in PriceTextField with improved currency parsing

This commit addresses a usability issue in the PriceTextField component, highlighted by @dinhtungdu, where the input field would clear itself if users omitted a space between the numeric value and the currency symbol when the currency is configured to appear on the right with a space (e.g., "20$" instead of "20 $"). The problem was rooted in the strict parsing logic that did not account for variations in user input related to currency formatting.

The fix involves an enhancement to the numeric parsing function, which now effectively handles various user inputs regardless of space or placement of the currency symbol. The revised parsing logic uses a regular expression to strip out any characters that are not numeric or the designated decimal separator, and then replaces the locale-specific decimal separator with a period for standard numeric conversion. This approach not only fixes the specific issue but also improves the robustness of the component against similar input variations.

* Refactor currency parsing and improve handling in PriceTextField

1. Renaming `formatValueAsCurrency` to `formatNumberAsCurrency` to better
   reflect its functionality.
2. Moving the `convertCurrencyStringToNumber` function outside of the
   PriceTextField component, enhancing readability and reusability.
3. Changing the internal state handling from `newValue` to `inputValue`,
   directly managing the string input and parsing it as needed for further
   processing. This will force input field to re-render.

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

* Fix: Handle empty string in price conversion to prevent 0 value

This commit fixes an issue where an empty string in the price conversion function resulted in a value of 0. Now, empty strings are properly handled and do not convert to a numerical value.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-16 13:23:47 +05:30
Prahesa Kusuma Setia b669fc8526
Prevent calling wccom when the payload is empty for update check (#47507)
* prevent calling wccom when the payload is empty for update check public and non-public

* add changelog
2024-05-16 13:21:34 +07:00
Manish Menaria 1233fb4745
Fix: handle undefined templateSlug in Product Collection tracking utils (#47504)
* fix: handle undefined templateSlug in Product Collection tracking utils

The modification introduces a check for templateSlug before attempting to access its properties or use it in further logic. This change addresses a bug that manifested when users tried to edit a synchronized Product Collection block, resulting in a JavaScript error because templateSlug could be undefined.

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

* Update types to better reflect reality

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-05-16 11:17:52 +05:30
Chi-Hsuan Huang a120b99d7d
Fix coming soon page mobile UI issues (#47491)
* Update styles for WooCommerce coming soon page

- Add min-width to container for better responsiveness
- Adjust padding for smaller screens
- Update font size and text wrapping for banner

* Add changelog

* Improve readability
2024-05-16 12:46:26 +08:00
Chi-Hsuan Huang 9e32aafd38
Disable auto zoom when focusing on input for core profiler (#47400)
* chore: Add viewport meta tag for setup wizard

* Add changelog
2024-05-16 10:45:26 +08:00
Alexandre Lara 7abb996017
[Experimental] Product Filters Redesign: Add the Product Filters block (#47294)
* Add Product Filters block

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

* Add the blocks template for the Product Filters block

* Dynamically add the highest product count attribute to the block template

* wip: Add E2E tests for the Product Filters block

* Add E2E tests for the Product Filters block

* Add CSS file to Product Filters block

* Fix css error lint

* Fix lint error

* Fix lint errors

* Remove unnecessary styles for the Product Filters block

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-15 18:09:48 -03:00
Fernando Marichal 8dd87820cf
Disable pre-publish panel (#47430)
* Disable pre-publish panel

* Add changelogs

* Fix e2e tests
2024-05-15 15:52:42 -03:00
Fernando Marichal aa6137128d
Move pricing features to General tab (#47435)
* Move pricing section

* Fix e2e tests

* Fix create-variable-product tests

* Add changelog

* Add changelog in WC
2024-05-15 14:53:27 -03:00
Moon bcd80f4c95
Bump beta tester to 2.3.1 to prep a new release (#47427)
* Bump version to 2.3.1 and add changelog

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

* Update readme.txt and clean up old changelog files

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-15 10:21:54 -07:00
Luigi Teschio 8c6efe072b
Blocks: Fix JS unit tests (#47516)
* Blocks: Fix JS unit tests

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

* trigger CI

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-15 16:03:11 +00:00
Herman e65481aa27
Marketplace business services: Feature branch (#47303)
* Support for Business Services in in-app marketplace ()

Contains the changes from:

#46530
#46725
#47048
#47135
#47183
#47227
#47352
#47452

* Update plugins/woocommerce-admin/client/marketplace/README.md

Fix documentation punctuation

---------

Co-authored-by: Raja Sekar Manimaran <raja.sekar.manimaran@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Michal Iwanow <4765119+mcliwanow@users.noreply.github.com>
Co-authored-by: Dan Q <dan@danq.me>
2024-05-15 14:43:06 +02:00
Luigi Teschio 1af8e8a4d4
Blocks: Delete Jest-Puppeteer infrastructure (#46672)
* 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

* Blocks: Delete Jest-Puppeteer infrastructure

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

* 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

---------

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-15 14:22:36 +02:00
Bart Kalisz e765a717d2
Blocks E2E: Restore the no-hooks rule (#47500) 2024-05-15 13:05:52 +02:00
Sam Seay 3ef7a01840
Update blocks JS tests to React 18 (#47383) 2024-05-15 21:33:36 +12:00
Akeda Bagus 02c640480d
Free some in-memory usage when doing HPOS-related batch processing (#47159) 2024-05-15 09:19:56 +00:00
rodelgc 931bfed5c6
Update stable tag to 8.8.3 (#47496)
woorelease: Update stable tag to 8.8.3

Co-authored-by: rodel <rodel@rodels-MacBook-Pro.local>
2024-05-15 16:16:53 +08:00
Manish Menaria 9f5f93cba6
Product Collection: Implement Preview Mode (#46369)
* POC: Preview Mode using HOC

* Add explanation as comments

POC: Implement preview mode for Product Collection block in editor
- Added extensive commentary to clarify the mechanism and usage of the `handlePreviewState` function
- Implemented an internal state within `ProductCollectionContent` to manage preview status and messages, serving as a foundational example of how preview mode can enrich block functionality.
- Showcased the application of `handlePreviewState` by incorporating it as a prop in `BlockEdit`, illustrating the potential for extending the block's capabilities for dynamic and interactive previews.

This POC demonstrates a flexible approach to managing preview states within the editor, paving the way for further development and integration based on feedback and use-case analysis.

* Refactor preview state handling and collection registration

This commit introduces a centralized approach for registering product collection variations and managing their preview states. It abstracts the registration logic into a dedicated function and enhances the flexibility of preview state handling across different collection types.

* Rename file

* Minor improvements

* Don't pass previewState to handlePreviewState

I don't see any good use of it in handlePreviewState. Also, We will be going to call handlePreviewState only once
therefore, it will always have the same value as the initial value of the previewState. If in future, we decide to run it
multiple times then we can pass the previewState as an argument to handlePreviewState.

* Add comment

* Use JS closure to inject handlePreviewState

This commit introduces a refined approach for injecting the `handlePreviewState` function into product collection blocks, utilizing JavaScript closures to streamline the process. This method replaces the previous global registry mechanism, offering a more direct and efficient way to manage preview states.

Advantages of This Approach:
- Utilizing JavaScript closures for injecting `handlePreviewState` simplifies the overall architecture by directly modifying block edit components without relying on an external registry. This method enhances code clarity and reduces the cognitive load for developers.
- The conditional application of `withHandlePreviewState` ensures that the preview state handling logic is only added to blocks that require it, optimizing performance and maintainability.

* Refactor preview state management into custom hook

This commit enhances the organization and readability of the product collection content component by abstracting the preview state management into a custom hook named `usePreviewState`. This change streamlines the component's structure and aligns with React best practices for managing state and side effects.

Key Changes:
- Introduced `usePreviewState`, a custom hook responsible for initializing and managing the preview state (`isPreview` and `previewMessage`) of the product collection block. This hook encapsulates the state logic and its side effects, including the conditional invocation of `handlePreviewState`.
- Modified `ProductCollectionContent` to utilize `usePreviewState` for handling its preview state. This adjustment makes the component cleaner and focuses it more on presentation and behavior rather than state management details.

* Replace useEffect with useLayoutEffect

* Add cleanup function in handlePreviewState function

Based on [this discussion](https://github.com/woocommerce/woocommerce/pull/45703#discussion_r1535323883), I added a cleanup function support for handlePreviewState. `handlePreviewState` can return a function which will be called on cleanup in `useLayoutEffect` hook.

* Fetching random products in Preview mode

* Allow collection to set initial preview state

* Pass location & all attributes to handlePreviewState function

* Handling collection specific query for preview mode

- Consolidated `handlePreviewState` and `initialPreviewState` into a single `preview` prop in `register-product-collection.tsx` and `product-collection-content.tsx` to streamline prop passing and improve the component interface.
- Updated the `queryContextIncludes` in `constants.ts` to include 'previewState'
- Enhanced the `ProductCollection` PHP class to handle preview-specific queries more effectively, introducing a new method `get_preview_query_args` that adjusts query parameters based on the collection being previewed, thereby improving the relevance and accuracy of products displayed in preview mode.

* Always set initialPreviewState on load

* Refine preview state handling

- Renamed `HandlePreviewStateArgs` to `SetPreviewStateArgs` in `featured.tsx` to better reflect its purpose, which is now more focused on setting rather than handling states. The implementation details within `featured.tsx` have also been refined to include async operations and cleanup functions, demonstrating a more sophisticated approach to managing state.

Overall, these updates make the preview state logic more understandable and maintainable.

* Rename "initialState" to "initialPreviewState"

* Fix: Correct merging of newPreviewState into previewState attribute

This commit addresses an issue in the product-collection-content.tsx where the newPreviewState was not properly merged into the existing previewState attribute. Previously, the spread operator was incorrectly applied, leading to potential loss of existing state attributes. By changing the order of operations and correctly spreading the existing attributes before merging the newPreviewState, we ensure that all state attributes are preserved and updated correctly.

* Initial refactor POC code to productionize it

* Move `useSetPreviewState` to Utils

* Implement preview mode for Generic archive templates

Implemented a new useLayoutEffect in `utils.tsx` to dynamically set a preview message in the editor for product collection blocks located in generic archive templates (like Products by Category, Products by Tag, or Products by Attribute).

* Remove preview mode from Featured and On sale collection

* Remove preview query modfication for On Sale collection

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

* Fix: hide/show preview label based on value of "inherit"

If user change the toggle "Sync with current query", then it should reflect for the preview label as well.
- If the toggle is on, then the preview label should be shown.
- If the toggle is off, then the preview label should be hidden.

* Minor improvements

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

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

* Refactor: Simplify SetPreviewState type definition in types.ts

This commit refines the SetPreviewState type definition by eliminating the previously used intermediate interface, SetPreviewStateArgs. The change streamlines the type definition directly within the SetPreviewState type, enhancing readability and reducing redundancy.

* Update import syntax for ElementType in register-product-collection.tsx

This commit updates the import statement for `ElementType` from `@wordpress/element` to use the more modern and concise `import type` syntax. This change does not affect functionality but aligns with TypeScript best practices for importing types, ensuring that type imports are distinguished from regular imports. This helps in clarity and in optimizing the build process by explicitly indicating that `ElementType` is used solely for type checking and not included in the JavaScript runtime.

* Refactor: Update TypeScript usage in Product Collection

This commit introduces several TypeScript refinements across product-collection components:

1. **DEFAULT_ATTRIBUTES** in `constants.ts` now uses `Pick` to explicitly define its shape, ensuring only relevant attributes are included and typed accurately.
2. **ProductCollectionAdvancedInspectorControls** and **ToolbarControls** in the `edit` subdirectory now use `Omit` to exclude the 'preview' property from props, clarifying the intended prop usage and improving type safety.

These changes collectively tighten the type definitions and improve the codebase's adherence to best practices in TypeScript.

* Refactor: Update dependencies of useSetPreviewState hook in utils.tsx

This change enhances the stability and predictability of the hook's behavior, ensuring it updates its internal state accurately when its dependencies change, thus aligning with best practices in React development.

* Refactor preview button CSS and conditional rendering

1. **CSS Refactoring:** Moved the positioning styles of the `.wc-block-product-collection__preview-button` from inline styles in the JSX to the `editor.scss` file. This separation of concerns improves maintainability and readability, aligning the styling responsibilities solely within the CSS file.
2. **Conditional Rendering Logic:** Updated the rendering condition for the preview button. Now, it not only checks if `isPreview` is true but also if the block is currently selected (`props.isSelected`). This prevents the preview button from appearing when the block is not actively selected, reducing visual clutter and enhancing the user experience in the editor.

* Enhance: Update preview button visibility logic in ProductCollectionContent

This commit enhances the visibility logic of the preview button in the `ProductCollectionContent` component:

1. **Added `isSelectedOrInnerBlockSelected`:** Introduced a new `useSelect` hook to determine if the current block or any of its inner blocks are selected. This ensures that the preview button is visible when either the product collection block or any of its inner blocks are selected.
2. **Updated Conditional Rendering:** Adjusted the conditional rendering of the preview button to use the new `isSelectedOrInnerBlockSelected` value, providing a more intuitive user experience by ensuring the preview button remains visible when any relevant block is selected.

* use __private prefix with attribute name

* Add E2E tests for Preview Mode

1. **Template-Specific Tests:** Each template (tag, category, attribute) undergoes a test to ensure the preview button behaves as expected when replacing products with product collections in these contexts.
2. **Visibility Checks:** The tests verify that the preview button is visible when the block or its inner blocks are selected and hidden when the block is not selected. This helps confirm the correct implementation of the preview button visibility logic across different use cases.
3. **Interaction with Inner Blocks:** Additional checks are included to ensure the preview button's visibility toggles appropriately when interacting with inner blocks, reinforcing the dynamic nature of block selection and its effect on UI elements within the editor.

* Add setPreviewState to dependencies

* Add data-test-id to Preview button and update e2e locator

Modifications:
- Added `data-test-id="product-collection-preview-button"` to the Preview button in `product-collection-content.tsx`.
- Updated the corresponding e2e test locator in `product-collection.block_theme.side_effects.spec.ts` to use the new `data-test-id` instead of the class name.

By using `data-test-id`, we ensure that the e2e tests are not affected by changes in the styling or restructuring of the DOM that might alter CSS classes but do not affect functionality.

* Enhance: Localize preview message in useSetPreviewState hook

* Don't show shadow & outline on focus

* Make preview button font same as Admin

* Fix SCSS lint errors

* Add missing await keyword

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-15 13:18:43 +05:30
Michael Pretty e50c8426fb
fix PHP 8 warning in Blocks\Installer\create_pages() callback when oher filters have removed pages (#47094) 2024-05-15 08:45:37 +02:00
Chi-Hsuan Huang d5166dcfed
Fix undefined variable `$exlude_paths` (#47490)
* Fix typo in exclude_paths variable name

* Add changelog
2024-05-15 03:41:53 +00:00
Moon 042766c28c
Do not display smart app banner on the core profiler, LYS, and CYS pages (#47429)
* Do not display smart app banner on the core profiler pages

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

* Ignore hook doc errors -- need to re-visit this later

* Document filters with basic info -- using 6.5.0 for since tag. That is the first release after WC Admin was merged to the core

* Update plugins/woocommerce/src/Internal/Admin/Loader.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-14 17:41:57 -07:00
Jonathan Lane 6e8a922943
Update stalebot workflow for flaky tests (#47484)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-05-14 16:02:18 -07:00
César Costa f5e45ef376
Update symbol and formatting of the XPF currency (#46960)
* Update XPF currency symbol to XPF

* Change XPF default locale formatting

* Change decimal separator of countries that use XPF to dot

* Add changelog entry

* Update changelog entry

* Fix XPF test data

* Fix some JS linting issues

* Revert "Fix some JS linting issues"

This reverts commit 51abcf4117.

* Fix some JS linting issues
2024-05-15 04:50:55 +07:00
Akeda Bagus b931117f7a
Fix dates dropdown in admin list order page (#47440)
* Fix dates dropdown in admin list order page

The query was missing a filter to order type.

Fixes #47406.

* Fix changelog header
2024-05-14 19:29:45 +00:00
Fernando Marichal 2575d455f7
Fix flaky Attributes and Variations E2E tests (#47471)
* Wait for attributes until request is complete

* Wait for response

* Add changelog
2024-05-14 13:59:34 -04:00
Álvaro Thomas 32d10eacf8
Update stable tag to 8.9.0 (#47482)
woorelease: Update stable tag to 8.9.0
2024-05-14 19:56:10 +02:00
Jorge A. Torres 089be925d9
Add some unit tests to cover changes in PR 46972 (#47098)
* Add unit tests for 's' search parameter in HPOS queries

* Add changelog

* Fix PHPCS issue
2024-05-14 20:34:17 +05:30
Sakri Koskimies 5a8dfac898
Add support for FI and SE postcode validation + Update tests (#45480)
* Add validation for FI, SE postcodes

* Add non-legacy WC_Validation_Test test class

* Add changefile

* Add validation for EE postcode

Co-authored-by: ragulka <illimar.tambek@gmail.com>

* Apply phpcs fixes.

---------

Co-authored-by: ragulka <illimar.tambek@gmail.com>
Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2024-05-14 20:09:55 +05:30
Luigi Teschio 603184182b
CYS: mutate the original instance of the block array (#47468)
* mutate the original instance of the block array

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

* trigger CI

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-14 16:05:09 +02:00
Adrian Moldovan 7b96dfca67
[e2e tests] Remove BuildKite reporter (#47449)
* Remove BuildKite reporter

* Changelog

* Remove BuildKite reporter from api tests
2024-05-14 10:25:17 +01:00
Thomas Roberts 35f07934a4
Remove bold text from selected payment method in Checkout block (#47412) 2024-05-14 02:00:30 -07:00
Jorge A. Torres f241b4dd08
Add support to HPOS CLI tool for handling deleted orders (#46970)
* Add support for removed orders to cleanup tool

* Add changelog
2024-05-14 14:24:15 +05:30
Bart Kalisz 1e1e7dd65d
Blocks E2E: Align ESLint and TS configs with Gutenberg (#47228) 2024-05-14 10:23:17 +02:00
Karol Manijak bf2d622a66
Product Collection: telemetry for filter usage (#46545)
* Create trackInteraction function and pass it to query Insprector Controls

* Add tracking to Attribute filter

* Add tracking to Created filter

* Add tracking to Featured filter

* Add tracking to Handpicked Products filter

* Add tracking to Inherit Query filter

* Add tracking to Keyqord filter

* Add tracking to On Sale filter

* Add tracking to Order By option

* Add tracking to Stock Statusoption

* Add tracking to Price Range filter

* Add tracking to Taxonomies filter

* Fix lint errors

* Add changelog

* Rearrange the logic of recognising the tracks location so it's more reliable
2024-05-14 09:45:33 +02:00
Chi-Hsuan Huang d66c5b8efe
Add UTM tags to all product links in core profiler Free features step (#47397)
* Add UTM tags to all product links for core profiler default free extensions

* Add changelog

* Update mailpoet link
2024-05-14 10:32:51 +08:00
Paul Sealock 208e5633ba
[Launch Your Store] Add e2e tests (#47239)
* LYS spec

* get homescreen check working

* move over to shopper

* basic test

* get first test working

* Store only coming soon mode - logged out

* add logged in ttests

* linter

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

* Remove skip from tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-14 11:41:35 +12:00
github-actions[bot] d19e90105a
Delete changelog files based on PR 47003 (#47439)
Delete changelog files for 47003

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-14 00:24:24 +01:00
Christopher Allford b8aabe9005
Fixed Taxonomy Term Limit On Product Collection Filters (#47155)
In the interest of avoiding pagination this refactor swaps the current term loading with one that doesn't require a cache of all terms. We've removed the need for the cache by storing the ID and term name together in the token/suggestion list and using a display transformation to hide any unnecessary information.
2024-05-13 16:00:24 -07:00
Roy Ho f5dc46a385
Product Filters: add individual clear button (#47101)
* Product Filters: add individual clear button

* Remove unused style.scss

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

* Simplify searching for the tag

* Convert to use button instead of anchor

* Try using iAPI to show/hide clear button

* Use local context instead of global state

* Fix linting error

* Remove unneeded context

* Update clear button block description

* Fix frontend PHP error

* Add e2e tests for attributes filter clear button

* Add e2e tests for price filter clear button

* Add e2e tests for rating filter clear button

* Add e2e tests for stock status filter clear button

* Address feedback and use built in locators

* Address feedback and replace the use of timeouts

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 15:19:56 -03:00
Fernando Marichal fdb4069566
Remove not used feature flags (#47150)
* Remove product-virtual-downloadable

* Remove product-variation-management

* Remove product-external-affiliate

* Remove product-grouped

* Remove product-linked

* Remove customer-effort-score-tracks

* Add beta tester changelog

* Add changelogs
2024-05-13 15:05:47 -03:00
Albert Juhé Lluveras 8da8a70839
Update docs about blocks styling to clearly state global styles are the recommended approach (#47269)
* Update docs about blocks styling to clearly state global styles are the recommended approach

* Markdown formatting fixes

* Add changelog file

* Add styling the Product Price block example

* Markdown formatting fixes (II)

* Update plugins/woocommerce-blocks/docs/designers/theming/README.md

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>

* Update plugins/woocommerce-blocks/docs/designers/theming/README.md

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>

---------

Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
2024-05-13 18:26:50 +02:00
Seghir Nadir ccba86a616
Update additional fields document's TOC and link to it from another document. (#47137)
* update docs

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

* fix linting

* update manifest

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 15:46:46 +00:00
Seghir Nadir b5850bbfc1
Select a shipping rate after they load (#47120)
* select a shipping rate if there are no shipping rates on mount

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

* move code and explain it

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 15:29:04 +00:00
Seghir Nadir de4180c17a
Make german state field visible but not required (#47319)
* Make german state field visible but not required

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 15:19:35 +00:00
Bart Kalisz 9a71f3ac5f
Blocks E2E: Remove the DB snapshot on env reset (#47416) 2024-05-13 17:19:15 +02:00
Moon 5183b1bb1b
LYS - Disable the save changes button until changes are made (#47316)
* Disable the save changes button until changes are made

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

* Fix broken test

* Test

* Remove test code

* Tmp fix - fix broken test

* Fix incorrect comparison

* Remove test code

* minor refactor -- re-use setting

* Remove use of loadash isequal

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 07:56:51 -07:00
Seghir Nadir b256336176
reset state and postcode if it's not valid for the current country (#47369)
* reset state if it's not valid for the current country

* reset postcode as well

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

* update logic so its in Checkout block instead of store api

* fix linting

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 16:46:08 +02:00
Paulo Arromba 98510fe9fd
Add woocommerce_order_received_verify_known_shoppers filter to order confirmation template (#46957)
* Adds filter `woocommerce_order_received_verify_known_shoppers` to allow known shoppers to access the order received page without being logged in in Order Confirmation template

* Added changelog

* Added filter docblock

* Refactored to apply the filter correctly for non-guests only.

* Restored comment.

* Added test

* Added test

* lint

* Change plugin package name

* Update plugin name (apparently slugs are formed from that)

* Added right prefix

* JS linting

* Refactored testing into a test.step()

* typo

* Fixed tests.

* Reverted change done by mistake.

* remove getByRole specificity

* Increase selector specificity specificity

* Change test prefix

* reduce test flakyness

* reduce test flakyness

* reduce test flakyness
2024-05-13 15:28:36 +01:00
Seghir Nadir 76a9e2eb27
Move country to top of form for all countries (#47375)
* Move country to top of form for all countries

* adjust styling

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 16:24:40 +02:00
Sam Seay 2db29164f9
Update to pnpm 9.1 (#47385)
* Update to pnpm 9.1 and fix a mini css bug

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/product-editor, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/ai, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai

* temporarily disable swallowing build output to diagnose issue with perf workflow

* Ignore some type issues that commonly resurface when deps slightly change

* Fix persistent type issues that have recurred many times

* Add more ignores

* Fix lint issue

* Revert change to swallow build error

* Improve access of the config that needs updated build dir.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 10:57:39 -03:00
Akeda Bagus 5bbbc52c0d
Respect locale setting to format order counts in admin orders list page (#47373)
* Respect locale setting to format order counts in admin orders list page

Fixes #47372

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 14:28:31 +01:00
Bart Kalisz 30756f74e3
Blocks E2E: Refactor configs and workflow (#46409) 2024-05-13 14:58:26 +02:00
Paulo Arromba 4840af874a
Add phone number to my account shipping address. (#47062)
* Added phone number support to Shipping Address and refactor the code.

* Refactored to avoid evaluating extra if on !== billing address form

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

* Fixed tests.

* Mock phone number consistency
2024-05-13 12:48:57 +01:00
Brian 69daa61877
Add aria-label to My Account Navigation Item (#43696)
Co-authored-by: Niels Lange <niels.lange@a8c.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 14:23:19 +03:00
Patricia Hillebrandt 7313127649
CYS > Add a feature flag for full composability and the Pattern Toolkit (#47392)
* Add a feature flag for full composability and the Pattern Toolkit projects.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 12:28:20 +02:00
Justin Palmer 7796c13b65
Make method getAttributionData globally accessible (#46965)
* Make method to getAttributionData externally accessible

* Include checks for sjbs availability

* Failsafe for the custom html element if sbjs isn't available

* Changelog
2024-05-13 12:24:32 +02:00
github-actions[bot] b164d19328
Delete changelog files based on PR 47398 (#47405)
Delete changelog files for 47398

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-13 12:09:56 +02:00
Néstor Soriano f61bdd51d5
Fix fatal error when trying to download log files (#47398)
* Fix inverted logif for readable file check in FileExporter::emit_file

* Fix: instance of WP_Error being passed to PageController::handle_list_table_bulk_actions
2024-05-13 11:28:09 +02:00
Ramon Ahnert 49c379c5a7
Fix typo in the Exposing your data in the Store API documentation (#43488)
* Fix basic usage code snippet example in extend-rest-api-add-data.md

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 15:20:07 +07:00
Chi-Hsuan Huang b28adc1703
Use a real em dash character (—) in the coming soon site template (#47394)
* Use a real em dash character (—) in the coming soon template

* Add changelog
2024-05-13 15:51:42 +08:00
Prahesa Kusuma Setia db804f4193
Tracks event for WooCommerce.com connect notice (#47003)
* add tracks event in the wc settings connect notice

* add clicked and dismissed tracks event in the marketplace connect notice

* add shown tracks event in the marketplace connect notice

* add changelog

* fix linter error

* Add Tracks event when connect-notice in plugin is shown and clicked

* Add docblock for maybe_enqueue_scripts_for_connect_notice_in_plugins

---------

Co-authored-by: Akeda Bagus <akeda.bagus@automattic.com>
2024-05-13 13:45:43 +07:00
Ilyas Foo c4ca5f87d9
Reenable global styles for coming soon entire site template (#47388)
* Reenable global styles for coming soon pages

* Changelog

* Update fix-lys-reenable-global-styles
2024-05-13 13:38:54 +08:00
Moon 6cf09f30a8
LYS - Use flow layout for the coming soon template (#47335)
* Use flow layout

* Tmp fix - fix broken test

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

* Use flex layout

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 13:15:47 +08:00
RJ 2898efa648
add: lys badge tracks (#46509) 2024-05-13 07:52:49 +08:00
Cem Ünalan 23773e19f0
Freemium: update marketplace product card label (#45982)
* Freemium: update marketplace product card label

* 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-05-10 15:00:05 -05:00
github-actions[bot] 821d764b04
Delete changelog files based on PR 47205 (#47367)
Delete changelog files for 47205

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-10 17:13:50 +02:00
Matt Allan 6a89723685
Update when PayPal Standard is loaded to further reduce new store using this legacy payment method (#47205)
* Change default PP Standard should_load logic to be more strict when setting to true

* Remove filter allowing stores to enable PayPal Standard programmatically

* Adds new function to check if the store has any PayPal Standard orders

* Upgrade script that disables PayPal Standard on stores that aren't using it.

* Add changelog entries

* Fix extra comma

* PayPal email is defaulted to the admin email which means checking needs_setup() isn't reliable

* Load PayPal standard in unit tests

* Before installing WC, set the Paypal Standard should load to true

* Remove unnecessary ternary when setting default should_load

* On upgrading WC, only check for PayPal Standard live keys to determine if it's setup

* Remove admin notice if PayPal Standard is disabled on ugprade

* Display an admin notice if the store is using the deprecated filter to load PayPal Standard.

* Add docblock comment above the apply filters

* Added checks around the filter and give pref to enabled.

git add .

* Remove the should load filter notice.

* Add comment noting that init class shouldnt be removed.

* Use proper casting for this->enabled before usage.

---------

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2024-05-10 14:04:32 +01:00
Moon d0a8477b51
LYS - Add padding-left to the copy link (#47313)
* Adding padding to the copy link

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

* Tmp fix - fix broken test

* Fix lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-10 05:02:35 -07:00
Néstor Soriano 772d796ea3
Fixes in the receipts rendering engine (#47300)
* Fix permission check in RestApiControllerBase

Extra arguments were being passed incorrectly to current_user_can,
causing wrong authentication failures in some cases (e.g.
when hitting the endpoints in a wp.com site via Jetpack tunneling).

* Fix get_order_data in ReceiptRenderingEngine

A fatal error was being thrown when one of the products referenced
in the order did no longer exist.
2024-05-10 13:12:54 +02:00
Moon 0873ed47c3
LYS - Update toolbar store link text (#47315)
* Update toolbar store link

"Preview store" when coming soon mode is enabled
"View store" when the site is set to live

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

* Fix broken test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-10 04:00:41 -07:00
Moon a8cf226987
LYS - Use Woo branded colors for LYS confetti (#47334)
* Update LYS congrats confetti

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

* remove temporary fix

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-10 04:00:33 -07:00
Naman Malhotra 01069666e6
Fix: Reset password form missing required indicator (#47229)
* Fix: Reset password form missing required indicator

* Added changelog

* Updated templae version

* Address feedback
2024-05-10 10:08:05 +00:00
Moon 7556b7bffc
LYS - Remove admin toolbar button hover background (#47314)
* Remove hover background

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

* Tmp fix - fix broken test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-10 02:16:54 -07:00
Jonathan Lane c78292e6cc
Add API test for refunds endpoint (#47340)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-05-10 11:56:53 +03:00
Jonathan Lane 396c29d3ec
Install and set up BuildKite test analytics (#47202)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-05-10 11:47:23 +03:00
Néstor Soriano b7d32ffa30
Add hooks to customize the order receipt generation (#46224)
Also:

- Move CSS to a separate template
- Access receipt data through a $data array in the template
  (don't extract the variables anymore)
2024-05-10 09:26:27 +02:00
Luigi Teschio 8954785c96
CYS: not run font picker tests on WordPress 6.4 (#47182)
* CYS: not run font picker tests on WordPress 6.4

* improve how the test is skipped

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-10 10:26:56 +08:00
Chi-Hsuan Huang 66c57693c1
Fix RIN Display Logic for Banner Alert Notifications (#47167)
* Fix RIN Display Logic for Banner Alert Notifications

* Add tests

* Add changelog

* Update test

* Add test

* chore: fix unactioned note status check in EvaluateAndGetStatus.php
2024-05-10 09:58:09 +08:00
Moon 14018bec62
Replace Options API usage with LaunchYourStore endpoint for LYS (#47252)
* Replace Options.php usage with LaunchYourStore controller

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

* Catch error, but ignore it

* Tmp fix - fix broken test

* Lint fixes

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-09 15:59:36 -07:00
Moon 7360928502
Use wp_plugin_dependencies_slug in PluginVersionRuleProcessor (#47235)
* Use wp_plugin_dependencies_slug

* Fix incorrect function name

* Remove unnessary content-type header

* Add doc block for wp_plugin_dependencies_slug filter

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

* Tmp fix - fix broken test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-09 15:30:12 -07:00
Corey McKrill 576db0933c
REST API: Add missing line item schemas to refunds endpoint (#47254)
* REST API: Add missing line item schemas to refunds endpoint

In #28241, `fee_lines`, `shipping_lines`, and `tax_lines` properties
were all added to the refund data object sent by v2 and v3 of the
REST API. However, the schema was never updated, so the characteristics
of those properties have not been very discoverable. This simply
copies the relevant schema data from the orders endpoint over to the
refunds endpoint.

Towards #43444

* phpcs cleanup
2024-05-09 21:59:30 +00:00
Corey McKrill 35908b8ee3
Update `WC_Admin_Tests_API_Plugins` to use different plugins for testing (#47337)
Updates the tests in WC_Admin_Tests_API_Plugins to use plugins other than `facebook-for-woocommerce` to hopefully be more reliable in the future.
2024-05-09 13:03:59 -07:00
Adrian Moldovan 5591b25367
[ci-jobs] Add the optional property for jobs (#47261) 2024-05-09 12:22:44 +03:00
Jonathan Lane 18e83a2467
🧪 Fix for a couple of failing e2e tests (#47253)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-05-09 11:33:26 +03:00
Chi-Hsuan Huang f2cf6b56aa
Update @automattic/tour-kit to 1.1.3 and @automattic/components to 2.1.1 (#47129)
* Use @automattic/tour-kit@1.1.3

* Update onPreviousStep and onNextStep callback

* Add changelog

* Add changelog

* Update @automattic/components

* Update package.json

* Fix pnpm-lock.yaml

* Update changelog

* Add changelog

* Enable autoScroll for shipping tour
2024-05-09 08:56:08 +08:00
Jorge A. Torres 875d1a7f8e
Override `get_edit_post_link()` URL for HPOS placeholder posts (#47149)
Rewrites edit post links for HPOS placeholder posts so they go to the actual HPOS orders.

Fixes #45806
2024-05-08 14:08:56 -07:00
github-actions[bot] a06bf69976
Delete changelog files based on PR 47171 (#47282)
Delete changelog files for 47171

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-05-08 17:39:00 +02:00
Adrian Moldovan 082719b0fd
[e2e tests] Disable broken product editor tests (#47268)
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-05-08 09:33:27 -05:00
Albert Juhé Lluveras 8b47443a1c
Remove unnecessary links to an ephemeral site (#47270)
* Remove unnecessary links to an ephemeral site

* Add changelog file

* Disable markdown lint in some lines
2024-05-08 15:24:25 +02:00
Luigi Teschio 5cdc7fcd43
CYS: fix color picker E2E test (#47274)
Co-authored-by: github-actions <github-actions@github.com>
2024-05-08 16:08:22 +03:00
Niels Lange e7aff9428f
[Enhancement]: Block-based checkout - Pickup section updates (#47173)
* Change “Pickup options” to “Pickup locations”

* Always show pickup location and truncate pickup details

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

* Adjust spacing between pickup details and more link

* Hide pickup details of unselected pickup location

* Adjust line height of truncated text

* Show “Read more/less” instead of “more/less”

* Ensure both lines are equally filled with text

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-08 17:58:09 +07:00
Bart Kalisz 3ad9ebf52a
Blocks E2E: Fix flaky Product Collection tests (#47211) 2024-05-08 11:26:52 +02:00
Niels Lange 99bed6d7ba
Display price in place order button (#47083)
* WIP: Display price in place order button

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

* Fix JS lint error

* Update e2e tests

* Display default place order button including placeholder in page editor

* Update plugins/woocommerce-blocks/assets/js/blocks/checkout/inner-blocks/checkout-actions-block/constants.tsx

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>

* Optimise i18n using sprintf

* Wrap cart totals in “useSelect”

* Temporary skip failing e2e test

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-05-08 16:18:48 +07:00
Bart Kalisz c464afc7ad
Blocks E2E: Remove discouraged waitForTimeout from tests (#47214) 2024-05-08 10:14:24 +02:00
Bart Kalisz 2936c4eac8
Blocks E2E: Fix flaky block insertion tests (#47213) 2024-05-08 10:13:30 +02:00
Luigi Teschio 2296e45d33
CYS - Core: Invert the color of the button block inside the cover block when the active style variation is New - Neutral (#47220)
* CYS - Core: fix cover button

* fix type

* fix build

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

* update color in the homepage preview

* move comment

* fix switch style variation

* add comment

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-08 09:36:45 +02:00
Alba Rincón 7a7b513771
[CYS] Fix the triggered event when starting the "no AI" flow (#47181)
* Fix event when starting the no AI flow

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-08 08:52:33 +02:00
Niels Lange b6d9b3a013
Fix broken checkout address forms layout (#47131)
* Fix broken checkout address forms layout

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-08 10:30:12 +07:00
Scott 94ed6a943f
Fix coupon usage limits on failed trashed orders (#47125)
This addresses coupon usage limits for failed & trashed orders by ensuring that coupon usage is decremented when a transaction fails or an order is trashed.

Fixes #31245

* Added tests to check coupon usage count on failed & trashed orders

Signed-off-by: Scott Fleming <scott@noblwheels.com>

* Add filter woocommerce_update_coupon_usage_invalid_statuses, wc_update_coupon_usage_counts actions -> failed/trashed

Signed-off-by: Scott Fleming <scott@noblwheels.com>

* document woocommerce_update_coupon_usage_invalid_statuses filter

Signed-off-by: Scott Fleming <scott@noblwheels.com>

* formatting

Signed-off-by: Scott Fleming <scott@noblwheels.com>

* Add changelog file

Signed-off-by: Scott Fleming <scott@noblwheels.com>

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

Appease the code style linter

* Update plugins/woocommerce/tests/php/includes/wc-order-functions-test.php

Appease the code style linter

---------

Signed-off-by: Scott Fleming <scott@noblwheels.com>
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-05-07 10:45:38 -07:00
Ron Rennick 15f087da06
Update community PR assignment list for vortex (#47225)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-05-07 10:16:37 -07:00
Justin Palmer f401a98301
Stamp the order attribution HTML element (only once) on a wider set of checkout form actions (#46834)
* Inject the fields (only once) on a large set of checkout form actions

* Changelog

* Better doc format

* Add _once to the new method to clarify functionality

* Filter to modify the default list of actions
2024-05-07 15:54:32 +02:00
Maikel Perez 40486a0151
Remove duplicate code lines in css (#47122)
* Remove duplicate css code from any woo scss file

* Add changelog files
2024-05-07 08:35:25 -04:00
Jonathan Lane 1671523cc0
Remove upload plugin test from Slack reporting on daily (#47067)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-05-07 14:40:12 +03:00
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
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
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
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
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 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
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
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
Vedanshu Jain 302da40214
Add index on SKU filed in wc_product_meta_lookup table. (#47051) 2024-05-01 11:18:46 +01:00
Moon 95a32efb2a
Return with home URL when permalink structure is empty (#46664)
* Return with home URL when permalink structure is empty

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

* Always includes home url

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-30 08:41:15 -07:00
Niels Lange 1d93ba0b6a
Block-based checkout - Shipping section changes (#46083)
* Refactor shipping sections

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

* Refactor various files and adjust e2e tests

* Display expected styles for “Ship” and “Pickup” in the page editor

* Use exact selector

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-30 19:59:03 +07:00
Ilyas Foo 35c50ebdb4
Try wrapping entire coming soon page under cover block to fix layout issue (#46914)
* Refactor to wrap everything under cover block

* Changelog

* Cleanup and fix classic theme

* Wrap center with stack for ease of adding elements nearby

* Update styles

* Fix dynamic background color

* Style clean up
2024-04-30 16:56:59 +08:00
Chi-Hsuan Huang fbef56fb4d
Add filter to convert WooCommerce slug for plugin dependencies (#46707)
* Add filter to convert WooCommerce slug for plugin dependencies

* Add changelog

* Add @since tag
2024-04-30 01:46:03 +00:00
Alexis Urien 3451c51cbf
Remove unused code introduced in 2014 but that looks never been used (#46843)
* Remove unused code introduced in 2014 but that has never been used

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

---------

Co-authored-by: Alexis Urien <alexis@smiile.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-29 19:55:29 +01:00
Adrian Moldovan e36baab4fe
[e2e tests] Disable woocommerce_coming_soon during test environment setup (#47024)
* Disable woocommerce_coming_soon in test env setup

* Disable woocommerce_coming_soon in test env setup

* Add changelog
2024-04-29 10:27:18 -07:00
Adrian Moldovan 9ff383e703
[e2e tests] Don't exit if the consumer token is not cleared in teardown (#47020)
* Assert for consumer token being cleared, but don't exit

* Add changelog
2024-04-29 10:24:29 -07:00
Álvaro Thomas 15c3135720
Update stable tag to 8.8.3 (#47033)
woorelease: Update stable tag to 8.8.3
2024-04-29 18:04:01 +02:00
Néstor Soriano fbb39807ac
Prevent product from being saved prematurely when updated via REST API (#46674)
* Prevent product being saved prematurely when updated via REST API

This includes the wc_product_attach_featured_image function
getting a new argument, $save_product, defaulting to true.

* Add changelog file
2024-04-29 13:54:54 +01:00
github-actions[bot] 664147a216
Delete changelog files based on PR 46972 (#47017)
Delete changelog files for 46972

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-04-29 13:56:17 +02:00
Patricia Hillebrandt 30054a25c0
CYS > Ensure get_patterns_ai_data_post is triggered only if AI enabled and improve performance (#46999)
* Ensure the get_patterns_ai_data_post method is triggered exclusively whenever AI is enabled. Udate the get_patterns_ai_data_post method to rely on get_posts instead of new WP_Query for fetching the results. Enable autoload for the 'woocommerce_blocks_allow_ai_connection' option to improve performance, since it is invoked in pretty much all page loads.

* Enable autoload for the 'woocommerce_blocks_allow_ai_connection' option to improve performance, since it is invoked in pretty much all page loads.

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

* address lint error.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-29 13:29:15 +02:00
Michael Pretty 1725ed2075
Use delete query format suppored by wpdb::get_table_from_query() in Abstract_WC_Order_Data_Store_CPT::delete_items() (#46692)
* Use delete query format suppored by wpdb::get_table_from_query() in Abstract_WC_Order_Data_Store_CPT::delete_items()

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

* Add unit test for deleting orders.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2024-04-29 10:08:30 +00:00
Jorge A. Torres 9becfc8c46
Do not urldecode search terms in HPOS searches (#46972)
* Fix HPOS searches involving terms similar to URL-encoded characters

* Make sure search filters are non null
2024-04-29 11:32:53 +02:00
Sam Seay 05f14d9465
Fix incorrectly used aria-describedby in add to cart button of variable product (#46897) 2024-04-29 21:31:34 +12:00
Alba Rincón 79c5359a49
[CYS] Fix error when repeating the prompt on consecutives runs (#46872)
* Fix error when the repeating the prompt

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-29 10:24:48 +02:00
Sam Seay 75b7775e1b
Update Webpack in blocks to latest version (#46711) 2024-04-29 15:50:47 +12:00
Sam Seay 1e225f701f
Add aria label to the customer account block link (#46899) 2024-04-29 13:35:47 +12:00
dependabot[bot] f9a7ff04f0
Bump fast-xml-parser from 4.2.4 to 4.2.5 (#41982)
* Bump fast-xml-parser from 4.2.4 to 4.2.5

Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 4.2.4 to 4.2.5.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v4.2.4...v4.2.5)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add changelog

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-04-26 15:25:30 -07:00
Adrian Moldovan fb9613e92c
[e2e tests] Fix the cleanup of created test pages and move to fixtures (#46944)
* Added testPage fixture and testPgeTitle fixture option

* Update create-cart-block.spec.js to use testPage fixture

* Add changelog

* Update create-checkout-block.spec.js to use testPage fixture

* Update create-page.spec.js to use testPage fixture

* Update create-woocommerce-blocks.spec.js to use testPage fixture

* Update create-woocommerce-patterns.spec.js to use testPage fixture

* Update cart-block.spec.js to use testPage fixture

* Update cart-block-calculate-shipping.spec.js to use testPage fixture

* Update cart-block-coupons.spec.js to use testPage fixture

* Update checkout.spec.js to use some utils

* Update checkout-block-coupons.spec.js to use testPage fixture

* Use cart utils in checkout-create-account.spec.js

* Use cart utils in checkout-login.spec.js

* Use cart utils in order-email-receiving.spec.js

* Update shop-products-filter-by-price.spec.js to use testPage fixture

* Add helpers.js

* Move the page title random name generator in the base fixture to ensure uniqueness

* Remove eslint exceptions

* Use api fixture
2024-04-26 14:50:35 -07:00
Vedanshu Jain 94e438f524
Add experimental support for FTS indexes in HPOS. (#46130)
* Added key for sku

* Add experimental support for FTS indexes in HPOS. Additionally, revert existing HPOS search queries to use post like structure.

* Add unit tests

* Escape the error messages as per new phpcs rules.

* Fix query with index + added test.

* remove uninteded change.

* Unit test fixes.

* Remove unit test since the commit command breaks other tests.

Use message API instead of notices with defensive checks.
2024-04-26 17:25:03 +01:00
dependabot[bot] 3d8e20c62c
Bump octokit from 2.1.0 to 3.1.2 (#42891)
* Bump octokit from 2.1.0 to 3.1.2

Bumps [octokit](https://github.com/octokit/octokit.js) from 2.1.0 to 3.1.2.
- [Release notes](https://github.com/octokit/octokit.js/releases)
- [Commits](https://github.com/octokit/octokit.js/compare/v2.1.0...v3.1.2)

---
updated-dependencies:
- dependency-name: octokit
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Rename env variable

* Add changelog

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-04-26 10:52:25 -03:00
Luigi Teschio ded320df95
[Blocks] Migrate stock filter to playwright (#46580)
* 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

* Blocks: Migrate stock filter to playwright

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

* Remove double site editor redirect

* remove not necessary file

* fix test

* 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

* improve E2E tests

* fix test

* 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>

* address feedback

---------

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-04-26 15:14:54 +02:00
Luigi Teschio 45a4817772
[Blocks] Migrate Attribute filter E2E tests to playwright (#46591)
* 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

* Blocks: Migrate attribute filter E2E tests to playwright

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

* 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

* update path

* 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>

* address feedback

* fix visitSiteEditor

* fix description

* remove not necessary changelog

---------

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-04-26 14:35:03 +02:00
Luigi Teschio 24c2832e4f
[Blocks] Migrate rating filter to playwright (#46583)
* 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

* Blocks: Migrate rating filter to playwright

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

* remove not necessary changelog

* 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

* improve tests

* use visitSiteEditor util

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* use locator.fill

* 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>

* address feedback

* remove not necessary changelog

---------

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-04-26 12:53:07 +02:00
Luigi Teschio 417baee8ef
[Blocks] Migrate Price filter tests to Playwright (#46576)
* 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

* [Blocks]: Migrate Price Filter tests to Playwright

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

* improve description

* Try stabilizing the company field test

* use Product Collection

* Use canvas param instead of manually entering edit mode

* remove blockData

* 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

* update test

* add missing import

* 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>

* improve E2E tests

* remove not necessary changelog

---------

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-04-26 12:07:00 +02:00
Bart Kalisz 5f7cc39330
Block E2E: Eliminate side effects through improved test isolation (#46125) 2024-04-26 11:39:11 +02:00
Corey McKrill 42902ef96d
Logging: Ensure the woocommerce_format_log_entry filter hook still has access to the log source value (#46851)
* Logging: keep full context in woocommerce_format_log_entry filter hook

The source value gets removed from the context array before it is
converted to JSON and output as part of the log entry. However, this
means that the source value is not available when the
woocommerce_format_log_entry filter hook fires, so plugins can't easily
determine where the log entry came from. This simply ensures that the
source value is still available to the filter hook, even though it's not
included in the JSON.
2024-04-26 09:12:50 +02:00
Paul Sealock d5d25d3bfe
[LYS] Comin soon block - Refactor and hide Styles block on Store Only (#46854) 2024-04-26 16:43:08 +12:00
Darren Ethier ed430bdd72
Block Hooks: Revert opening up hooked blocks to all block themes (#46935)
* Revert opening up hooked blocks to all block themes.

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

* Add version to @since tag in fn comment.

Missing @since version throwing a CI check error:

`A "@since" tag was found but no version declared.`

Adding `8.4.0`, as this was the version referenced before the revert.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Daniel W. Robert <danielwrobert@gmail.com>
2024-04-25 22:33:05 -04:00
Paul Sealock 86eee17c20
[LYS] Convert status chip files to typescript (#46898) 2024-04-26 11:07:56 +12:00
Adrian Moldovan dd8aa94db9
[e2e tests] Fix more e2e tests with Gutenberg active (#46861)
* Add publish page util

* Update create-woocommerce-patterns.spec.js to use canvas

* Update create-woocommerce-blocks.spec.js to use the publishPage util

* Fix check for pattern

* Add changelog

* Update cart-block-calculate-shipping.spec.js to use canvas

* Add utility for adding a product to cart and only waiting for the relevant request instead of networkidle

* Update cart-block-coupons.spec.js to use canvas and new utils

* Update shopper/cart-block.spec.js to use canvas and new utils

* Update shopper/cart-calculate-shipping.spec.js to use new utils

* Update shopper/cart-checkout-block-calculate-tax.spec.js to use canvas and new utils.

* Use uuid instead of Date.now()

* Update shopper/cart-checkout-calculate-tax.spec.js to use new utils

* Suppress testing-library/await-async-utils eslint rule

* Add currency for a more strict text based locator

* Don't wait for networkidle

* Don't wait for networkidle in cart-checkout-restricted-coupons.spec.js

* Don't wait for networkidle in cart-redirection.spec.js

* Fix cart.spec.js

* Fix checkout-block-coupons.spec.js

* Fix checkout-block.spec.js

* Fix shop-products-filter-by-price.spec.js

* Add gutenberg to wp-env config

* Dirty fix for multiple coupons test

* Remove Gutenberg from wp-env
2024-04-25 13:19:21 -07:00
Alexander Minza ac7bcdbab3
Add filter hook wc_product_pre_has_unique_sku (#46763)
Adds the `wc_product_pre_has_unique_sku` filter hook to allow SKU uniqueness to be determined externally in order to avoid an expensive query.

Fixes #46759
Fixes #31720

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-04-25 10:41:33 -07:00
github-actions[bot] f7cad9c4be
Prep trunk for 9.0 cycle (#46893)
Prep trunk for 9.0 cycle with version bump to 9.0.0-dev

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-04-25 18:34:18 +02:00
github-actions[bot] 26a9972ebc
Release: Remove 8.9 change files (#46894)
Delete changelog files from 8.9 release

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-04-25 18:33:07 +02:00
Jorge A. Torres 7e763e64ec
Add support for 'customer' field to REST orders controller (v2/v3) (#46878)
* Properly handle 'customer' field in REST API when HPOS is active

* Remove code from v3 orders controller that was moved to v2 controller
2024-04-25 16:56:55 +02:00
Vlad Olaru 8a0ed2dd0b
Revert "Upgrade the WooPayments surfaces to the new designs" (#46915)
Revert "Upgrade the WooPayments surfaces to the new designs (#46873)"

This reverts commit 24808a0a8b.
2024-04-25 16:24:05 +03:00
Roy Ho d6a48ecaf5
Add autogeneration of block list reference documentation (#46479)
* Add autogeneration of block list reference documentation

* Fix typo

* Revert this change

* Fix typo

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

* Add blanklines to surrounding markdown headings

* Generate blocks references markdown

* Add space to header markdown

* Add ancestor information

* Use native Object.keys instead of lodash

* Remove the use of fast-glob

* Revert pnpm lock file changes

* Update plugins/woocommerce-blocks/bin/gen-block-list-doc.js

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

* Update doc title

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-04-25 06:03:41 -07:00
Damián Suárez a0aa4724df
Tidy and update product attribute TypeScript types (#46907)
* rename ProductAttribute with ProductProductAttribute

* introduce ProductAttribute to define actions

* update importing attribute types

* fix select item type

* export ProductAttribute TS type

* update attribute-input-field component

* changelog

* update jsdoc block

* update test
2024-04-25 07:30:02 -04:00
RJ 7d07f0c502
revert: feature flag off (#46853)
revert LYS feature flag off for post-8.9
2024-04-25 18:44:14 +10:00
Fernando Marichal cacac06cef
Add help text under "Include downloads" toggle (#46752)
* Add help text under downloads toggle

* Add changelog
2024-04-25 05:30:17 -03:00
Alex Florisca 7dc8dd63ba
Update Order Summary Design (#45767)
* Add border around order summary on cart & checkout

* Group subtotal, discount, fees, taxes and shiping block

* Move the coupon form in order summary

* Move the coupon form in order summary

* Manage state externally in Panel component and refactor Coupon form to use the Panel component

* Remove descriptions from order summary items

* increase font weight of order summary title

* Tidy up design for desktop and add separator back in for blocks on checkout order summary

* Remove border around order summary on mobile

* Revert "Move the coupon form in order summary"

This reverts commit 4a8044cdcf.

* Change heading styles for cart

* Change font weight to 500 of order summary heading on checkout block

* Remove padding and border between order summary totals items

* Refactor css for cart & checkout totals to work in the editor

* Adjust cart totals heading in the editor

* Last adjustment to checkout totals style to work in editor

* Add changelog

* Change the cursor to pointer for the panel component

* remove unused short and full description from OrderSummaryItem

* Fix failing e2e tests

* Fix lint issues

* Vertically align order summary title in the editor

* Fix e2e tests

* Fix linting issues

* Fix unit tests

* Remove changes from woocommerce.php

* Fix checkout block test

* fix eslint errors in checkout block test

---------

Co-authored-by: Niels Lange <info@nielslange.de>
2024-04-25 12:03:31 +07:00
Corey McKrill d8486e579c
Logging: Add more robust method of filesystem initialization to handle configuration edge cases (#45914)
* Add FilesystemUtil class and unit tests

* Update logger to use FilesystemUtil

* phpcs cleanup

* Add changelog file

* Extract credentials gathering into a separate method

* Add notice when filesystem init fails

* Simplify getting filesystem credentials

* Tweak messaging in Settings when filesystem is not direct

* Remove unnecessary conditional in file deletion method

* Refactor test_clear

* Restore test_clear to its previous state

* Prevent MaxMind unit tests from polluting the state of WP_Filesystem
2024-04-24 12:18:31 -07:00
Vlad Olaru 24808a0a8b
Upgrade the WooPayments surfaces to the new designs (#46873)
* Import colors.native scss variables

* Add changelog

* Refactor WCPay banner and cleanup

We introduce a new WCPayConnectCard onboarding component and
remove/cleanup all other WCPay surface components.

This component uses the new design, updated payment methods icons
and WCPay logo.

* Add changelog

* Upgrade the WCPay payments settings banner

* test: Fix WCPay payments settings banner tests

* Update the WCPay welcome page to use the WCPayConnectCard component

* Update the Payments task page to use the WCPayConnectCard component

* Fix copy for payments settings methods CTA buttons label

* Add changelog

* Further cleanup of no-longer-used WCPay surfaces

* Consolidate onboarding component icons for single sources

* Minor cleanup

* test: Fix WCPay payments settings banner test

* test: Fix payments tasks page tests
2024-04-24 21:41:40 +03:00
Seghir Nadir 2054353f91
Add hooks when reading and writing additional fields (#46870)
* add new filters for reading and writing fields

* rename functions

* add test for action

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

* update docs

* fix typo in test and linting issues

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-24 17:38:15 +02:00
Albert Juhé Lluveras 738bbb0078
Move logic to hide Template selector in Shop page into Product Catalog class and add e2e test (#46405)
* Move logic to hide Template selector in Shop page into Product Catalog class

* Add changelog file

* Update plugins/woocommerce-blocks/tests/e2e/tests/templates/shop-page.block_theme.spec.ts

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Update plugins/woocommerce-blocks/tests/e2e/tests/templates/shop-page.block_theme.spec.ts

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Fix linting

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-04-24 15:57:02 +02:00
Seghir Nadir 0f621c8977
get settings in correct format for Local Pickup (#46799)
* get settings in correct format

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

* expand test to also account for frontend

* remove added test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-24 15:22:36 +02:00
Albert Juhé Lluveras c59dcbe925
Create update_template_data util and formatting improvements (#46408)
* Create update_template_data util

* Fix comment typo

* Formatting

* Remove unnecessary use of BlockTemplateUtils

* Add changelog file

* Create update_template_data util (II)
2024-04-24 14:57:18 +02:00
Jorge A. Torres 573fe6e612
Fix order counts in status widget for sites with Redis object cache (#46860)
* Use non-persisent 'counts' group for order count cache

* Add changelog

* Apply suggestion
2024-04-24 10:30:31 +00:00
Matt Sherman 955786affc
Product Editor: Add ability to check if product editor made REST request (#46741)
* Add apiFetch middleware to add X-Wc-Product-Editor header to all requests from product editor

* Use productEditorHeaderApiFetchMiddleware

* Update name of header

* Utility function to check header

* Changelog

* Changelog
2024-04-24 06:24:09 -04:00
Ilyas Foo 27e4b07074
Wrap LYS templates and patterns under feature flag (#46856)
* Add feature flag for site editor templates and patterns for coming soon

* Changelog

* Lint

* Fix classic themes
2024-04-24 17:44:35 +08:00
Néstor Soriano 70f49bb389
Add a warning text about the incompatibility of the legacy REST API and HPOS (#46841)
* Add warnings about the incompatibility of the legacy REST API and HPOS:

- A static text in the features settings page, in the HPOS section,
  if the legacy REST API is active.
- A dismissable admin notice that is created at install/update time
  only if both HPOS and the legacy REST API is active
  (it's removed automatically when one of the two ceases to be active)

This covers both the legacy REST API being active in core and the
legacy REST API plugin being installed and active.

* Add changelog file

* - Remove the admin notice (will be added by the Legacy API plugin)
- Add the woocommerce_legacy_api_and_hpos_incompatibility_warning_text filter

* Fix misplaced line feed
2024-04-24 14:59:02 +05:30
Alba Rincón e20641341d
[CYS] Fix AI generated site title comparison (#46819)
* Fix AI generated site titles comparisons

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

* Fix lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-24 10:49:20 +02:00
Jonathan Lane a6fe8ef3ff
Fix flaky e2e tests (#46845)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-04-24 11:26:16 +03:00
Alba Rincón 5bc0a2c8b1
[CYS] Fix logo position after saving on the assembler (#46833)
* Fix logo position after saving on the assembler

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

* Fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-24 09:34:09 +02:00
RJ a0701f6ea5
fix: removed live explat test (#46818) 2024-04-24 16:51:49 +10:00
Fernando Marichal eab9d115d4
Enable "Custom Fields" feature flag for by default (#46832)
* Enable "product-custom-fields"

* Add changelog
2024-04-24 03:12:06 -03:00
RJ b3e7c62914
update: lys feature flag off (#46852) 2024-04-24 02:22:38 +00:00
Adrian Moldovan d57ff87cb3
[e2e tests] Fix blocks tests failing with Gutenberg active (#46842)
* Fix plugin slug for reporting

* Comment out setting of woocommerce_coming_soon

* Add canvas utility

* Update create-cart-block.spec.js to use canvas instead of page

* Update create-checkout-block.spec.js to use canvas instead of page

* Extract common editor actions into editor utils

* Add changelog

* Update post and page creation tests to use canvas

* Update create-woocommerce-blocks.spec.js to use canvas

* Activate Gutenberg to test changes

* Remove plugins listing from env setup script

* Fix eslint errors

* Remove redundant env setup script call

* Install Gutenberg for test in CI

* Test with Gutenberg

* Remove Gutenberg

* Fix block editor variable product test

* Revert "Fix block editor variable product test"

This reverts commit cd004530a7.

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-04-23 13:38:19 -07:00
Luigi Teschio bc18547e81
CYS - AI flow: Replace recordEvent with trackEvent (#46823)
* replace recordEvent with trackEvent

* fix type

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

* Add tracking event

* fix implementation

* fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-23 19:38:06 +02:00
Luigi Teschio cce1e224ad
CYS - AI flow: keep persisted query param when redirecting (#46820)
* CYS - set flowType when the state machine is instantiated

* remove not necessary code

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

* fix action

* improve logic

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

* CYS - AI Flow: hide X button on the entrepreneur flow

* CYS - AI flow: keep persisted query param when redirect

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-23 15:52:29 +00:00
Thilina Pituwala dae1c963da
Remove red badge on extensions menu when the site is not connected (#46807)
* Allow having two different in-app connect messages based on WooCommerce.com Update Manager installation status.

* Revert to older message.

* Update connect message icon.

* Prevent showing the red badge when site is not connected.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-23 15:38:11 +00:00
Seghir Nadir 742cbbda9d
Graduate Additional Fields to stable and rename it. (#46805)
* graduate woocommerce_blocks_register_checkout_field

* graduate filters

* Migrate Additional to Order and Other

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

* fix markdown lint

* update tests to use old value

* fix lint issue

* pass field options by reference

* update test helpers

* update tests to use latest api

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-23 16:47:32 +02:00
Seghir Nadir 0f4e675fb5
Correctly serialize data in additional fields API (#46762)
* fix data sanitization on session

* add changelog
2024-04-23 15:34:31 +02:00
Bart Kalisz 190c972332
Blocks: Isolate performance tests from e2e tests (#46773)
* Isolate (cart) performance tests from e2e tests

* Add changelog entry
2024-04-23 13:11:46 +02:00
Seghir Nadir fc31f0c77d
Be less aggressive on selected shipping rate logic for Checkout block (#46719)
* be less aggressive on selected shipping rate logic

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-23 13:03:46 +02:00
Luigi Teschio 25fae0cc27
CYS - AI Flow: hide X button on the entrepreneur flow (#46800)
* CYS - set flowType when the state machine is instantiated

* remove not necessary code

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

* fix action

* improve logic

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

* CYS - AI Flow: hide X button on the entrepreneur flow

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-23 10:27:32 +00:00
Néstor Soriano 37beab9364
Allow enbling HPOS when the only incompatible plugin is the Legacy REST API one (#46634) 2024-04-23 12:19:29 +02:00
Sam Seay 97595ce95d
Fix crashes in mini-cart by externalizing the wc types package. (#46814) 2024-04-23 20:18:37 +12:00
Luigi Teschio 2ae56b2de2
CYS - set flowType when the state machine is instantiated (#46528)
* CYS - set flowType when the state machine is instantiated

* remove not necessary code

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

* fix action

* improve logic

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

* remove not necessary guards

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-23 10:12:35 +02:00
Paul Sealock b9a1b67991
[LYS] Reapply styles from 46619 (#46813)
* copy styles over from 46619

* Fix header padding

* login/out

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

* typo

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-23 19:26:35 +12:00
Paul Sealock 89c330f03e
[Launch Your Store] Use Block to handle template styles (#46751) 2024-04-23 16:07:56 +12:00
Adrian Moldovan a33078ba6b
[performance metrics] Use engines.pnpm version when setting up the environment (#46787) 2024-04-22 12:34:28 -05:00
Jorge A. Torres 05fed19271
Move all HPOS CLI tools to the "hpos" namespace (#46766)
* Deprecate CLI tools in the “cot” namespace

* PHPCS fixes

* Add changelog

* Restore a few args for backwards compatibility
2024-04-22 14:24:40 +01:00
Gan Eng Chin 3ac3a497ba
Change "Origin" column name to "Attribution" in Orders Analytics (#46760)
* Change "Origin" column name to "Attribution" in Analytics.

* Rename "Origin" column to "Attribution" in Orders Analytics report download.

* Add changelog.
2024-04-22 21:20:30 +08:00
Gan Eng Chin c595717d16
Fix "Add a filter" UI issue in Analytics (#46750)
* Fix UI for add filter popover in Analytics.

* Make character casing consistent for filters.

* Add changelog.

* Add changelog.

* Change filter label to sentence case.
2024-04-22 21:15:22 +08:00
Alba Rincón efbce912c5
[CYS] Remove `Save` button from inside the different sections (#46526)
* Remove save button, rename done button and fix tests

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

* Fix error

* Fix lint errors

* Fix more lint errors

* Fix done button tests

* Add missing awaits

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-22 14:26:57 +02:00
Ilyas Foo ecb48cc0fb
Replace LYS coming soon override to use template include filter and handle 404 gracefully (#46667)
* Hide woo breadcrumb

* Update coming soon entire site style

* Update style

* Fix wp group block

* Change coming soon template to use template_include instead

* Changelog

* Change to add_filter

* Proper handling for non-FSE themes

* Update comments

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-04-22 17:54:48 +08:00
Chi-Hsuan Huang b9ea5bacd8
Fix back from CYS via LYS goes to Home, not LYS (#46665)
* Add goBack action to customize-store

* Add changelog

* Add __experimentLocationStack to history

* Update customize-store goBack action

* Rename __experimentalLocationStack
2024-04-22 21:26:32 +12:00
kkmuffme 118932d2ee
Skip loading of webhooks if webhooks disabled (#46057)
* Skip loading of webhooks if webhooks disabled

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

* PHP CS fix.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2024-04-22 14:24:56 +05:30
Kyle Barrow d612e893ff
Prevent fatal error on the Status page when the log directory contains an unreadable directory (#46709)
Add flag to RecursiveIteratorIterator to prevent fatal error on Woocommerce Status page when system tmp folder includes unreadable directories
2024-04-22 10:52:48 +02:00
Jorge A. Torres 24a9b8c771
Remove HPOS entries from Tracker and WC status that are no longer in use (#46239)
* Remove unused HPOS props from WC_Tracker and status screen

* Add changelog

* Fix tests
2024-04-22 12:49:07 +05:30
Barry Hughes 99be7b960b
Adjust labelling of refund line items in refund emails and order summaries. (#45455) 2024-04-22 12:45:43 +05:30
Mayisha de3bc938d2
Fix breadcrumb back icon color to follow the admin theme color (#40106)
* prevent breadcrump back icon from being converted to an image

* add changelog file
2024-04-22 12:31:00 +05:30
Mayisha 2f29ef8a5a
Replace pink with WooCommerce purple in reports and ratings (#40243)
* replace pink with wc purple in reports page

* use wc purple in product rating in the dashboard widget

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

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

* use better contrast

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-22 12:30:25 +05:30
RJ fd52f18f6b
Move LYS coming soon initialization to core profiler flow (#46708)
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-04-22 14:49:59 +08:00
Bart Kalisz 007a4238c3
Blocks E2E: Provide correct expected translation (#46756) 2024-04-20 13:23:55 +02:00
Adrian Duffell 073d0eb59d
LYS copy updates (#46668)
* lys blurb

* Add constants for docs

* Store mode copy

* Private link copy

* Coming soon message

* Bug fix
2024-04-20 00:02:53 +00:00
Leif Singer d1be68b88c
Update @woo.com email addresses to @woocommerce.com (#46387)
* update @woo.com email addresses

* update %40woo.com email address

* add changelog file

* update docs manifest
2024-04-19 21:11:01 +00:00
Nathan Silveira ea96bea77e
Highlighting text in the product's description of the new product editor is not visible inside editor (#46728)
* Enqueue global presets css while loading the new product editor

* Change from gutenberg to wp prefix
2024-04-19 13:47:13 -03:00
Fernando Marichal d21b03588a
Add E2E tests to cover Publish dropdown options (#46658)
* Add e2e tests for publish options

* Add changelog

* Create different tests for options

* Update plugins/woocommerce/tests/e2e-pw/tests/merchant/products/block-editor/product-edit-block-editor.spec.js

Co-authored-by: louwie17 <lourensschep@gmail.com>

---------

Co-authored-by: louwie17 <lourensschep@gmail.com>
2024-04-19 10:46:32 -03:00
Justin Palmer 2d71790b72
Avoid JS errors if Sourcebuster library isn't loaded (#46723)
* Don't initialize or handle data if SBJS isn't loaded
2024-04-19 12:24:10 +02:00
Panos (Panagiotis Synetos) afc471d0ed
[LYS] Fix deprecation error with lowercase $user->id (#46747)
👌 Use uppercase $user->ID and some text updates
2024-04-19 13:17:14 +03:00
Chi-Hsuan Huang b575fd580e
Apply styles to Coming soon entire store regardless of theme (#46619)
* Hide woo breadcrumb

* Add deregistration of unnecessary styles for the coming soon page in ComingSoonRequestHandler.php

* Update coming soon entire site style

* Add fonts

* Add changelog

* Update style

* Fix wp group block
2024-04-19 08:00:49 +00:00
EngHell 05a728ff03
performance: checks fo $this->data_synchronizer->data_sync_is_enabled… (#46616)
* performance: checks fo $this->data_synchronizer->data_sync_is_enabled() before executing $this->data_synchronizer->get_sync_status()

* Update plugins/woocommerce/src/Internal/Utilities/COTMigrationUtil.php

Fix code style issues

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

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-04-18 15:59:18 -07:00
Gan Eng Chin 48f2a4c5ad
Display "Origin" column in Orders table in Orders Analytics (#46424)
* Display channel column in Orders Analytics UI.

* Set $data to false to not use cache.

For development purpose.

* Get channel info from order meta and put into extended_info.

* Set channel in order item level.

* Replace channel with get_origin_label in extended_info.

* Remove unnneeded channel in orders_data.

* Display origin instead of channel in table.

* Fix lint errors.

* Query order meta table based on HPOS.

* Remove code for development purpose.

* Add changelog.

* Fix code comment.

* Guard against null values.

`_wc_order_attribution_utm_source` can be null when the order is created via web admin.

* Set default origin label to "Unknown".

This default is the same as found in `output_origin_column` function in plugins/woocommerce/src/Internal/Orders/OrderAttributionController.php.

* Support server side report download.

This is needed when there are more than 25 records in the Orders Analytics report.

* Fix failed test.

* Fix lint error.

* Simplify code.

We loop through $orders_data instead of $order_attributions data. This is because $order_attributions may not have attributions data for some orders.

By looping through $orders_data, it would automatically cater for "Unknown" data from get_origin_label function call, and we don't need to specify "Unknown" as default value for origin.

* Change "channel" to "attribution" object in controller.

This is because we need more than one piece of information, so we need it to be an object with properties like `origin`, `device` etc.

Co-authored-by: Kader Ibrahim S <kader.ibrahim.s@a8c.com>

* Change `origin` string to `attribution` array in Orders DataStore.

Co-authored-by: Kader Ibrahim S <kader.ibrahim.s@a8c.com>

* Change origin string to attribution object.

* Fix indexing after changing from origin string to attribution object.

* Change from origin string to attribution object in table.js.

* Simplify code.

To make code shorter and easier to read, instead of long horizontal code.

* Fix lint errors.

* Fix failed test.

* Fix lint error.

* Fix retrieving origin in CSV export.

* Use $wpdb->postmeta; cosmetic change.

Co-authored-by: Kader Ibrahim S <kader.ibrahim.s@a8c.com>

* Cosmetic change.

Co-authored-by: Kader Ibrahim S <kader.ibrahim.s@a8c.com>

* Sanitize order IDs by using absint.

Co-authored-by: Kader Ibrahim S <kader.ibrahim.s@a8c.com>

---------

Co-authored-by: Kader Ibrahim S <kader.ibrahim.s@a8c.com>
2024-04-18 16:16:26 +00:00
Leif Singer 2d837ac687
Fix: update REST API v3 reports/orders/totals endpoint to be compatible with HPOS (#46715)
* add a failing test for order totals with HPOS enabled but sync disabled

* fix comment

* ensure the wc/v3/reports/orders/totals endpoint is compatible with HPOS

* add changelog file

* address linter issues
2024-04-18 15:49:19 +00:00
Seghir Nadir af53de9aaa
Fix E2E search string for Cart block shipping tests (#46720)
* Fix E2E search string for Cart block shipping tests

* add changelog

* update to uppercase

* fix test

* fix test one last time

* fix lint
2024-04-18 17:13:49 +02:00
Raluca Stan f165667632
Prevent checkout blocks breakage for stores using similar number separators (#46241)
* Add a safety check for the numbers with the same value for the separators

This case breaks the library we are using for number formatting. This is not documented on their end and can't be fixed by passing a different configuration.
We are fixing it on our end by overwriting the thousand separator.
This change will only surface in the checkout blocks, at they are the only blocks doing formatting via React (the products blocks use php).
This will not apply to the order confirmation.
This change is preventing a fatal error thrown by the library and allowing users to see the content of the cart.
It's an edge case, because it happens only why people have the same values for the separators, which is an non-standard way to format.

* Add unit tests and changelog

* Add a safety check for the numbers with the same value for the separators

This case breaks the library we are using for number formatting. This is not documented on their end and can't be fixed by passing a different configuration.
We are fixing it on our end by overwriting the thousand separator.
This change will only surface in the checkout blocks, at they are the only blocks doing formatting via React (the products blocks use php).
This will not apply to the order confirmation.
This change is preventing a fatal error thrown by the library and allowing users to see the content of the cart.
It's an edge case, because it happens only why people have the same values for the separators, which is an non-standard way to format.

* Add unit tests and changelog

* Improve tests

* "Improve tests"
2024-04-18 15:17:30 +03:00
Chi-Hsuan Huang ea27c1f364
[LYS] Regenerate share key on the fly (#46662)
* Add logic to regenerate the share key if it's not set in LaunchYourStore.php

* Add changelog

* Use add_option directly
2024-04-18 19:39:23 +12:00
Nathan Silveira 5e7962af67
Fix pages not being scrollable on variations on the new product editor (#46700) 2024-04-18 04:16:31 -03:00
Chi-Hsuan Huang da5272497d
Fix LYS success page shown but Task not crossed off (#46663)
* Add useDispatch hook and ONBOARDING_STORE_NAME import in Congrats.tsx

* Add changelog
2024-04-18 10:29:07 +12:00
Ilyas Foo d2c4490c92
Fix deprecated error message for LYS in PHP 8.1 environment (#46661)
* Fix deprecated error with strlen when using PHP 8.1

* Changelog
2024-04-18 05:45:13 +08:00
Thomas Roberts 9e0fab4ebc
Reset shipping rate font size to match other elements (#46345) 2024-04-17 13:54:43 -07:00
nigeljamesstevenson f10cc1af4e
Update stable tag to 8.8.2 (#46698)
woorelease: Update stable tag to 8.8.2
2024-04-17 18:03:08 +01:00
Fernando Marichal fd521fb338
Convert the downloable checkbox into a toggle (#46693)
* Convert downloable checkbox into a toggle

* Add changelog
2024-04-17 13:53:53 -03:00
Bart Kalisz 8da0396b34
Blocks E2E: Fix basic role-based tests (#46684) 2024-04-17 18:50:37 +02:00
Jonathan Lane 87ac3d2c85
Add stalebot for flaky e2e test reporter (#46585)
* Add flaky test reporter for flaky e2e test reporter

* Add to stalebot workflow instead

* Update stale action to 9 for node 20

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-04-17 11:03:12 -03:00
Ron Rennick f51d6fe652
fix js lint filename pattern matching (#46605)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-04-17 16:55:52 +03:00
Jonathan Lane 9888ee7f4b
Updated deprecated gh-script action to node 20 variant (#46673)
* Updated deprecated gh-script action to node 20 variant

* Minor change in e2e test to trigger CI

* Revert e2e test change

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-04-17 12:31:16 +01:00
Gan Eng Chin 6e78a1c6ca
Remove unneeded empty "Unknown" code handling in Order Attribution (#46654)
* Remove empty "Unknown" handling.

This is because `get_origin_label` would return "Unknown" by default, and therefore empty($origin) would not be true.

If someone use a wc_order_attribution_origin_formatted_source filter to return '' as the formatted source, we should respect it anyway and we should not override it with "Unknown".

* Add changelog.
2024-04-17 19:28:09 +08:00
Prahesa Kusuma Setia 1fddbb1001
Add notice to connect to woocommerce.com in wc settings and marketplace (#45536)
* add a woo.com connect notice in the plugin list for unconnected store

* add an extra notice string for store that runs outdated woo plugins

* add connect page hyoerlink to the plugin notice

* add changelog

* add comment for maybe_show_connect_notice_in_plugin_list()

* fix linter error

* use installed local woo plugin as the counter of extra notices

* only show woo connect notice in the woocommerce settings page

* add woocom connect notice component

* add woocom connect notice component to the content component

* add extra notice in the woocom connect notice component based on the local woo plugins count

* persist dismissal of woo connect notice in the wc admin settings page

* update changelog

* use update-check-public for unconnected stores

* use information from update-check-public API to determine notice show logic

* re-show dismissed connect woocom notice after 1 month

* add re-show notice logic for react admin page of woo connect notice

* fix identation

* differentiate local storage key for notice dismissal

* move woo connect notice script to different file

* rename to connectnotice

* fix linter issue

* fix linter issue

* update woo.com to woocommerce.com

* update woo.com to woocommerce.com in comment

* capitalize the WooCommerce.com

Co-authored-by: Leif Singer <leif@automattic.com>

* capitalize WooCommerce.com

---------

Co-authored-by: Leif Singer <leif@automattic.com>
2024-04-17 10:13:24 +00:00
louwie17 c0424210ab
Add safety check for rare fatal case with subscription note (#46472)
* Add safety check for rare fatal case

* Change to is_object check
2024-04-17 07:05:34 -03:00
Alex Florisca 3089b1888e
Refactor the Order Summary of the Cart & Checkout blocks (#46386)
* Added new OrderSummaryTotals Block

* Refactor order summary and totals block to contain the inner children

* Add migration for Order Summary Block

* Migration to handle older order summary without totals block

* Remove empty lines from order summary migration

* block editor migration for order summary

* Fix isEligible function

* Update Totals title

* Add checkout totals

* Remove echos and dies

* replace individual checkout blocks with totals block

* Change parent of totals inner blocks and add totals block to innerBlockAreas map

* change CART_ORDER_SUMMARY_TOTALS to CHECKOUT_ORDER_SUMMARY_TOTALS

* Fix linting issues

* fix lint warnings

* Add  changelog

* Lock movement of the taxes block in attributes.tsx

* Less indentation in the render function of CartOrderSummaryBlock and CheckoutOrderSummaryBlock

* Rename webpack chunkName for order summary totals
2024-04-17 10:28:30 +01:00
Moon 87868097d2
Add dismiss button to coming soon banner (#46149)
* Add coming_soon page as a store page

* Implement coming soon banner dismiss

* Added a new REST for Launch Your Store with a dismiss endpoint

* Updated coming soon banner logic to check for woocommerce_coming_soon_banner_dismissed

* Lint fixes

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

* Update plugins/woocommerce/src/Admin/API/LaunchYourStore.php

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update plugins/woocommerce/src/Admin/API/LaunchYourStore.php

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update plugins/woocommerce/src/Admin/API/LaunchYourStore.php

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Use user meta to save woocommerce_coming_soon_banner_dismissed

* Lint fixes

* Use the built-in rest api to manage woocommerce_coming_soon_banner_dismissed user meta

* Reset woocommerce_coming_soon_banner_dismissed on login

* Fix lint issues and add back wp_login hook to reset banner dismiss user meta

* Use constant for user meta field

* Update woocommerce_coming_soon_banner_dismissed user meta when X button is clicked

* Restrict user meta to shop manager or admin

* Fix lint issue

* Fix lint issue

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-04-17 12:26:42 +12:00
github-actions[bot] ec80c8d641
Delete changelog files based on PR 46642 (#46653)
Delete changelog files for 46642

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-04-16 17:18:33 +01:00
Maikel Perez 27b1605a3f
[CFT Custom fields] Fix copy and link (#46640)
* Fix the link in the custom field helper test

* Fix tooltip copy

* Add tracking events

* Add changelog files
2024-04-16 13:09:22 -03:00
Gan Eng Chin efa43d9fcf
Remove unused "No order source data available." message (#46648)
* Remove unused "No order source data available." message.

* Add changelog.
2024-04-17 00:05:10 +08:00
github-actions[bot] f0dfc87b44
Delete changelog files based on PR 46630 (#46651)
Delete changelog files for 46630

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-04-16 16:58:50 +01:00
Paulo Arromba 77f7b6162b
Set access modifier for $error_message to public and added a setter method (#46642)
* Set access modifier for $error_message to public and added a setter method.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-16 16:55:02 +01:00
Fernando Marichal e8a2c20914
[Enhancement]: Implement Lazy Loading inside ProductPage component (#46601)
* Improve fcp

* Add spinner

* Add changelog
2024-04-16 12:15:47 -03:00
Leif Singer c973ff93c0
Fix Woo.com reference in the Inbox during onboarding (#46600)
* Fix: Woo.com Reference in the Inbox During Onboarding

* add changelog file

* fix linting error
2024-04-16 17:01:30 +02:00
Raluca Stan 466b3a8d06
Can only be inserted once test excludes the mini-cart template button (#46478)
* Can only be inserted once test excludes the mini-cart template button

* Use function for testing disabled state

* Account for blocks advertise and change selector
2024-04-16 17:15:38 +03:00
Fernando Marichal 25eafffcae
Fix duplicate product endpoint args for item schema (#46551)
* Fix endpoint args for item schema

* Add tests

* Add changelog
2024-04-16 11:13:12 -03:00
And Finally eb75902c4c
Fix marketplace promotions action scheduler (#46630)
* Defensive coding for when `as_has_scheduled_action` Action Scheduler function is not defined.

* Changelog.
2024-04-16 14:08:39 +01:00
Thomas Roberts ab60527d6b
Update `PackageRates` component to show single rates as a radio button (#46284)
* Show a single shipping option as radio button

* Add changelog

* Update unused dependency
2024-04-16 13:39:55 +01:00
Luigi Teschio 7d41472206
[Blocks]: remove skipped tests (#46594)
* remove skipped tests

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-16 11:26:58 +02:00
Thomas Roberts fb481bdce5
Increase shipping/payment borders to prevent half pixel issues on high-resolution screens (#46525)
* Replace pixel box shadow with em to prevent half pixels

* Add changelog

* Apply 2px border

* Make padding around shipping options bigger
2024-04-16 09:50:54 +01:00
Moon 92dcb889b4
Render site visibility setting only when launch-your-store feature flag is on (#46622)
* Render site visibility only when launch-your-store feature flag is on

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-16 16:48:59 +12:00
RJ 1885f0af60
fix: cookie path in private link sharing (#46571)
* fix: cookie path in private link sharing

The commit includes a fix for the LYS private link woo-share cookie entry. The path for setting the cookie has been corrected to ensure proper functionality. T

* lint
2024-04-16 15:13:39 +12:00
Chi-Hsuan Huang f1bdbec656
Update coming soon page link to template editor (#46566)
* Update coming soon page link to template editor

* Add changelog

* Hide coming soon link when current theme is classic theme

* Remove line change

* Add type
2024-04-16 14:36:43 +12:00
Paul Sealock 6116f01dc7
[LYS] Allow login pages to work in Coming soon mode (#46569) 2024-04-16 12:46:11 +12:00
Paul Sealock f5a4cd05dd
[LYS] Remove Coming Soon page and id (#46561) 2024-04-16 12:02:18 +12:00
Wesley Rosa fed46ed1e7
Adding support for co-branded credit cards (#45903) 2024-04-15 22:59:05 +01:00
Michael Pretty aa52be1ee7
Only query order meta for orders that were successfully retrieved from the DB. (#45544)
* Only query order meta for orders that were successfully retrieved from the DB.

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

* Address linting issue

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-04-15 21:37:47 +01:00
Luigi Teschio a8e84d8c8b
CYS - fix use GPT 3.5 model (#46544)
* CYS - fix use GPT 3.5 model

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

* use constant

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-15 18:33:16 +02:00
nigeljamesstevenson 9f9d0268cd
Update stable tag to 8.7.0 (#46598)
woorelease: Update stable tag to 8.7.0
2024-04-15 16:37:29 +01:00
Gan Eng Chin 6caed10ba3
Fix code typo in Orders Analytics (#46487)
* Fix code typo in Orders Analytics.

* Add changelog.
2024-04-15 23:01:43 +08:00
nigeljamesstevenson 1f065a22f1
Update stable tag to 8.8.1 (#46596)
woorelease: Update stable tag to 8.8.1
2024-04-15 16:00:12 +01:00
Michael Pretty 4a9238dfd7
Fix/46128 check cached order id before get order return (#46393)
* Verify Order is valid before returning it from the OrderFactory

* Add tests to validate fix when using serializing object cache implementation

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
2024-04-15 16:13:20 +02:00
Fernando Marichal a32433ce1c
Fix some e2e tests for linked products (#46506)
* Fix some e2e tests for linked products

* Add changelog
2024-04-15 10:59:30 -03:00
Chintesh Prajapati 0704db9af9
Fix: Remove Unused Variable 'discount_amount_html' (#46437)
* Update wc-cart-functions.php

Unused local variable 'discount_amount_html'. The value of the variable is overwritten immediately.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-15 15:19:39 +02:00
Brent MacKinnon 8fc82e9bfd
Fix broken links from issue #46336 (#46381)
* Fixing broken links

* Update docs/payments/payment-gateway-api.md

Co-authored-by: Leif Singer <leif@automattic.com>

* Update docs/contributing/common-issues.md

Co-authored-by: Néstor Soriano <konamiman@konamiman.com>

* Update docs/payments/payment-gateway-api.md

Co-authored-by: Leif Singer <leif@automattic.com>

* Update writing-high-quality-testing-instructions.md

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

* ignore MD029 rule (1/2/3) as the linebreaks that are needed for the code block confuse its numbering

* update the docs manifest

`pnpm utils md-docs create docs woocommerce -o docs/docs-manifest.json`

---------

Co-authored-by: Leif Singer <leif@automattic.com>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Leif Singer <git@singer.sh>
2024-04-15 14:30:37 +02:00
Ron Rennick d69a36b1d5
Remove follow-redirects from dev dependencies (#46503)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-04-15 12:00:02 +01:00
Prahesa Kusuma Setia b27cfc7c87
Show notice to connect to woocommerce.com in plugin update message for unconnected stores (#46082)
* woo plugins use public endpoint for unconnected stores, show message to connect to woo.com as well

* add changelog

* fix lint error

* fix lint error

* fix lint error

* fix lint error

* move is site connected check outside the loop

* add condition to show the notice when site is connected and plugin is active

* update domain to woocommerce.com
2024-04-15 07:59:34 +01:00
Chi-Hsuan Huang 9a288fb4c2
Fix coming soon page fatal error with non-FSE theme (#46570)
* Fix fatal error with non-fse theme

* Update conditional inclusion of header and footer templates in coming-soon-store-only.php

* Update conditional inclusion of header and footer templates in ComingSoonRequestHandler.php

* Remove add_theme_support( block-template-parts );

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-15 16:26:18 +12:00
Chi-Hsuan Huang fcfec4000e
Fix admin header page title (#46450)
* Fix admin header page title

* Add changelog

* Refactor page title logic in header/index.js and Loader.php

* Fix test
2024-04-15 02:46:09 +00:00
Adrian Duffell 6486c26d76
Add exclusion for users with private link (#46465)
* Add exclusion for users with private link

* Remove unused private function

* Fix lint issues

* Add changelog

* Update sanitization method

sanitize_key converts to lowercase

* Fix lint issue
2024-04-15 11:57:02 +12:00
Paul Sealock 5e8644d7a5
[LYS] Try single coming soon template (#46508)
* Create single coming soon template

* add template/template too

* delete comment

* Adjust redirect logic

* CSS selectors

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

* fix titles

* Skip tests

* lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2024-04-14 22:49:41 +12:00
Adrian Moldovan bed3124b8d
[testing workflows] Fix the plugins setup for daily e2e runs (#46511)
* Move daily site check workflow to deprecated

* Add install-plugin script

* Install plugins script

* Fix the script path, it was moved.

* Set env on job level

* Update working-directory

* Add changelog

* Use the right WC_SUBSCRIPTIONS_REPO variable

* Add a test channel id

* Update smoke-test-daily.yml

* Remove WC Subscriptions

* Update smoke-test-daily.yml

* Switch back the channel ID and remove pull_request trigger
2024-04-13 10:12:48 -07:00
Adrian Moldovan 188d46f095
[e2e tests] Fix command palette tests failing with Gutenberg installed (#46407) 2024-04-12 15:39:52 -03:00
Ron Rennick 4fa2e3822c
Update the monorepo to node v20 (#45148)
* test bumping node to v18

* remove community contributor condition from review assignment

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai

* bump node to v20

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/admin-e2e-tests, packages/php/remote-specs-validation, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai

* add blocks eslint-plugin-woocommerce to project workspace

* add e2e-environment as a peer to e2e-utils

* restore version on @woocommerce/api

* update lock file

* move e2e-environment to devDependencies

* add undefined location check to admin js test

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-12 13:49:55 -03:00
Adrian Moldovan 1fee0439d3
[testing workflows] Move metrics job to ci.yml (#46471)
* Move deprecated workflows to deprecated folder

* Configure new test job for metrics

* Add changelog

* Update start command

* Update start command

* Archive metrics results

* Fix script path

* Fix name in archive results condition

* Add the actual run command for pull_request event

* Run with pnpm --filter

* Test run for push event

* Revert test conditions

* Add WP_ARTIFACTS_PATH env variable

* Update path to readme.txt

* Revert github event conditions

* Add CODEVITALS_PROJECT_TOKEN env

* Set WP_ARTIFACTS_PATH on job level

* Add blocks templates in the changes list
2024-04-12 11:46:01 -03:00
Ilyas Foo 395a70756a
Fix K6 performance tests with LYS feature turned on (#46539)
* Set woocommerce_coming_soon option to no when setting up performance E2E

* Changelog
2024-04-12 15:14:48 +01:00
Oleksandr Aratovskyi 5bcbb52a9b
Remove BNPL (Klarna) apm and fix icons on wcpay welcome page (#46523)
* Update payment method icons

* Use latest payment methods icons on wcpay weclome page

* Style payment icons on wcpay welcome page similarly to connect page

* Remove BNPL from wcpay welcome page additional payment methods

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

* Fix warnings on CB payment method

* Fix lint error

* Change discover icon to new

---------

Co-authored-by: oaratovskyi <oleksandr.aratovskyi@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-12 17:07:12 +03:00
Nathan Silveira 450b06a1e1
Always use productTemplateId when available and use editedRecord in useEntityRecord hooks (#46395)
* Use editedRecord instead of record

* Always use productTemplateId when available

* Change private methods to protected in ProductVariationTemplate

* Use editedRecord in hook useEntityRecord

* Update changelogs

* Restore attribute renamed by mistake

* Change useProductTemplate unit test
2024-04-12 10:16:35 -03:00
Adrian Moldovan d8ffca8d40
Revert "Update phpcs to squizlabs/php_codesniffer" (#46524)
* Revert "Update phpcs to squizlabs/php_codesniffer (#46350)"

This reverts commit 01f9880387.

* php file test change

* Revert test php file change
2024-04-12 10:12:35 -03:00
rodelgc b73de2ae4a
k6 perf tests: Add assertions for the "Shop" page title and product headers. (#46469) 2024-04-12 15:04:45 +03:00
rodelgc 522c8893a5
Add checks for page title and footer (#46485) 2024-04-12 15:01:39 +03:00
Luigi Teschio 8653d4c4fe
Blocks - E2E: Fix visibility store (#46521)
* Blocks - E2E: Fix visibility store

* add changelog
2024-04-12 11:26:12 +00:00
RJ 2bd388057f
add: lys hub tracks (#46462)
* add: lys hub tracks

* moved tasks object up
2024-04-12 18:36:56 +08:00
Adrian Duffell 41b6310e3d
Remove Launch Your Store Feature Flag (#46510)
* Enable launch-your-store feature flag

* Add changelog
2024-04-12 16:13:42 +08:00
Jonathan Lane 2d1ba5f7c4
A number of fixes for some of the top flaky e2e tests (#46494)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-04-12 08:53:21 +03:00
Adrian Moldovan 349f09151a
Add JS lint scripts for woocommerce plugin (#46214) 2024-04-12 07:30:17 +03:00
And Finally 63443b502d
Add clause to `CustomMetaDataStore::get_meta_keys` query to exclude empty order meta keys (#46476)
* Add clause to query in `CustomMetaDataStore::get_meta_keys` to exclude metas where the key is ''.

* Addressing linter error. Removed unnecessary prepare.
2024-04-11 17:24:35 +01:00
Ron Rennick c6048b5c49
Add glob, rimraf, and uuid to Syncpack (#46278)
* add uuid to syncpack

* add rimraf to syncpack

* add glob to syncpack

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/product-editor, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/integrate-plugin, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/components, @woocommerce/block-templates, @woocommerce/ai, @woocommerce/admin-layout, @woocommerce/admin-e2e-tests, woocommerce

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-11 12:52:49 -03:00
Ron Rennick 01f9880387
Update phpcs to squizlabs/php_codesniffer (#46350)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-04-11 12:52:26 -03:00
Paul Sealock b9a1f97420
[LYS] Coming Soon template layout changes (#46403)
* Update template tweaks

* Blockify the gaps

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

* Update banner styles

* vertical center

* 500 weight on login

* Update login/logout button font-weight

* Revert "Update login/logout button font-weight"

This reverts commit b985d2a0f6.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-11 20:01:56 +08:00
github-actions[bot] ea2becadaf
Delete changelog files based on PR 46429 (#46474)
Delete changelog files for 46429

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-04-11 19:20:03 +08:00
Chi-Hsuan Huang 7e759905e3
Tweak LYS sidebar styles (#46449)
* Tweak LYS sidebar styles

* Fix styles

* Remove setting link from lys hub description

* Fix lint
2024-04-11 09:32:31 +00:00
Karol Manijak de54195c3a
Enable Classic Template Products by Tag test (#46428)
* Enable Product Tag template test

* Add changelog
2024-04-11 08:58:01 +02:00
Jonathan Lane 084d10c0ba
Check shop page after page deletion (#46448)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-04-11 09:52:45 +03:00
Karol Manijak 7efd3d4652
Product Collection: break taxonomies filter into multiple menu items per each taxonomy (#46160)
* Split taxonomies filter into seperate filter per taxonomy

* Add changelog

* Improve onDeselect function

* Update tests

* Fix lint

* Satisfy TS by returning single React element rather than array of elements

* Remove unused variable
2024-04-11 08:13:42 +02:00
RJ 09b002cb50
add: lys prefetch congrats data (#46406) 2024-04-11 12:48:40 +08:00
Chi-Hsuan Huang 5a57525bd6
Make LYS preview frame resizable (#46327)
* Make LYS preview frame resizable

* Add changelog

* Refactor site-preview.scss: Remove components-resizable-box__container styles

* Set z-index to 2 to preview container to fix resizing handler on max size

* Make room for the handle on the left side
2024-04-11 11:06:00 +08:00
Adrian Duffell 2751023836
Display the coming soon page on front-end requests (#46223)
* Add coming soon helpers

* Add coming soon request handler

* Add coming soon init

* Remove empty file

* Add cache invalidator

* Add service provider inline docs

* Add changelog

* Add handling when woocommerce_coming_soon is deleted

* Add helper to get url from WP instance

* Typo fix

* Use the helper to get url

* Handle scenario where coming soon page is unavailable

* Skip admin exclusion test

* Update plugins/woocommerce/src/Internal/ComingSoon/ComingSoonRequestHandler.php

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-04-10 23:17:43 +00:00
Paul Sealock ef4ecd286a
[LYS] Coming Soon template tweaks (#46402)
* Update social link urls

* Align wide

* hide banner on Coming soon page

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-11 10:37:24 +12:00
Ron Rennick d94ed1a843
update makepot command to use include vs exclude (#46287)
* update makepot command to use include vs exclude

* add the changelog

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-04-10 14:59:47 -05:00
Fernando Marichal 618221e321
Remove periods at the end of section descriptions (#46346)
* Remove period after question mark

# Conflicts:
#	plugins/woocommerce/src/Internal/Features/ProductBlockEditor/ProductTemplates/ProductVariationTemplate.php
#	plugins/woocommerce/src/Internal/Features/ProductBlockEditor/ProductTemplates/SimpleProductTemplate.php

* Remove useless periods

# Conflicts:
#	plugins/woocommerce/src/Internal/Features/ProductBlockEditor/ProductTemplates/SimpleProductTemplate.php

* Fix comments

* Add changelog

* Fix comment

* Modify comment

* Fix comments
2024-04-10 16:04:30 -03:00
Nathan Silveira 3fb744313b
Add isSelectableByUser attribute to product templates (#46394)
* Add selectable attribute in product template to allow creation of product templates that do not appear on the "Change product type" UI

* Always use productTemplateId when available, otherwise fallback to standard-product-template

* Rename attribute

* Use editedRecord in hook useEntityRecord

* Revert "Always use productTemplateId when available, otherwise fallback to standard-product-template"

This reverts commit 2960fcd520.

* Revert "Use editedRecord in hook useEntityRecord"

This reverts commit c28e005e7b.

* Add changelogs

* Fix unit tests

* Increment changelog
2024-04-10 17:57:42 +00:00
Albert Juhé Lluveras 76bbd95db5
Fix wrong Shop title shown in classic themes after deleting the page (#46429)
* Fix wrong Shop title shown in classic themes after deleting the page

* Add changelog file

* Add explanatory comment
2024-04-10 19:45:34 +02:00
Alexandre Lara 87f31f8ed0
Bump eslint-import-resolver-typescript from 3.2.4 to 3.6.1 (#45910)
* Bump eslint-import-resolver-typescript from 3.2.4 to 3.6.1

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-10 13:54:12 -03:00
Alexandre Lara 060befe8e8
Bump dataloader from 2.1.0 to 2.2.2 (#45906)
* Bump dataloader from 2.1.0 to 2.2.2

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-10 12:14:04 -03:00
Roy Ho deef144a43
Add translation context to ambiguous words (#46382)
* Add translation context to ambiguous words

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-10 06:17:14 -07:00
Chi-Hsuan Huang 95b36650d7
Fix Launch Your Store task item should not be clickable once completed (#46361)
* Fix Launch Your Store task item should not be clickable once completed

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-10 20:32:15 +08:00
Chi-Hsuan Huang 0387404d7f
[LYS] Tweak site visibility settings page (#46365) 2024-04-10 18:56:03 +08:00
Thomas Roberts 255a45911c
Update shipping and payment radio controls to use borders on selected items (#46150) 2024-04-10 02:54:05 -07:00
Bart Kalisz b8df34659c
Blocks E2E: Ensure legacy template slugs are supported (#46269) 2024-04-10 10:38:55 +02:00
Adrian Moldovan 9df545046a
[test reporting] Include list of failed tests in Slack notifications (#46360) 2024-04-10 10:10:08 +03:00
Jonathan Lane c7de30b773
[DOCS] Update core critical flows with update e2e tests (#46400)
* Update core critical flows with update e2e tests

* Updated docs manifest

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-04-09 19:14:20 -04:00
Bart Kalisz 7f6d21395e
Blocks E2E: Fix template revert tests (#46373) 2024-04-09 17:03:00 +02:00
Chi-Hsuan Huang f74104667e
Restrict site visibility badge to WC Home screen & adjust badge padding (#46359)
* Adjust padding on site visibility status badge

* Only show badge on WooCommerce home

* Add changelog
2024-04-09 22:34:37 +08:00
Chi-Hsuan Huang c48f80ed30
Sync LYS task completion with `woocommerce_coming_soon` option (#46358)
* Update LaunchYourStore::is_complete method to use get_option('woocommerce_coming_soon') instead of get_option('launch-status')

* Update LaunchYourStore hooks to remove launchStatus variable

* Add changelog

* Update logic
2024-04-09 22:30:46 +08:00
Thomas Roberts e111784e60
Ensure local pickup "enabled" setting is read correctly on client-side (#46334)
Co-authored-by: Niels Lange <info@nielslange.de>
2024-04-09 06:31:04 -07:00
Luigi Teschio 5fdbf8e8f8
CYS - E2E tests: add create your own section E2E tests (#46337)
* CYS - E2E test: not use snapshot approach for color picker E2E tests

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

* remove comment

* CYS - E2E tests: add create your own section E2E tests

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

* trigger CI

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-09 15:06:30 +02:00
Seghir Nadir afee75f871
Use individual meta keys for Additional fields. (#46091)
* add regression tests

* Refactor to using single meta key per field

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

* refactor rest of code

* keep set_array_meta same

* use correct function in condition

* fix spacing

* add docs

* fix markdown issues

* handle false bool meta

* adjust admin keys

* fix merchant tests

* handle checkboxes in checkout response

* address feedback

* 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>

* 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>

* 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 ledt places and reduce abstractions

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2024-04-09 12:48:27 +01:00
Leif Singer fe5efc2c45
Remove a few unnecessary test annotations (#45596) 2024-04-09 06:54:10 -03:00
github-actions[bot] 242cff1b22
Delete changelog files based on PR 46277 (#46367)
Delete changelog files for 46277

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-04-09 11:21:38 +02:00
Ivan Stojadinov 97bc91b216
Delete changelog files based on PR 46139 2024-04-09 11:16:23 +02:00
Leif Singer 8ee74ede0e
Update Woo.com references to WooCommerce.com (#46259)
* replace capitalized Woo.com with WooCommerce.com

* replace http URLs

* replace https URLs

* replace developer.woo.com

* add missing version in `@since` tag

* unslash the HTTP_REFERER

* WordPress.Security.ValidatedSanitizedInput.InputNotSanitized

* add changelog file

* add more changelog files

* address linter errors

* address more linter errors

* fix test

* more linter errors
2024-04-09 09:50:15 +01:00
nigeljamesstevenson df4dcf3da7
Update Action Scheduler to 3.7.4 (#46277)
* Update Action Scheduler to 3.7.4

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-09 09:32:33 +01:00
Chi-Hsuan Huang 7a90da9d6b
Update WC Admin Homescreen header icons (#46353)
* Update admin header icons

* Update admin header icons

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

* Fix tests

* Fix lint

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-09 15:46:33 +08:00
Francesco Carlucci 98ab2f81d6
Support order search by transaction_id natively (#46129) 2024-04-09 08:57:36 +02:00
Chi-Hsuan Huang 5bb308f486
[LYS] Hide coming soon banner from preview frame (#46321)
* Hide coming soon banner from preview frame

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-09 12:54:39 +08:00
Chi-Hsuan Huang 8a9eb3a85f
Update background color and padding in WooCommerce LYS status popover (#46322)
* Update background color and padding in WooCommerce LYS status popover

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-09 12:53:22 +08:00
Sam Seay 803a62c50a
Remove all references to the product add to cart block. (#46220) 2024-04-09 14:01:32 +12:00
Patricia Hillebrandt 14c06fff80
Deprecate the $check_key_exists parameter from AssetDataRegistry and disallow duplicate data for all cases (#46139)
* Ensures data is added to the registry just once.

* ditch unnecessary param.

* Deprecate the  param for AssetDataRegistry

* Remove the  param for additional calls to AssetDataRegistry::add()

* Remove the  param for additional call to AssetDataRegistry::add() on WCAdminSharedSettings

* Trigger a PHP warning instead of throwing a fatal whenever the key being registered is not a string and whenever attempting to override existing data.

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

* Replace trigger_error with error_log to clear out lint errors.

* Address lint for trigger_error

* Update the test_already_existing_key_on_adding_data test to expect a warning instead of an exception

* Update tests

* Update method from add_data to add.

* Remove the throw InvalidArgumentException for the add and add_data methods.

* Remove the now unnecessary test_already_existing_key_on_adding_data test, considering we now return early whenever the key is duplicated, the code never reaches this stage via AssetDataRegistry:add

* Move the call to the exists method to within the add_data method.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-08 18:48:29 -03:00
Fernando Marichal 46b07c040f
Add API Rest endpoint to duplicate product (#46141)
* Add API Rest endpoint to duplicate product

* Add update functionality

* update duplicate_product

* Fix function comment

* Add unit tests

* Add changelog

* Add missing variable

* Improve tests

* Fix tests and lint

* Add comment explaining process
2024-04-08 11:14:23 -03:00
Luigi Teschio c34399b28c
CYS - E2E test: not use snapshot approach for color picker E2E tests (#46333)
* CYS - E2E test: not use snapshot approach for color picker E2E tests

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

* remove comment

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-08 16:10:07 +02:00
Luigi Teschio 8507e06173
CYS - E2E tests: add homepage picker E2E tests (#46127)
* Update checks for sale price

* Update checks for product images

* Update checks for linked products

* Update default theme for e2e environment to twentytwentythree

* Fix basic spec

* Fix locator product block editor test

* Make cart.spec.js theme agnostic

* Updated mini-cart.spec.js

* Updated cart-checkout-block-calculate-tax.spec.js

* Updated cart-block.spec.js

* Fix cart-block.spec.js

* Update account-email-receiving.spec.js

* CYS - E2E tests: fix flaky assembler-hub test

* Use a value for pr_number

* Update condition for the Slack alert job

* Remove pr_number argument

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

* Update conditions for the publish reports jobs

* Rename jobs

* Send GITHUB_SHA to report

* Check for skipped status

* Include Slack notification step in the reporting job

* Rename jobs

* Test update to trigger api tests

* Revert test change for api tests

* fix flakiness

* Test change to trigger all tests

* Test slack alert condition

* add waitUntil

* Force a test failure

* Revert all test changes

* improve logic

* fix build error

* try now

* Update product-inventory-block-editor.spec.js

* fix unit test

* fix flakiness

* Update checkout-block.spec.js

* Update checkout-block.spec.js

* Add utils/order

* Remove the check for more items than the coupon max amount as it fails with block themes

* Update create-simple-product-block-editor.spec.js

* Update cart-checkout-calculate-tax.spec.js

* Update checkout-block.spec.js

* Update create-simple-product-block-editor.spec.js

* Update wordpress-post.spec.js

* Update my-account-addresses.spec.js

* Update my-account-create-account.spec.js

* Update my-account-downloads.spec.js

* Update my-account-pay-order.spec.js

* Update my-account.spec.js

* Update order-email-receiving.spec.js

* Update product-grouped.spec.js

* Update product-simple.spec.js

* Update product-tags-attributes.spec.js

* Update product-variable.spec.js

* Update shop-search-browse-sort.spec.js

* Update checkout.spec.js

* Update checkout-login.spec.js

* Update checkout-create-account.spec.js

* Update wordpress-post.spec.js

* Update cart-checkout-calculate-tax.spec.js

* Update wordpress-post.spec.js

* Update mini-cart.spec.js

* Remove logging of order id

* Remove the log-out action as it invalidates the customer state and breaks other tests

* Use disableWelcomeModal

* CYS - E2E tests: add homepage picker E2E tests

* update snapshots

* add snapshots

* use screenshot tests+

* use snapshot

* try now

* update snapshot

* remove wp-container snapshot

* remove only

* add comment

* add snapshot

* enable color picker tests

* revert to twentytwentythree

* restore changes related to the color picker

* use default theme

---------

Co-authored-by: Adrian Moldovan <adim.moldovan@gmail.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-08 10:43:41 +00:00
Luigi Teschio 9007b780c4
CYS - E2E tests: add font picker E2E tests (#45959)
* CYS - E2E tests: add font picker E2E tests

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

* reset to the default theme

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-08 10:35:37 +00:00
Luigi Teschio 606bb5cf79
CYS - E2E tests: restore the default theme (#46268)
* CYS - E2E tests: restore the default theme

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

* add comment

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-08 10:17:47 +00:00
Thomas Roberts 9f159f7141
Use address format from server in address card (#45852) 2024-04-08 01:43:42 -07:00
Moon 79d65eeea0
Add launch your store homescreen status tour (#46203)
* Tour component initial design

* Add woocommerce_lys_tour_dismissed option on 8.7.0 update

* Use woocommerce_lys_tour_dismissed to render the tour

* Rename option

* Add useSiteVisibilityTour

* Remove unused tourDismissed var

* Remove unused import

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

* Use ' not `

* Lint fixes

* Update plugins/woocommerce-admin/client/launch-your-store/tour/index.tsx

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

* Add discover more link

* woocommerce_launch_your_store_tour_hidden should be added < 8.9

* Adjust padding bottom for the footer

* Use user meta to manage woocommerce_launch_your_store_tour_hidden

* Adjust tour padding

* Fix global types

* Exclude the tour on new sites

* Fix missing doc comment

* Update tour descriptions

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-04-08 16:29:49 +08:00
Paul Sealock 65294dd048
[Launch your store] Add Coming Soon page templates (#46207)
* Add LYS store only coming soon contents

* fix conflict

* background color

* style login button

* styles

* possibly_update_coming_soon_page

* linting

* get_placeholder_page

* is_active_template

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

* Fix lint issue

21 | WARNING | Possible useless method overriding detected (Generic.CodeAnalysis.UselessOverridingMethod.Found)

* Fix lint issue

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-08 08:15:36 +00:00
Sam Seay f9c4b284ce
Remove the base tabs component from blocks. It is no longer used. (#46219) 2024-04-06 15:03:07 +13:00
Sam Seay be93d94130
Fix blocks e2e test for `additional-fields.merchant.block_theme.side_effects.spec.ts` (#46258)
* Wait for DOMContentLoaded to ensure that scripts are run when we try click edit shipping details.
2024-04-06 14:54:46 +13:00
Tung Du 11ec7c6255
Fix: broken contract in StoreAPI ProductCollectionData endpoint (#45247)
* revert: use original implementation

* fix: price query clause

* chore: changelog

* fix: passing full query state to get the correct count and avoid cache issue

* Replace references to woo-gutenberg-products-block

* fix php cs error

* fix php cs error

* Fix e2e tests for attributes count

* Separated out and/or query type tests for attrs count

---------

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: roykho <roykho77@gmail.com>
2024-04-05 15:50:19 -03:00
Fernando Marichal 6fb00c4297
Fix linked product e2e tests (#46286)
* Fix linked product e2e tests

* Add changelog
2024-04-05 14:37:51 -03:00
siliconforks 0d368bfc53
Fix bug parsing memory_limit in product importer (#46051)
Previously, the code assumed that all memory_limit values used the "M"
suffix (for megabytes); values using "G" (for gigabytes), "K" (for
kilobytes), or no suffix (for bytes) were all parsed incorrectly.  Now,
all possible values should be handled correctly.

This bug has actually been fixed twice before in other locations:

Commit 538403306c (#30908)

Commit 4557108805 (#21557)
2024-04-05 17:11:38 +02:00
RJ b5b96bed04
add: lys launch store action (#46235)
* add: launch store action
2024-04-05 15:08:23 +00:00
Fernando Marichal 2c52b6ab7e
Add e2e tests for linked products (#46024)
* Add e2e tests for linked products

* Add changelog
2024-04-05 11:35:17 -03:00
Paulo Arromba afe19f2f08
Enhancement: Changing shopper feedback on payment response failure (#45961)
* Changing shopper feedback on payment response issues

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

* Disambiguated error log

* Prevent unexpected error response from outputting technical data to the user. Instead display an helpful message to prevent retries.

* Fix PHP linting.

* Changed error message and added translators comment

* Safeguarding against wc_checkout_params.i18n_checkout_error definition

* Added null check
2024-04-05 15:21:47 +01:00
Karol Manijak 0c1e4efc89
Rename the "other" location from `generic` to `site` (#46228)
* Rename the useGetLocation generic option to site

* Add changelog

* Adjust tests to change
2024-04-05 15:54:56 +02:00
github-actions[bot] cb27f36cad
Delete changelog files based on PR 45825 (#46267)
Delete changelog files for 45825

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-04-05 15:31:46 +02:00
Adrian Moldovan 6a183c2561
[e2e tests] Update default theme to twentytwentythree (#45937)
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-05 10:13:57 -03:00
Karol Manijak 1c4b793f06
Product Collection: fix "Reset All" button in Editor filters (#46226)
* Add deselect callabck to attribute filter

* Add deselect callabck to created filter

* Add deselect callabck to featured filter

* Add deselect callabck to handpicked filter

* Cleanup deselect callabck to keyword filter

* Add deselect callabck to on salefilter

* Add deselect callabck to order by option

* Add deselect callabck to stock status filter

* Add deselect callabck to price range filter

* Add deselect callabck to price taxonomies filter

* Call all the reset filer callbacks on reset

* Add changelog

* Remove unused variable

* Replace hardcoded default filter values with the DEFAULT_FILTERS constant
2024-04-05 13:16:00 +02:00
Thomas Roberts 66ac06e9fc
Add default keys to local pickup settings to prevent PHP warning (#46182) 2024-04-05 11:08:54 +00:00
Barry Hughes d874575c86
Solve error when coupons are applied to orders that reference deleted products (#46251)
Solve error when coupons are applied to orders that reference deleted products.
2024-04-05 12:53:53 +02:00
Francesco 57b8fe8a84
refactor: `*_checkout_process_payment_error` to return 400 error code (#45979)
Co-authored-by: github-actions <github-actions@github.com>
2024-04-05 09:44:09 +00:00
Ron Rennick 97d71b25a2
update cot references in performance tests to hpos (#46245)
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-04-05 11:59:50 +03:00
Ilyas Foo 7e7be4f9d0
Add launch your store success screen (#46103)
* Initial commit with LYS components

* Update CustomerFeedbackSimple component to support emoji value props

* Add confetti package in woocommerce components

* Add confetti usage

* Remove unnecessary files

* Update pnpm lock

* Changelogs

* Lint and temporarily comment out tests

* Lint css and rename image

* Various fixes

* Rename transitional to congrats

* Add copy link functionaility from Moon's code and move whatsnext component

* Rename components

* Move and renames

* Fix ref type

* Add temporary dynamic actions

* Remove confetti background

* Add header

* Update xstate actions for launch success page

* Add temporary spinner

* Combine congrats data fetching to a single action and service

* Add functioning dynamic actions list

* Temporarily remove test

* Cleanups

* More cleanups

* Small lint

* add url listener for content param

* Update comment on confetti package

* Remove lodash and replace with reduce

* Fix Woo Express condition

---------

Co-authored-by: rjchow <me@rjchow.com>
2024-04-05 10:44:57 +08:00
Moon c551667646
Copy change for coming soon label in advanced setting (#46204)
* Copy change for coming soon setting

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-04 19:21:00 -07:00
Paul Sealock 04aab95452
[Launch Your Store] Dynamically create Coming Soon page content (#46101) 2024-04-05 14:56:39 +13:00
RJ 34b48892e0
fix: lys hub show only incompleted and recent tasks (#46190)
* fix: lys hub show only incompleted and recent tasks

* disable completed task items

* Update plugins/woocommerce-admin/client/launch-your-store/hub/sidebar/tasklist.tsx

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

* strikethrough font color

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-04-05 09:54:30 +08:00
Chi-Hsuan Huang 3f601b3f45
LYS: Add coming soon page editor links (#46100)
* Add 'woocommerce_coming_soon_page_id' option to API options

* Add useComingSoonEditorLink hook to handle the coming soon editor link

* Add useComingSoonEditorLink hook and update styles

* Add changelog

* Move use-launch-your-store.js to ./hooks and update import path
2024-04-05 01:26:30 +00:00
Chi-Hsuan Huang 4c3d6ffa6b
Move the LYS feature flag check inside add_lys_default_values() (#46154)
* Move the feature flag check to add_lys_default_values method

* Add changelog

* Revert changes

* Fix bug in login functionality
2024-04-05 01:20:17 +00:00
Chi-Hsuan Huang 90c082aafb
Add feature flag options to `wc-live-branches.user.js` user script (#46152)
* Update WooCommerce Live Branches script version to 1.1 and add feature flags options

* Add changelog

* Update options

* Add encodeURIComponent
2024-04-05 01:10:21 +00:00
Chi-Hsuan Huang c3142773f5
Add missing `live-branches/install.php` require to API.php (#46159)
* Add live-branches/install.php to API

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-05 08:47:47 +08:00
Moon 1907016893
Track site visibility setting actions (#46078)
* Track site visibility actions

* Move private link text box to prevent accidental toggle

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

* Restirct site visibility settings to general tab

* Remove unnecessary site visibility render logic

* Lint fix

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-04 16:50:26 -07:00
Moon def3ac920d
Move site visibility settings to a new tab (#46140)
* Move site visibility settings to a new tab

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

* Update tab id to site-visibility and link to it from the homescreen badge

* Fix tests

* Remove unused code

* Lower case tab title

* Remove general from the slotfill id

* Remove typo

* Lint fix

* Lint fix

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-04 14:28:58 -07:00
Ron Rennick 674d7a01bf
fix the CI unit test path for legacy unit tests (#46247)
* fix the CI unit test path for legacy unit tests

* update the pattern in all the relevant CI jobs

* add the tests/unit-tests folder as well

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-04-04 17:50:45 -03:00
Michael Pretty 6328ad01a5
Fix tests currently failing against HPOS environment setup (#46242)
* Fix tests currently failing against HPOS environment setup

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

* fix lint warning for print_r usage

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-04 11:19:22 -07:00
louwie17 95311dc87c
Add e2e for analytics product segmentation (#46164)
* Add initial copy of new E2E analytics test

* Updated test to pass and filter by variation

* Add changelog
2024-04-04 10:01:05 -07:00
Ron Rennick bfb376abea
Sync stylelint, classnames, wp-prettier, sass-loader versions (#45597)
* bump husky, remove remnants from blocks

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

* add @playwright/test to syncpack

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

* update pnpm-lock.yaml

* add github-label-sync to syncpack

* add stylelint to syncpack

* add classnames to syncpack

* manually sync wp-prettier

* sync sass-loader version

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-04 09:48:54 -07:00
Ron Rennick 0849238776
add expected version to template warning (#46021)
* add expected version to template warning

* add changelog

* fix spacing for linting

* revert template change

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-04-04 09:47:10 -07:00
Jorge A. Torres 3f74ef2009
UX improvements for HPOS CLI cleanup tool (#45322)
* When order is out of sync, suggest a fix

* Allow cleanup tool to remove data for placeholders even if order can’t be loaded from HPOS

* Prevent infinite loops in cleanup tool

* Add changelog

* Fix PHPCS violations

* Improve error messages

* Fix syntax error

* Minor fix
2024-04-04 17:18:01 +01:00
Luigi Teschio 51dfbb969f
CYS - color picker: fix CSS (#46227)
* CYS - color picker: fix CSS

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-04 15:28:15 +00:00
Alba Rincón 0a0730bad7
[CYS] Stop relying on snapshot for footer and header tests (#46221)
* Stop relying on snapshot for footer and header tests

* Remove only

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-04 17:13:06 +02:00
Alba Rincón f06ef8d8e2
[CYS] Fix color palette button colors (#46216)
* CYS: add debounce to improve performance

* Fix button colors

* Format

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

---------

Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-04 16:26:15 +02:00
Luigi Teschio 96c9180671
CYS: add debounce to improve performance (#46212)
* CYS: add debounce to improve performance

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-04 12:19:56 +02:00
Alba Rincón 5129811c85
Disable assembler header test temporarily (#46217)
* Disable assembler header test temporarily

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-04 10:07:01 +00:00
Sakri Koskimies c0da722a93
Improve formatting for SE, LV, CZ, SK postcodes + Update tests (#45478)
* Add data providers for WC_Formatting_Functions_Test tests

* Add tests for Denmark postcodes

* Add formatting for Sweden postcodes

* Add formatting for CZ, SK postcodes. Cleanup formatting for LV

* Group wc_format_postcode tests by country

* Add changefile

* Match digits only in LV, CZ, SK postcode formatting

* Update postcode validation for CZ, SK

* Minor adjustment to regex

---------

Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-04-04 10:06:38 +01:00
Alba Rincón 0d6b9770f4
Fix the overlay color of the "Featured Category Triple" pattern (#46170)
* Fix the overlay color of the "Featured Category Triple" pattern

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-04 09:58:54 +02:00
Alba Rincón 35ef588981
CYS - E2E tests: Add footer section e2e tests (#45984)
* Add e2e tests for the assembler footer section

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

* Renam var

* Rename pageObject

* Add test for the preview

* Improve the test by extracting the expected class from the selected footer

* Update snapshot

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-04 09:23:49 +02:00
Alba Rincón cb4d8a6f70
CYS - E2E tests: Add header section e2e tests (#46011)
* Add e2e tests for the assembler header section

* Rename var

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

* Add test to check the preview changes when selecting a header

* Add missing header classes and all preview test

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-04 09:23:37 +02:00
Vedanshu Jain 3d2b33ca09
Avoid reading items from DB of a order whose ID is zero (#46161)
* Add unit test simulating order mix up when order ID is zero.

* Better tests.

* Dont try reading from DB when order is zero to prevent mixups.

* PHPCS fixes and changelog.

* Syntax sugar

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

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-04-04 12:52:20 +05:30
Jonathan Lane 4bce1da492
Update workflow to close support issues as "won't fix/not planned" (#46202)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-04-04 09:31:53 +03:00
Jonathan Lane d3624dd7e0
Skip mini cart e2e test and a couple of minor fixes (#46199)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-04-04 09:23:43 +03:00
Sam Seay ff102c4921
Add vendor bundling of blocks frontend bundle to improve cart/checkout performance (#45859) 2024-04-04 15:31:02 +13:00
Alexandre Lara 90a9ef0392
Product Filter: Price block - Add E2E tests (#45855)
* Add E2E tests for Product Filter: Price block

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

* Use web first assertions

* Replace `toB` by `toHaveValue` in E2E tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-03 16:15:10 -03:00
Nima Karimi 1dc97f0801
[Woo AI] Add JSON response format (#46137)
* Add response_format to Woo AI package

* Add changelog

* Request JSON response format for product name generation

* Add changelog

* Add shared types
2024-04-03 21:37:39 +03:00
Luigi Teschio 92c62c4d96
skip color picker E2E tests (#46188)
* skip color picker E2E tests

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-03 11:09:51 -07:00
Adrian Moldovan a21ecaa4c4
Update @wordpress/env to 9.0.7 (#46177)
* Update @wordpress/env to 9.0.7

* Add changelog

* Add changelogs
2024-04-03 09:05:59 -07:00
github-actions[bot] f66d9ff4ae
Delete changelog files based on PR 46163 (#46176)
Delete changelog files for 46163

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-04-03 15:55:29 +02:00
Ilyas Foo ded85d1d40
Fix PaymentGatewaySuggestionsDataSourcePoller and disable deprecation logging (#46163)
* Temporarily disable deprecation logging and use old DataSourcePoller class

* Changelog

* Update DataSourcePoller.php

* Change to comment for lint

* Typo again

* Lint

* Better comment from @nigeljamesstevenson
2024-04-03 14:42:26 +01:00
github-actions[bot] c2f486b407
Delete changelog files based on PR 46026 (#46172)
Delete changelog files for 46026

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-04-03 15:08:29 +02:00
Luigi Teschio b4e359ee71
E2E test env: use WordPress 6.5 stable version (#46155)
* E2E test env: use WordPress 6.5 stable version

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

* Revert "Wait for notice text to be visible instead of checking data store"

This reverts commit f26892a646.

* Revert "Fix linting errors"

This reverts commit eaf90e4890.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2024-04-03 14:33:04 +02:00
github-actions[bot] 04e952d33e
Delete changelog files based on PR 46019 (#46168)
Delete changelog files for 46019

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-04-03 14:04:20 +02:00
Vedanshu Jain 5dc662b736
Add guide to enable HPOS on high volume stores. (#46084)
* Add guide to enable HPOS on high volume stores.

Co-authored-by: Stephanie <stephmpi@gmail.com>
Co-authored-by: Jorge Torres <jorge.torres@automattic.com>

* Addressed review comments.

* Add manifest file.

---------

Co-authored-by: Stephanie <stephmpi@gmail.com>
Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-04-03 13:20:07 +02:00
RJ 40be78c265
dev: disable xstate inspector in prod build (#46109)
* dev: disable xstate inspector in prod build

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

* revert unintended require

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-03 13:53:19 +08:00
github-actions[bot] 1eadac6e6b
Delete changelog files based on PR 46088 (#46132)
Delete changelog files for 46088

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-04-02 18:16:41 +02:00
Thilina Pituwala 561a3d18c5
Add red bubble with update count on in-app My Subscriptions tab (#46088)
* Extract update count function.

* Pass wooUpdateCount to be used by admin components.

* Show update count bubble on in-app my subscriptions tab.

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

* Refactor how update count HTML is generated and move logic into appropriate classes.

* Show red badge when the site is disconnected, regardless of the installation status of WUM.

* Always display as 1 update is available when site is disconnected.

* Skip using dangerouslySetInnerHTML.

* Remove unused dependency.

* Move updateCount to a tab property.

* Prevent calling get_update_count if the site is not connected.

* Raw url encode the product key before signing the URL

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Muhammad Anas <muhammad.anas@automattic.com>
2024-04-02 16:04:57 +01:00
Manzur Ahammed ed3febb948
Add new task (Connect to Woo.com task) in WC onboarding (#45795)
* add a connect to store task in WC onboarding tasklist

* update changelog

* remove the time

* change task content

* make task dismissable
2024-04-02 20:25:27 +08:00
Karol Manijak 92e99d4cad
Product Collection: telemetry choosing collection (#45827)
* Use templateSlug context in Product Collection

* Implement util recognising the location for track events

* Implement the track event when user chooses a collection in Product Collection

* Add changelog

* Remove incorrect import

* Cover cases with specific Product or Specific Taxonomy

* Update event name

* Adjust Product Filters tests

* Revert wrong commit
2024-04-02 14:12:20 +02:00
Thomas Roberts 893c7ddb04
Sync Local Pickup title between Checkout block and shipping settings UI and vice/versa (#45720) 2024-04-02 11:34:32 +00:00
Thomas Shellberg 787b2db54b
Updating Woo AI version and changelog. (#46068)
* Updating Woo AI plugin version and changelog.
2024-04-02 13:18:00 +02:00
Karol Manijak 1f49f712b5
Unify Product Elements inserter category to "WooCommerce Product Elements" (#46064)
* Unify the category for all Product Elements

* Add changelog

* Bring back category to product elements that don't use shared confiug

* Add specific category to some Product Elements blocks registered only for Single Product template
2024-04-02 13:04:13 +02:00
Luigi Teschio 81bef3e641
CYS - E2E tests: add logo picker E2E tests (#45999)
* CYS - E2E tests: add logo picker E2E tests

* fix flakiness

* use as second parameter

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

* Add changes to tests projects on package.json

* CYS - E2E tests: fix flaky assembler-hub test

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

* fix flakiness

* add waitUntil

* improve logic

* fix build error

* try now

* fix unit test

* fix flakiness

* fix logic

* improve tests

* add more tests

* use .toBe

* add documentation

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-04-02 11:40:32 +02:00
Thomas Roberts 68c6ec6100
Prevent orders being placed when no shipping options are available (#46026)
* Prevent orders being placed with invalid shipping options

* Add changelog

* Add shipping_disable_flat_rate fixture function

* Test checking out with no valid shipping methods selected

* Update tests to add a default shipping method

* Update test_checkout_invalid_shipping_method to disable method

* If shipping methods is null, return an array with an empty string inside

* Replace WC session in tests that rely on setting cookies

* Add MockSessionHandler to handle test cases using cookies

* Add docblock comment

* Expect shipping validation to fail if chosen methods are null

* Add shipping method before testing validate_selected_shipping_methods

* Update MockSessionHandler to handle caching

* Show error when test fails

* Default the chosen shipping methods to an empty array if not set

* Split checks for needs_shipping and valid shipping apart

* Remove unnecessary session set and total calculation

* Fix lint errors

* Init session in each test

* Reimplement required methods (those that are private or use cookies)

* Update phpcs ignore comment to be inline

* Prevent error when accessing unset variable in mock cache

* Fix lint error
2024-04-02 11:03:14 +02:00
Luigi Teschio c0d0596574
CYS - E2E tests: fix flaky assembler-hub test (#46030)
* CYS - E2E tests: fix flaky assembler-hub test

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

* fix flakiness

* add waitUntil

* improve logic

* fix build error

* try now

* fix unit test

* fix flakiness

* fix logic

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-02 08:35:15 +00:00