Commit Graph

20287 Commits

Author SHA1 Message Date
Jonathan Lane d0f25550b7
Test to create various shipping methods (#45966)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-03-27 11:46:20 -03:00
Adrian Moldovan 166ca6d7db
[e2e tests] Update more products tests to work with blocks themes (#45923) 2024-03-27 11:41:50 -03:00
Fernando Marichal df90c91f08
Add E2E tests for grouped products (#45964)
* Add E2E tests for grouped products

* Add check

* Add changelog

* Fix tests

* Remove comment
2024-03-27 11:40:31 -03:00
Fernando Marichal 3cfd3893b4
Add E2E tests for product variation notices (#45853)
* Tests for variations warning

* Add changelog
2024-03-27 11:40:19 -03:00
Niels Lange 5cde8c5efe
Add e2e tests for virtual orders (#45824)
* Add e2e tests for virtual orders and refactor test names

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

* Optimise setup and teardown

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-27 21:28:54 +07:00
Alba Rincón 41e1da5033
[CYS] Redirect to transitional page to the intro page if the CYS task was not completed (#45933)
* Redirect to intro page when accessing the transitional page if no customized

* Remove only

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

* Check if the task is completed

* Add transition screen class

* Remove unused import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-27 14:13:52 +01:00
Jonathan Lane c8202bc729
Enhance merchant new order test (#45965)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-03-27 14:36:49 +02:00
Luigi Teschio 11c31c2312
CYS - E2E tests: Add color picker E2E tests (#45926)
* CYS - E2E tests: Add color picker E2E tests

* remove not necessary changes

* fix E2E tests

* re-add beforeEach

* fix E2E tests

* improve test assertation

* add comment

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

* fix E2E tests

* don't print error

* fix E2E tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-27 12:01:26 +00:00
Adrian Moldovan 6ddbbae207
[e2e test] Fix locator for customer combobox in create order test (#45983) 2024-03-27 12:48:14 +01:00
Tom Cafferkey 271da399cc
Customer Account block: Remove margin-left from label (#45934)
Co-authored-by: github-actions <github-actions@github.com>
2024-03-27 10:24:11 +00:00
Luigi Teschio 66b5481590
Fix E2E tests for WordPress 6.5 (#44593)
* Add sharding to Blocks e2e tests

* Changelog

* Push a change to Blocks README to trigger tests

* Fix syntax

* Fixed again

* Try again

* Trying to get the shard number

* Shard names

* fix E2E test

* use wordpress 6.5 as test env

* update util

* fix Mini Cart Block E2E test

* add editor dependency

* fix E2E tests

* fix E2E tests

* fix E2E tests

* restore global setup file

* fix E2E tests

* fix global setup

* try now

* try now

* fix E2E test

* fix E2E test

* fix mini cart E2E test

* add changelog

* complete all the jobs

* update playwright

* fix E2E tests

* fix E2E test

* try now

* fix E2E test

* not show welcome guide for the post editor

* update configuration

* fix guest storage state

* fix E2E tests

* check now

* fix E2E tests

* fix command

* improve selector

* use WordPress 6.5 beta 2

* use WordPress 6.5 beta 3

* fix canvas use

* wait for button

* fix E2E test

* fix E2E test

* fix product button

* fix product collection tests

* fix wp build link

* use beforeEach

* fix E2E tests

* use WordPress RC2

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

* trigger CI

* fix E2E tests

* fix E2E tests

* fix E2E test

* fix E2E tests

* add timeout

* Fix flaky locator assertions
...by replacing them with dedicaed auto-waiting ones.

* Apply correct use of waitForRequest/Response and remove where unnecessary

* Remove obsolete waitUntils

* Fix accidentally isolated test

* Replace saveTemplate with core's saveSiteEditorEntities

* Fix findProductRow util

* Restore necessary request waiters

* Use activateTheme util instead of cli call

* Remove unused import

* Fix request destructured call
Request properties cannot be destructured (todo: create upstream issue)

* Revert some waitForRequest changes
These need to be investigated for heavy bleeding from side-effects

* Fix failing cart checkout test

* Set navigation timeout to 10s
We need this so that API like page.goto or page.waitForURL doesn't take 100 seconds (global timeout) to throw.

* Do not close the page in the page fixture override
The page will be closed anyway, and by closing it explicitly in the teardown phase of the fixture we create a flaky race condition where the page might be closed before the action/navigation timeout is reached, resulting in "page closed!" error instead of, e.g. "locator.fill timed out".

* Revert product collection tests due to conflicts

* Try fixing E2E test

* Remove some random change

* Revert to programmatic blur 🤷

* Fix additional checkout fields test

* Add a waitForRequest safety check in case it's debounced

* Fix price filter test

* Fix flaky visitTemplateEditor util

* Remove obsolete code from global setup

* Revert "Fix flaky visitTemplateEditor util"

This reverts commit 227336f265.

* update to WordPress RC3

* Add waitForCustomerDataUpdate function

* Don't wait for requests and use data store instead

* Try with new wait condition

* Re-add wait condition

* Wait for customer update in guest checkout test

* Add changelog

* fix lint error

* fix some E2E tests

* disable welcome guide

* remove beforeAll

* add timeout

* add another timeout

* increase timeout

* Add call to waitForSiteEditorFinishLoading when editing the theme template

* remove timeout

* remove not necessary comment

* clean changelog

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

* remove changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2024-03-27 10:54:44 +01:00
Jonathan Lane ca7e3b99ed
A few updates for flaky e2e tests (#45856)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-03-27 10:38:15 +02:00
louwie17 8f17cfe7f1
Remove accidental count call within an is_array check (#45939)
Remove accidental count call within an is_array check that always renders false
2024-03-27 05:06:16 -03:00
Ilyas Foo 7a70a93773
Fix DataSourcePoller footer error on upgrade downgrade (#45892)
* Add fix

* Changelog

* Change fix approach since it's crashing on 8.7.0
2024-03-27 11:35:52 +08:00
Barry Hughes 30cf68a51f
Add wrapper that can sanitize using `wp_kses_post` rules, but also allows `style` elements (#45407)
Add wrapper that can sanitize using `wp_kses_post` rules, but also allowing `style` elements.
2024-03-26 11:42:01 -07:00
79mplus Admin 16760c1418
don't show draft product in featured products block (#45763)
* don't show draft product in featured products block

* updated the code to show only published product in featured products block

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

Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>

* added a changelog file

---------

Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
2024-03-26 16:08:06 +01:00
Jonathan Lane af93ef15dd
Enhance the e2e tests for merchant create order flows (#45816)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-03-26 16:27:48 +02:00
Paul Sealock 619804cff3
Stylelint: Update config to double quotes (#45607)
* Add eslint override

* bump versions stylelint config

* re pnpm install

* fix config

* move to double quotes in scss

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

* lint fix new scss files

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-26 10:41:34 -03:00
Albert Juhé Lluveras 84065065be
Add WordPress.WP.Capabilities config to phpcs.xml (#45927)
* Add WordPress.WP.Capabilities config to phpcs.xml

* Add changelog file
2024-03-26 14:16:31 +01:00
Peter Fabian 3b2cb26631
[WP6.5] Added woocommerce requirement to Woo AI's header. (#45871)
* Added plugin requirement.
2024-03-26 13:24:41 +01:00
Chi-Hsuan Huang 2481778b2c
Update Launch Your Store task action URL (#45932)
* Add get_action_url method to LaunchYourStore task

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-26 19:51:56 +08:00
Jonathan Lane 859191f241
Improve tests for the marketing overview page (#45814)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-03-26 13:36:55 +02:00
Alba Rincón 217a70a31a
[CYS] Add transitional page e2e tests (#45894)
* Add transitional page tests

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-26 09:55:36 +01:00
Alba Rincón 91dda90ab3
[CYS] Add spacing between the title and the rest of the pattern (#45830)
* Add spacing between the title and the rest of the pattern

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

* Remove duplicated blockgap

* Add spacing

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-26 09:54:08 +01:00
Tom Cafferkey 0cb3b4a9ad
Block Hooks API: Add CustomerAccount block to header (#43267)
Co-authored-by: github-actions <github-actions@github.com>
2024-03-26 08:38:06 +00:00
Niels Lange 142b7d69d9
Allow to disable shipping independent of Local Pickup settings (#45828)
* Ensure that shipping can be disabled independent of Local Pickup

* Fix PHPCS issues

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-26 12:02:34 +07:00
RJ 6c12f8b6d4
add: lys xstate url handling (#45803)
* add: lys xstate url handling

* added: tests and fixes and changelog
2024-03-26 10:29:16 +08:00
RJ d063452139
dev: added xstate v5 inspector (#45879)
* dev: added xstate v5 inspector

* pnpm lock
2024-03-26 10:28:51 +08:00
Ron Rennick 1a03a64248
Sync husky, @playwright/test, github-label-sync (#45551)
* 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 changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-03-25 15:05:09 -03:00
github-actions[bot] f325727a7f
Prep trunk for 8.9 cycle (#45817)
Prep trunk for 8.9 cycle with version bump to 8.9.0-dev

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-03-25 17:19:35 +01:00
github-actions[bot] 5bc944f394
Release: Remove 8.8 change files (#45818)
Delete changelog files from 8.8 release

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-03-25 17:17:17 +01:00
Rodrigue b3a1d8c922
Add a filter for the items to apply coupons array. (#45791)
* Add a filter for the items to apply coupons array.

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

* Add filter docbloc.

* Add since tag in filter docbloc.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-25 17:23:47 +02:00
Adrian Moldovan 2403baca01
[e2e tests] Update customer-payment-page spec to be theme agnostic (#45888) 2024-03-25 12:03:30 -03:00
Adrian Moldovan c5c68f5b68
[e2e tests] Fix can create a simple product tests (#45884)
* Update category check in frontend

* Add changelog

* Removed describe block

* Test with single shard

* Add the 5 shards back

* Add the 5 shards back
2024-03-25 11:49:12 -03:00
Alexandre Lara 207a5b43d2
Single Product Block: Add missing allowed inner blocks to fix nesting placement restrictions (#45530)
* Add missing allowed inner blocks to Single Product block

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

* Remove unnecessary attribute from Single Product block template

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-25 10:59:57 -03:00
Marco Almeida 39ecfece30
Fix "add_action" accepted args (#45862)
* Fix "add_action" accepted args

Fixing the "add_action" accepted args on the examples

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-25 12:13:44 +00:00
And Finally 8fe1c4005e
In-app marketplace: remove extension update count bubble from menu item if we're showing a promotional bubble (#45832)
* Strip out extension update count bubble from menu item if we are showing a promotional bubble.

* Changelog.
2024-03-25 11:41:32 +00:00
Thomas Roberts c1d644dc16
Try fixing additional checkout fields E2E test (#45789)
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-03-25 03:56:55 -07:00
Alba Rincón 4f2ed8d262
[CYS - Core] E2E tests: add coverage for the Intro page (#45356)
* Add test for the offline intro banner

* WIP

* WIP

* Add more tests

* Remove unnecessary code

* Remove consoles

* Remove console

* Update strings

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

* Remove unnecessary code

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-25 10:28:02 +01:00
Bart Kalisz 080538ad2f
Apply upstream performance improvement to `_get_templates_paths` (#45619)
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
2024-03-25 09:18:02 +00:00
Moon 12c53d9264
Add `coming soon` page and setting (#45773)
* Add 'coming-soon' page

* Add coming soon page when user hits the core profiler page.

* Added coming soon page selector under Page setup

* Move coming soon page logic to launch your store feature class

* Conditionally add coming soon select

* Move coming soon page creation logic to WooCommerce Home

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

* Fix tests


---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-22 15:33:20 -07:00
Moon 5352c705b5
Fix Shipping Task input visual issue on Firefox (#45778)
* Fix layout issue -- add align-items for flex items

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-22 10:52:47 -07:00
Leif Singer a45e5eda4f
Add a test for the `woocommerce_specific_allowed_countries` option (#45810)
* add a test for the `woocommerce_specific_allowed_countries` option

* add changelog file
2024-03-22 10:47:25 -07:00
Maikel Perez 54476cb7f3
After Variations are created, disable the fields that don’t do anything (#45838)
* Disable woocommerce/product-regular-price-field when product type is variable

* Disable woocommerce/product-sale-price-field when product type is variable

* Disable woocommerce/product-sku-field when product type is variable

* Disable Track stock quantity toggle when product type is variable

* Disable woocommerce/product-radio-field when product type is variable

* Disable woocommerce/product-shipping-class-field when product type is variable

* Disable woocommerce/product-shipping-dimensions-fields when product type is variable

* Add changelog files

* Fix php linter
2024-03-22 13:52:42 -03:00
Damián Suárez 27124828e9
[Product Block Editor]: register `metadata` attribute for all blocks (#45657)
* register the `metadata` attribute for all blocks

* bind value attribute with the nane product entity

* changelog

* add a ToDo note

* rename edit component fn to NameBlockEdit

* changelog

* restore @ts-export line

* fix eslint issue

* fix eslint issue
2024-03-22 12:23:38 -04:00
Veljko V 1ba4bcef58
Update existing test to include scenarios for adjusting shipping and payment options (#45755)
* Add test for shipping methods but as commented

* Update comment with issue number
2024-03-22 12:44:14 -03:00
Fernando Marichal 3842611975
Update copy of inventory management fields (#45801)
* Update copy of inventory management fields

* Add changelog

* Add changelog
2024-03-22 11:49:54 -03:00
Seghir Nadir 401737994f
Use state name in Checkout block address card (#45799)
* Use state name in address card

* fix linting issue

* remove extra check for checkout endpoint

* address review feedback
2024-03-22 15:14:14 +01:00
Adrian Moldovan 88834ff469
[e2e tests] Disable focused test (#45825) 2024-03-22 12:45:04 +00:00
Seghir Nadir 7d944cd259
Add Shipping phone number to the order preview panel (#45788)
* Add Shipping phone number to the order preview panel

* Update plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php

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

* Update plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php

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

* Update plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php

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

* Update plugins/woocommerce/src/Internal/Admin/Orders/ListTable.php

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

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2024-03-22 13:08:53 +01:00
Jonathan Lane 4c4a581b71
[E2E] Initiate a woo.com connection (#45813)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-03-22 11:53:47 +02:00
Manish Menaria ca7aed0a95
Product Collection: Don't show publicly non-queryable taxonomies (#45781)
* Don't show publicly non-queryable taxonomies

The main enhancement involves adding a visibility filter to the taxonomies query. Now, the query considers the `publicly_queryable` property of each taxonomy. Only taxonomies marked as publicly queryable are included in the final list returned by the `useTaxonomies` hook. This change ensures that the Product Collection block's taxonomy controls only display taxonomies relevant and accessible to the public, enhancing both the usability for content creators and the relevance of taxonomy selections for site visitors.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-22 15:01:58 +05:30
Luigi Teschio c2a3abae51
[CYS - E2E tests] Add E2E tests for the loading screen (#45804)
* CYS: initial E2E tests loading page

* add more cases

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-22 10:07:33 +01:00
Christopher Allford b8bd480faf
Ensure Product Collection Block's `queryId` Uniqueness (#44522)
Since we don't need it to be _perfectly_ stable,
we can just set the `queryId` to the instance ID
on every component mounting. This is fine and
won't mark the attribute as dirty unless a
collection block is added, deleted, or moved
in just the right way. The exception to this
is collection blocks in sync patterns.
In this case the ID cannot change
because it can cause update loops in some
cases that freeze the browser.
2024-03-22 01:40:15 -07:00
Christopher Allford 5002b62d00
Reset Product Collection Pagination When Filtering (#45693)
Since we can't be sure that a page exists once the filters have been
changed we should reset the page when they do.
2024-03-21 14:03:13 -07:00
Maikel Perez a5943ab0ef
Advanced settings > Features: remove Navigation setting when store isn't using it (#45800)
* Remove Navigation setting when store isn't using it

* Add changelog file

* Fix api core test
2024-03-21 16:09:30 -03:00
Patricia Hillebrandt b790f155d0
[CYS on Core] Update the copy for the fonts opt-in modal (#45805)
* Update the copy for the fonts opt-in modal

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-21 19:49:37 +01:00
Jorge A. Torres db34a15116
Handle posts > HPOS redirect more gracefully when backup post is missing (#45605)
* Attempt to determine order type from HPOS side too in `PostsRedirectionController`

* Add changelog

* Simplify redirect logic

* Linter hates short ternaries
2024-03-21 18:33:59 +00:00
Alba Rincón 4eb9063a06
[CYS] Update the `Share feedback` survey design (#45802)
* Update the CYS feedback survey design

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

* Fix typo

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-21 18:30:40 +01:00
Adrian Moldovan d8453be3df
[e2e tests] Disable the task list reminder bar in products list (#45772)
Disable the task list reminder bar, it can interfere with the quick actions
2024-03-21 10:20:32 -07:00
Adrian Moldovan 1e0be60e7e
[e2e tests] Add tests for users management (#45673)
* Add skeleton spec

* Add missing await

* Update customer role in test env setup

* Split specs

* Add tests for user creation

* Added tests for users deletion

* Fix API tests after env setup customer role change

* Fix API tests after env setup customer role change

* Add update customer steps

* Update user edit tests

* Updated comment
2024-03-21 10:18:23 -07:00
Corey McKrill b2d70262b7
Products: Avoid fatal during variation search (#45776)
* Products: Avoid fatal during variation search

Most product types' data objects store `WC_Product_Attribute` objects in
their attributes property, whereas Product variation data objects store
an associative array of key/value pairs in their attributes property.
This is problematic because it means a fatal error can be thrown when
code assumes that a product's attributes are objects with methods rather
than simply strings. Ideally, attributes would work the same everywhere,
but it would be challenging to fix that in the codebase without breaking
backcompat. So instead, in this PR, we are simply adding some logic in
the `find_matching_product_variation` method to ensure that we're not
trying to retrieve a variation of a product object that is already a
variation.

* Fix linting issue
2024-03-21 18:07:09 +01:00
Patricia Hillebrandt 5ee4a4c1b1
[CYS] Ensure the CYS task is marked as complete only if the user customized their theme in the editor (#45792)
* Make sure the woocommerce_admin_customize_store_completed is marked as complete whenever global styles are updated by the user.

* Check for the WP_Post object before attempting to access the content property

* Mark the cys task as completed when modifying a template or template_part

* Unify the mark as complete methods and update the hooks.

* update docblock

* remove unnecessary ()

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

* Ensure the woocommerce_admin_customize_store_completed option is marked as complete whenever the user updates their styles in the editor

* Fix lint errors

---------

Co-authored-by: Alba Rincón <alba.rincon@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-03-21 17:36:41 +01:00
Roy Ho 5aac82b0fe
Consolidate and move password protected product test (#45752)
* Consolidate and move password protected product test

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

* Move test to non side effect and remove remaining empty test file

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-21 07:44:30 -07:00
And Finally 40b14aea16
Don't return from `WC_Admin_Marketplace_Promotions::fetch_marketplace_promotions` if we get an empty or bad response (#45786)
* Removed return statements from conditions in `WC_Admin_Marketplace_Promotions::fetch_marketplace_promotions`. With these, if the marketplace gets a good response from the API and then later a bad or empty response, it fails to update the promotions transient, meaning that notices and menu bubbles may persist in stores after we've removed them from the API. We check the dates of promotions, so they should disappear when they expire, but it's a good idea to clear this data if the API returns an empty response or if there's an error fetching it.

* Changelog.

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

* Removed duplicate changelog file.

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

* Removed duplicate changelog file.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-21 14:42:25 +00:00
Tom Cafferkey f2d828f49a
Block Hooks API: Add the block hooks algorithm to Woo templates (#45737)
Co-authored-by: github-actions <github-actions@github.com>
2024-03-21 08:50:40 +00:00
Tom Cafferkey e4017f0800
Block Hooks: Run block hooks on all block themes (#45581)
Co-authored-by: github-actions <github-actions@github.com>
2024-03-21 08:25:27 +00:00
Vedanshu Jain 265f3403e2
New filter to set a custom precision value for the WC calculations (#45743)
* New filter to set a custom precision value for the WC calculations

* Add changelog and docblock.

* Add since tag.

* Add since tag.

* Add prefix + correct version.

* Better filter name

---------

Co-authored-by: Yordan Soares <contacto@yordansoar.es>
2024-03-21 07:53:40 +00:00
Vedanshu Jain 622c178f28
[Tweak] Fix comment in order-received.php template (#45742)
* [Docs] Correct filename

* PHPCS fixes.

* Fix version number.

---------

Co-authored-by: konradpomocny <36989635+konradpomocny@users.noreply.github.com>
2024-03-21 07:48:02 +00:00
Luigi Teschio 7f45f13c7d
CYS - Core: fix: not mark Customize your store step as completed when the user switches theme (#45762)
* CYS - Core: fix: not mark   step as completed when the user switches theme

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

* trigger CI

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 22:47:05 +00:00
Roy Ho 5acef655b8
Add gap between quantity field and add to cart button when stacked (#45758)
* Add gap between quantity field and add to cart button when stacked

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

* Add specificity to quantity

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 15:41:10 -07:00
Michael Pretty bef14c0320
Add index to zone_id column for woocommerce_shipping_zone_locations (#45598)
Add an index to the zone_id column of woocommerce_shipping_zone_locations.
Remove the separate index on location_id. Shipping zone locations are read by zone_id when a ShippingZone is read from the database. The zone_id is also used in join statements with the shipping zones table. So an index would improve performance there. The separate KEY for the location_id column is not needed as the primary key for the table already creates an index automatically.
2024-03-20 15:14:23 -07:00
Fernando Marichal d5651111fa
Update product editor experiment name and enable pre-publish panel by default (#45745)
* Enable prepublish panel by default

* Rename experiment

* Add changelog

* Fix e2e tests

* Fix disable-block-editor
2024-03-20 17:14:54 -03:00
Adrian Moldovan 207cccdc33
[e2e tests] Improve test stability by using a stricter locator when checking product variation (#45710)
Use a stricter locator when asserting the size variation
2024-03-20 16:21:43 -03:00
Alba Rincón 90f322a7f2
Improve hero product chessboard pattern spacing (#45756)
* Improve hero product chessboard pattern spacing

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 18:56:54 +00:00
Alba Rincón 87bfa48638
[CYS] Fix the border of the toggle control in the assembler (#45744)
* Fix the color of the toggle control in the assembler

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 19:03:31 +01:00
Niels Lange be63107c92
Improve local pickup flow (#45614)
* Update shipping calculation copy

* Update shipping calculation copy

* Update shipping calculation copy

* Update legacy local pickup copy

* Remove ‘target="_blank"’ and ‘rel="noopener noreferrer"’

* WIP: Conditional message and display of legacy local pickup option

* Make util function static

* Make texts translatable

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

* Fix PHPCS errors

* Fix PHPCS errors

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

Co-authored-by: Gerhard Potgieter <potgieterg@gmail.com>

* Remove duplicate helper method

* Improve helper method

* Replace “esc_html__” with “wp_kses” to keep URL clickable

* Optimise is_legacy_local_pickup_active() method

* Adjust CSS definitions

* Refactor is_cart_block_default() and is_checkout_block_default()

* Ensure that Rest of the World shipping methods are available

* Remove obsolete space

* Adjust text spacing

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Gerhard Potgieter <potgieterg@gmail.com>
2024-03-20 14:54:12 +00:00
Thilina Pituwala d065b786f5
Remove the ability to update Woo.com extensions not available in WP.org plugin directory (#44279)
* Remove the hook for updating update_plugins transient with data fetched from Woo.com

This prevents the WP core from updating Woo.com plugins.

* Remove the hook for updating update_themes transient with data fetched from Woo.com

This prevents the WP core from updating Woo.com themes.

* Remove the class hand hooks used for updating the API response of WP.org with update URI's from Woo.com.

* Add change log file.

* Add update_plugins and themes transient update hooks back while removing the package from Woo.com extensions.

When a Woo hosted plugin has an update, this will allow showing the update message but block the ability to update.

* Adding a hook to modify the plugin update notification on plugins.php.

When a Woo.com hosted plugin has an update available it will show a message to install Woo Marketplace plugin, if it's not installed.

* Utility class for Woo Marketplace plugin.

* Check wether the Woo marketplace plugin is already installed before modifying update notice.

* Update docblocks.

* Add status end point for wccom-site API.

* Check the existence of marketplace plugin only after the plugins are loaded.

* Add WP.org plugin api response updater back to core.

* Function to identify if the market-place plugin is installed.

* Update status API response with installation status.

* Update the status variable push to store admin frontend with information about market-place plugin.

* Styles for woo-connect-plugin component.

* Component for displaying the message to install Woo Connect plugin based on the installation status.

* Add Woo Connect plugin notice to my-subscriptions page.

* Add Woo connect plugin message to discover page.

* Add Woo Connect install/download urls to constants file.

* Add a modal for asking the user to install Woo Connect plugin.

* Update strings with constants.

* Show the Woo Connect modal when user updating plugins without Woo Connect installed.

* Show Woo Connect install notifications only when the site is connected.

* Update plugin management page messaging.

* Update notification on connect screen.

* Update notifications on plugin management page.

* Remove additional spacing in Plugin Install Notice and spacing in the discover page results and the notice.

* Use notice component instead of Card.

* Minor improvements to readability.

* Add translation support for messages displayed on plugins.php.

* Update woo connect plugin installation URL (#45127)

* Ad functions for generating WooConnect plugin install URLs.

* Make WooConnect install url to available to marketplace components.

* Make WooConnect install url to available to marketplace components.

* Link install buttons to install URL with access_token and secret.

* Update Woo Update Manager download url.

* Show admin notice to install Woo Update Manager on plugins.php.

* Adding the view for admin notice for installing woo_update_manager.

* Show woo update manager installation notice on WC admin pages and make the notice dissmisable.

* Update the install url for Woo Update Manager by adding the product ID and introduce a filter to override the product ID.

* Change the plugin name to Woo Update Manager.

* Change the download url for woo update manager

* Fix the margin below the Woo Update plugin install notice.

* Rename Woo Connect to Woo Update Manager.

* Rename wccom-site status endpoint response variables based on plugin name changes.

* Update the plugin main file name for Woo Update Manager.

* Updating the download URL.

* Updating css class names and file names from `woo-connect-plugin` to `woo-update-manager`.

* Change wooConnect variables to wooUpdateManager.

* Rename WC_Helper_Plugin to WC_Woo_Update_Manager_Plugin and remove references to market place plugin.

* Extract and reuse the logic for creating the signature.

* Use WC built-in method to check if the current page is a WC page.

* Add source parameter for installer.

* Update text copies based on flows for in-app Woo Update Manager install message.

* Update admin notice based on the flows.

* Update connect store message.

* Update the text based on the latest flow and show a different message when WUM is installed but not activated.

* Use html text for install notice message.

* Implement the bubble showing number of updates available on WooCommerce -> Extensions menu. Add one to available Woo.com updates if WUM is not installed or activated.

* Update install url to new structure.

* Update download url for WUM.

* Add a method to get the id of the WUM.

* Remove WUM from available to install list of extensions on my-subscriptions tab.

* Remove the hard coded ID of the Woo Update Manager and use the slug to get the ID of the plugin based on update-check response.

* Fixing the notice generated due to empty body.

* Update CTA and image for the not connected screen.

* Increasing the left margin of the install notice to match admin notices.

* Add close button to modal with message to activate WUM.

* Add install/activate notice to Browse and Themes tabs.

* Add the view for showing admin notice for activating the plugin.

* Update plugin name on install admin notice.

* Show install or activate admin notice based on the context.

* Update comment

* Make the linked text shorter in plugin update message.

* Generate a signed auto-install URL for woo hosted plugins without helper API (#45313)

* Generate a signed auto-install URL for woo hosted plugins without helper API

* Use product slug in auto-install URL instead of product id.

* Update activate Woo Update Manager modal buttons.

* Change install url from Woo Update Manager ID to slug.

* Allow defining the menu title and page title separately for when adding menus and sub menus in WooCommerce Admin.

* Set the page title separately for WooCommerce Extensions menu.

* Fix the update count issue.

* Update the download URL for Woo Update Manager.

* Update the download link for WUM in admin notices.

* Show WUM admin notices on WC Admin pages only when the site is connected.

* Remove additional slash in plugin admin url.

* Add wum-installed parameter to the connect URL (#45702)

* Add wum-installed parameter to the connect URL

* Send status of Woo Update Manager installation on connection init.

* Revert "Add wum-installed parameter to the connect URL"

This reverts commit 4c55038b03.

---------

Co-authored-by: Denis Dvali <denis.dvali@automattic.com>

* Fix lint errors.

* Fix lint error.

* Fix lint errors.

* Fix js lint issues.

* Update Woo Update manager admin notice.

---------

Co-authored-by: Muhammad Anas <anastts.pk@gmail.com>
Co-authored-by: Denis Dvali <denis.dvali@automattic.com>
2024-03-20 15:02:23 +01:00
Adrian Moldovan a7fb611665
[e2e tests] Fix create a simple product test flakiness (#45700) 2024-03-20 11:01:12 -03:00
Remi Corson 7c7ed0d7c4
Use WC built-in Action Scheduler to fetch in-app promotions (#45628)
* Use WC built-in ActionScheduler

* Calling `WC_Admin_Marketplace_Promotions::init` immediately from `WC_Admin` constructor. `WC_Admin` is only instantiated in an admin request. If we init marketplace promotions from `woocommerce_init`, we'll be too late to add the callback for the scheduled action that fetches promotion data.

* Changed transient life to 12 hours to match frequency of ActionScheduler action.

* Changelog.

* Updated `fetch_marketplace_promotions` to replace the transient every time it runs. This allows more frequent changes.

* Added filter to allow promotions to be suppressed.

* Fix indentation

* More indentation fix

* Clearing scheduled action if `woocommerce_marketplace_suppress_promotions` filter returns "true".

* Running `clear_scheduled_event` on `init`.

* WP_CLI check

* We were including and instantiating `WC_Admin_Marketplace_Promotions` from the `WC_Admin` constructor. But `WC_Admin` is only instantiated during `is_admin` requests. We also need to respond to cron requests. So we're now including the class from `class-woocommerce.php` if the context is admin or cron, and instantiating it on `init`. This fixes the error in Scheduled Action `action failed via WP Cron: Scheduled action for woocommerce_marketplace_fetch_promotions will not be executed as no callbacks are registered.`

* Linter errors.

* Enhance append_bubble() method

* introduce SCHEDULED_ACTION_INTERVAL

* Make linter happier

* Linter errors.

---------

Co-authored-by: Remi Corson <1649788+corsonr@users.noreply.github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
2024-03-20 15:00:41 +01:00
Adrian Moldovan 13ac9141a1
[e2e tests] Stabilize product quick delete test (#45636) 2024-03-20 10:59:48 -03:00
Karol Manijak a6500aa572
Prevent warning if there was no post ID available in some product elements (#45675)
* Prevent warning if there was no post ID available in some product elements

* Add changelog
2024-03-20 14:49:02 +01:00
Luigi Teschio 55cd1982dc
CYS: Fix Header/Footer template parts disappear (#45735)
* CYS: Fix Header/Footer template parts disappear

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

* show pattern list only when the site editor is ready

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 13:28:56 +00:00
nigeljamesstevenson 767528215b
Update Action Scheduler to 3.7.3 (#45739)
* Update Action Scheduler to 3.7.3

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 13:27:02 +00:00
Jorge A. Torres 4ce5bb55b4
Prevent possible type error during `WC_Install::create_options()` (#45730)
* Prevent possible type error during `WC_Install::create_options()

* Add changelog

* document the `woocommerce_get_sections_' . $this->id` filter

---------

Co-authored-by: Leif Singer <git@singer.sh>
2024-03-20 13:12:37 +00:00
Roy Ho 3ef4fc88a5
Rating filter: fix misaligned count (#45674)
* Rating filter: fix misaligned count

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 05:24:47 -07:00
Niels Lange fa49848cf9
Fix broken CSS classes and update JS unit snapshots (#45732)
* Fix broken CSS classes and update JS unit snapshots

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 17:42:05 +07:00
Erik Golinelli 49b92070cc
Removes the star icon font (#31670)
* removes the star font
The WooCommerce font can hold many other icons there isn't the reason to load a font for a single icon

* updates custom templates stylesheets

* adds woff2 font format to themes customized stylesheets

* fix the star font size diff

* removes WooCommerce.eot and SVG file that are no longer needed and updates the template style in order to import from font.scss

* Optimized font import
Unifies the import of fonts by extending it to the twenty-twenty-three theme

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

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

* Svg font minification (WooCommerce.svg)

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

* "star" font phasing out
The font family 'star' was replaced in all files. However, it continues to remain physically in the repo but not in the style files

* Removes the `.eot` font file since nowdays it's completely useless

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 11:28:27 +01:00
Paulo Arromba 0a3cf74c06
Validate and present custom error for not in allowed emails coupons (#43872)
* Removed deprecated WC_COUPON::is_valid() method usage from CartController.php

* Reverted wrongly changed line.

* Added validate_coupon_allowed_emails() to WC_Discounts

* Added soft validation for allowed emails coupons, with custom notice via WC_Coupon::add_coupon_message()

* Fixed log warning

* Refactored add_coupon_message()

* Prevent duplicate coupon notices.

* Changed coupon soft validation notice type.

* Tweaks

* Run coupon soft validations only on cart validation.

* Reverted soft validation, and added email information for coupon validation

* Removed unused coupon message

* PHP lint fixes.

* Added changelog.

* PHP lint fix

* Updated allowed coupon validation error message

* Updated PW tests

* Updated PW tests

* Updated email restricted coupon message.

* Small change for readability.

* Different error messages for shortcode cart and shortcode checkout

* Simplified CartApplyCoupon::get_post_route_response()

* Revert "Simplified CartApplyCoupon::get_post_route_response()"

This reverts commit 43f185b59a.

* Expose additional error data in error API response

* Simplified AbstractCartRoute::get_route_error_response()

* Linting

* Restored comment deleted by mistake.

* Introduced API context based coupon errors

* Fixed Doc Block

* Linting

* Reverted deprecated method removal

* Reverted deprecated method removal

* WIP

* Display context based errors on cart and checkout for allowed emails coupons.

* Small code fixes.

* Removed coupon_error_code from api response.

* Tweaks and used 'details' on the API response

* Fixed indent.

* Set coupon errors using the validation store rather than local state

* Revert import to original state.

* Updated tests.

* Updated tests.

* Simplified comments

* Added testing for Cart page

* Lint fixes

---------

Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2024-03-20 10:19:06 +00:00
Alba Rincón 211d39d453
[CYS] Go to the assembler when the cys task is completed (#45713)
* Show modal when the task is completed

* Go to the assembler when the theme was already customized

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

* Fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 10:51:33 +01:00
Simran Vijwani 28f79b4ebe
Fix is_read value in Admin notes (#43096)
* Add is_read property to note data

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

* Remove unnecessary type casting

* Fix boolean typecasting in DataStore and Note classes

* Restoring the original `isset( $note_row->is_read )` condition. I believe it's there for notes without this property.

* WC_Admin_Tests_Notes_Data_Store::test_read to account for return type of `get_is_snoozable`.

---------

Co-authored-by: Simran <simran.kaur@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: And Finally <andfinally@users.noreply.github.com>
2024-03-20 09:37:44 +00:00
Néstor Soriano 1adeaf225c
Install the Legacy REST API plugin on WooCommerce upgrade if needed (#45570)
The plugin is installed and activated if it's not installed already
and either the Legacy REST API is installed in the site
or there's at least one webhook that uses the Legacy REST API
code for the payload (disabled webhooks also count).

Also the WC_Admin_Notices::remove_notices method is added.

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-03-20 10:24:46 +01:00
Walther Lalk 3c15ced8fd
Proof of Concept for allowing product tour to be extensible (#45617)
* Add the ability to extend/modify the steps in the product tour

* Remove unused import

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

* Add data validation

* Correct import order

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 09:22:21 +00:00
Alba Rincón 7b22412508
[CYS] Transitional page: fix margins and make the 3rd question not required (#45709)
* Fix margins and make the 3rd question not required

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-20 09:46:38 +01:00
Paul Sealock 1849d94c52
Payment Gateways: Update Airwallex png (#45694)
* Update Airwallex png

* Update Airwallex png

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

* resize

* 144px

* remove old

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-03-20 13:35:21 +08:00
Paul Sealock 27a473ec8b
Launch your store: Address status issues and filesystem (#45688)
* Conditionally show status on homescreen

* get lys link in status

* refactor launch-store folders

* remove unused function

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-03-20 11:26:17 +08:00
Patricia Hillebrandt fda79df11b
[CYS on Core] Remove the Feature Flag from the Customize Your Store flow on Core (#44824)
* Disable the feature flag from the CYS.

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

* Fix unrelated failing e2e test for the 'Get paid' page

* Revert "Fix unrelated failing e2e test for the 'Get paid' page"

This reverts commit d388fce212.

* Fix potential flaky test

* Revert "Fix potential flaky test"

This reverts commit 77fa2813f2.

* Temporarily remove the Can visit the WooPayments Connect page instead of setup task for supported countries test

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: elazzabi <ahmed.el.azzabi@automattic.com>
2024-03-19 20:48:23 +00:00
Dan Q b0ea77326f
Add styling to marketplace to identify sponsored products (#45684)
* Pass 'Sponsored' detail down to product cards from API

* Style a "Sponsored" label

* Stripe on top of sponsored products

* Add 'blob' next to sponsored listings

* Fix indentation bug

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

* Update plugins/woocommerce-admin/client/marketplace/components/product-card/product-card.tsx

Co-authored-by: Remi Corson <remicorson@gmail.com>

* Update plugins/woocommerce-admin/client/marketplace/components/product-card/product-card.tsx

Co-authored-by: Remi Corson <remicorson@gmail.com>

* Update plugins/woocommerce-admin/client/marketplace/components/product-card/product-card.tsx

Co-authored-by: Remi Corson <remicorson@gmail.com>

* Apply suggestions from code review

Co-authored-by: Remi Corson <remicorson@gmail.com>

* Add missing close parenthesis following linter changes

* Make linter happier about hex colors (still needs variablising)

* Fix margins around vendor name

* Fixed height of product stripe

* Linting

* Moved color to variable and calculated alpha using Sass functions

* Update plugins/woocommerce-admin/client/marketplace/components/product-card/product-card.scss

* Update plugins/woocommerce-admin/client/marketplace/stylesheets/_variables.scss

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Remi Corson <remicorson@gmail.com>
2024-03-19 18:10:34 +00:00
nigeljamesstevenson f4c4aa3567
Update stable tag to 8.7.0 (#45719)
woorelease: Update stable tag to 8.7.0
2024-03-19 17:32:03 +00:00
Patricia Hillebrandt 61236dab0d
[CYS on Core] Ensure the "Didn’t find a theme you like" text is displayed exclusively at the bottom of the themes card (#45706)
* Ensure the 'Didn’t find a theme you like' text is displayed exclusively at the bottom of the themes card

* Limit the display of the CYS design banner to the Themes screen.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-19 17:57:24 +01:00
Patricia Hillebrandt 2fc83cbe85
[CYS on Core] Add the sample product badge before the product name to mark placeholder products. (#45691)
* Add the sample badge to dummy products on the main products list.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-19 16:51:38 +00:00
jonathansadowski 8631fb5d48
Prepare for WP 6.5 by updated tested / required versions. (#45633) 2024-03-19 11:47:51 -05:00
Ilyas Foo 5485665727
Refactor remote specs structure and naming (#45547)
* Deprecate DataSourcePoller

* Deprecate and move all rule processors and transformers

* Lint

* More deprecation

* Remove extra line

* Update deprecated class to not produce too many messages by limiting to unique messages

* Changelog

* Update all dependency uses, move TransformerService and TransformerInterface to Transformers package

* More dependency update

* Changelog

* Fix wrong file reference

* Lint markdown

* Lint markdown

* Add unsaved file

* Delete unused file and more lint

* More lint

* Ugh ignore faulty lint rule

* Rename variables for lint
2024-03-19 22:15:05 +08:00
github-actions[bot] 7214a1ffee
Delete changelog files based on PR 45490 (#45621)
Delete changelog files for 45490

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-03-19 12:53:45 +00:00
Alba Rincón f2a8c7fe36
[CYS] Update the woo.com themes link to include the back url (#45661)
* Update the woo.com theme link to include the back url

* Encode url to avoid losing the path param

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

* Fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-19 11:52:55 +01:00
Luigi Teschio 1d1f7ddc3b
[CYS]: Fix event transitional page (#45678)
fix event transitional page
2024-03-19 10:34:36 +00:00
Fernando Marichal f6738e4431
Fix organization tab e2e tests (#45692) 2024-03-19 11:57:17 +02:00
Karol Manijak 6cb52c00c0
Product Collection: add e2e tests with all product elements included (#45623)
* Prepare test cases

* Shorten out the test description

* Add first test in a post with dummy expect

* Verify all content is displayed

* Add the test in Product Archive and Home Page

* Add changelog

* Add tag to Beanie product

* Switch to Beanie which is on sale to verify on sale badge

* Add comments to explain the expects

* Adjust the expected content

* Switch to lower case in expect

* Switch from woocommerce/product-summary to core/post-excerpt

* Adjust products.sh

* Improve method waiting for products to show so it;'s deterministic

* Refresh locators in template

* Remove unnecessary check

* Eslint disable: expects are extracted to function so disable eslint compaining there's no expect

* Adjust other test after amending products setup

* Change the verify happening in a wrong place

* Tests adjustments

* Revert Blog Home template before performing a test

* Fix other tests
2024-03-19 08:59:58 +01:00
Roy Ho 72f5db9b6d
Change checkbox label to be inline-flex to limit the width to the content (#45603)
* Change checkbox label to be inline-flex to limit the width to the content

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

* Fix changelog entry

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

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-18 13:05:49 -07:00
Maikel Perez dea68ee3e3
Handle taxes not being enabled and customized tax classes (#45531)
* Create and register the woocommerce/product-select-field block

* Replace the tax class radio group block by woocommerce/product-select-field block

* Hide tax fields when taxes are disabled

* Hide tax fields when taxes are disabled in product variations

* Add changelog files

* Fix linter errors
2024-03-18 18:09:03 +00:00
Gan Eng Chin 718fe762fa
Add formatting for Cost and Sales numbers in Campaigns card in Marketing page (#44917)
* Return formatted cost and sales price for MarketingCampaigns.

* Display formatted cost and sales number in Campaigns card.

* Use price formatting.

* Format decimal places based on currency.

* Add changelog.

* Fix type issue is useCampaigns.test.ts.

* Use wp_strip_all_tags to respect currency symbol positioning settings.

Without wp_strip_all_tags, the result contains <bdi> element, and it causes browser to show the currency symbol in unexpected unwanted position.

* Fix PHP linting issue.

* Fix tests in useCampaigns.test.ts.

* Use html_entity_decode to remove dangerouslySetInnerHTML usage.

* Remove unneeded code formatting in Campaigns.tsx.

* Add explanation comment for `get_formatted_price`.

* Fix PHP lint error.

* Use map instead of filter to get price format.

* Add code comment.

* Get currency info based on user locale or default locale.

* Use locales in locale-info.php instead of currency-info.php.

Co-authored-by: Bartosz Budzanowski <bartosz.budzanowski@automattic.com>

* Code formatting and fix code comment.

* Fix lint errors.

---------

Co-authored-by: Bartosz Budzanowski <bartosz.budzanowski@automattic.com>
2024-03-19 01:56:08 +08:00
Luigi Teschio f9c0d406ae
CYS - Core: install font when user clicks opt-in (#45580)
* CYS - Core: install font when user clicks opt-in

* remove debugger

* CYS - Core: fix wp-admin page visible when click on start designing

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

* use sendEvent instead of redirect

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

* not show wp-admin after the click on the dialog button

* use sendEventToIntroMachine

* fix font installation

* fix eslint error

* fix install font phase when the iframe is not loaded

* remove not necessary async

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-18 16:49:41 +01:00
Fernando Marichal d69ceaa0a1
Add e2e tests for Organization tab (#45532)
* Add e2e tests for Organization tab

* Add changelog

* Unfy test
2024-03-18 12:44:45 -03:00
Fernando Marichal 9a2006b7e9
Add tests for variable product (#44818)
* Add toggleProductVariationTour

* Add tests

* Remove commented line

* Add changelog

* Change waitFor

* Add click to field

* Remove toggleProductVariationTour

* Set SKU

* * Add function to disable the variable product block tour

* Isolate variation tests

---------

Co-authored-by: Adrian Moldovan <adim.moldovan@gmail.com>
2024-03-18 11:58:45 -03:00
Maikel Perez 979a3c7b62
Remove 'List price' and 'Sale price' fields from the General tab (#45495)
* Remove 'List price' and 'Sale price' fields from the General tab

* Add changelog file

* Fix e2e tests
2024-03-18 11:54:39 -03:00
Albert Juhé Lluveras d8c23c4e3a
Fix block templates not being rendered in extension taxonomies (#44850)
* Fix block templates not rendering in some circumstances

* Add changelog file

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-03-18 13:03:18 +01:00
Paul Sealock 12c1a6d206
Launch Your Store: Add status dropdown functionality (#45606)
* Add basic wp dropdown component

* use getAdminLink

* Add styling based on state

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

* update store page only text

* Add better 'for now' comment

* translate links

* remove private repo link from comment

* lint

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-18 17:43:02 +08:00
Chi-Hsuan Huang 63a0d5e57c
Add generic function to determine if URL is a store page (#45299)
* Add is_store_page helper function

* Add changelog

* Update doc

* Update doc

* Revert unneed changes

* Fix test

* Fix lint

* Fix typo

* Add woocommerce_store_pages filter
2024-03-18 16:29:13 +08:00
Alba Rincón 5e8bf7dbd6
[CYS on Core] Align the badge component in the themes intro screen (#45626)
* Use theme color to style the theme badge component

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

* Fix linting errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-18 09:17:40 +01:00
Thomas Roberts dd4babfdf8
Ensure address field is in address schema before sanitizing/validating it (#45394)
* Ensure field is on schema before sanitizing/validating against it

* Sanitize the key as a text field if we don't know what it is

* Add changelog

* Revert "Sanitize the key as a text field if we don't know what it is"

This reverts commit 9f5071051c.

* Revert "Ensure field is on schema before sanitizing/validating against it"

This reverts commit 109fbe766c.

* Omit unknown items in sanization

* add test doc block

---------

Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
2024-03-18 15:00:10 +07:00
RJ dbd577cbd6
add/lys xstate scaffolding (#45548)
* dev: added xstate 5

* add xstate scaffolding for launch your store
2024-03-18 15:44:32 +08:00
Karol Manijak 5a54dd6527
Product Collection: Disable client side navigation if blocks incompatible with Interactivity API are detected (#45435)
* Add dummy Force Page Reload control to Inspector Advanced Control

* Add enhancedPagination attribute that decides if client side navigation is enabled

* Consume the enhancedPagination attribute

* Force client side navigation when incompatible blocks detected

* Dummy util to detect incompatible blocks

* Detect incompatible blocks in the Editor

* Switch to WordPress Interactivity package in Product Collection

* Add initial implementation of the incompatible blocks detection in frontend

* Remove leftover

* Revert to using internal version of interactivity API

* There's no Interactivity store config available in the internal Interactivity implementation so remove it

* Disable client side navigation if the incompatible block is detected

* Add default attribute value

* Switch from enmhancedPagination attribute to forcePageReload

* Fixed some misclicked line order change

* Switch from enhancedPagination to forcePageReload in PHP code

* Apply the correct filter

* Fix the incorrect condition to detect incompatible block

* Initial implementation of orange dot to bring attention

* Cleanup

* Remove the orange dot indicator

* Refactor checking for unsupported blocks

* Add changelog

* Fix PHP lint errors

* Bring back empty line at the end of pnpm-lock

* Bring pnpm-lock.yaml file to original state

* Fix incorrect function call

* Add visibility description to function

* Switch private method to public

* More linted fixes
2024-03-18 08:24:03 +01:00
George Stephanis 3873bac561
Add an action to link sessions to customer ids. (#45146)
Fires an action after a customer has logged in, and their guest session id has been deleted with its data migrated to a customer id. This hook gives extensions the chance to connect the old session id to the customer id, if the key is being used externally.

Fixes #44852
2024-03-15 17:33:10 -07:00
Christopher Allford f5f2bb035a
Product Collection: Added `timeFrame` PHPUnit Tests (#45365) 2024-03-15 16:30:46 -07:00
Bhupesh Mishra 7ded649fa7
Update content used to generate Refunds page (#45292)
Updates the markup used to generate the Refunds page so that it is valid, semantic HTML, which in turn fixes an alignment issue.

Fixes #45213

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-03-15 15:14:00 -07:00
moory-se b13f0b0dcb
Add woocommerce_widget_layered_nav_term_anchor_text filter (#40734)
Adds a new filter to the legacy Active Product Filters widget that allows the attribute names to be modified.

---------

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
2024-03-15 14:49:39 -07:00
Fernando Marichal 184459b359
Rename ProductTemplate namespace (#45594)
* Rename ProductTemplate namespace

* Add changelog

* Fix loader
2024-03-15 18:05:36 -03:00
Alexandre Lara 21f2a15e97
Product Filter: Price (Beta) block - Disable block interactions within the editor (#45602)
* Disable block interactions within the editor

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 17:18:25 -03:00
Alexandre Lara 85ec4a8cc1
Product Filter: Attribute (Beta) block - Fix block preview (#45558)
* Pass isPreview prop to inner blocks of the Product Filter block

* Add logic to render preview block when in Preview mode

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 16:27:01 -03:00
Bart Kalisz 1c1dc10958
Blocks E2E: Fix guest user handling in checkout tests (#45624) 2024-03-15 17:23:19 +00:00
Luigi Teschio 25c804ae7c
CYS - Core: fix Product Rating block renders (#45600)
* CYS - Core: fix Product Rating block renders

* add comment

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 17:01:56 +00:00
Luigi Teschio e5d33df9ab
CYS - fix warning Tooltip (#45592)
* CYS - fix warning

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 16:28:47 +00:00
Seghir Nadir 6016aad6c2
Add unit tests to Checkout Additional Fields (#45499)
* try running tests

* add additional fields unit tests

* add keys back to Cart tests

* add extra checks to unit testing

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

* address feedback

* fix linting issues

* add docblock

* escape errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 15:02:43 +00:00
Seghir Nadir 0000d754c1
Add snapshot tracking for Checkout additional fields. (#44310)
* add snapshot tracking

* add changelog

* address feedback

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

* update changelog

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

* remove the extra changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 14:43:05 +00:00
Ahmed ed3aab14cc
Redirect to WooPayments Connect page in the Payments task (#45540)
* Add get_action_url for Payments task

* Check if plugin active before redirecting to connect page

* Add changelog

* Fix linting issues

* Point payments task to welcome page when WCPay incentive active

* Point WooPayments installed task to Connect page

* Rename WooPayments to payments

* Add from query arg

* Adjust payments task URL logic to account for suggestions logic

* Fix for partially onboarded accounts

* Replace Get paid with WooPayments

* Add new test for unsupported countries

* Add missing api definition

* Add missing baseURL

* Maybe change order of tests to fix failing test

* Revert changes to package.json (error in push)

---------

Co-authored-by: Vlad Olaru <vlad@pixelgrade.com>
Co-authored-by: oaratovskyi <oleksandr.aratovskyi@automattic.com>
2024-03-15 12:08:04 +00:00
Jorge A. Torres d9013d4737
Do not trigger 'pre_update' logic for HPOS option when value remains unchanged (#45604)
* Add changelog

* Do not trigger pre_update logic for HPOS setting when not actually
changing value
2024-03-15 12:46:15 +01:00
Jorge A. Torres 72cb02ac47
Try to account for and re-create backup posts when syncing orders (#45332) 2024-03-15 12:31:14 +01:00
Patricia Hillebrandt 488bb62d82
[CYS on core] Introduce the Transitional page, i2 (#45546)
* Update the transitional page.

* Update icons

* Remove unnecessary div class

* Update the styles for the transitional page.

* remove the editor param

* conditionally display the survey button

* Additional layout changes

* Streamline the classes for the icons

* Import brush and tag from wordpress/icons

* delete the custom icons from Woo as they already exist on wordpress/icons and can be imported from there.

* Update styles for adding support to mobile view.

* Update the lesson-plan icon.

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

* Update e2e tests to account for the changes made to the transitional page.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 12:27:08 +01:00
Néstor Soriano fb32ab6c5a
Exclude the Legacy REST API plugin from the feature compatibility UI (#45610) 2024-03-15 11:44:17 +01:00
Alba Rincón ad8f76b2e9
[CYS] Fix the failed to load resource error in the CYS whenever the current active theme is not TT4 (#45519)
* Install and activate the TT4 before any other step on the loader

* Show the loader while activating the theme

* Try running steps together in parallel

* Try to run install and global styles in the same function

* Handle when the active theme returns null

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

* Add retries and types to fix lint errors

* Fix lint errors

* Fix more lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 11:09:31 +01:00
Luigi Teschio 21d4fd7786
CYS - Core: fix wp-admin page visible when click on start designing (#45586)
* CYS - Core: fix wp-admin page visible when click on start designing

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

* not show wp-admin after the click on the dialog button

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-15 08:17:20 +00:00
Matt Sherman afe0e0724b
Product Editor: Handle loading of product editor when global settings are not available on initial render (#45490)
* Do not pass settings from global down to editor; let BlockEditor handle loading settings itself

* Changelog

* Changelog
2024-03-14 13:02:40 -04:00
Christopher Allford 23a148aa18
Added Result Count Client Navigation (#45556)
Since the product collection block uses the interactivity router,
it reloads the page in the background and replaces sections
with a `data-wc-navigation-id` set. This adds the attribute
to the count block so that it can also live reload regardless
of where it is in the tree.
2024-03-14 09:48:02 -07:00
Niels Lange e91be1a458
Disable checkout menu when checkout block is default (#45538)
* Disable checkout menu when checkout block is default

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-14 15:42:59 +01:00
Thomas Roberts 5cbb0ad5bf
[Experimental] Add E2E tests for Additional Checkout Fields (#43836)
* Add additional-checkout-fields-test-helper wp-env plugin

* Ensure Checkout page waits for email to be visible before filling

* Handle additional fields in checkout page utils

* Add test for filling additional checkout fields

* Add additional check for gov-id validation

* Close context used for plugin-checking

* Update types for additional fields to be key/value objects

* Check billing gov-id is different to shipping one

* Move additional fields plugin to inline with checkout tests

* Use additional fields plugin from local dir

* Await email input to check Checkout block is loaded

* Add test to verify error message shows when leaving a field blank

* Update comment

* Add test for checking/unchecking checkboxes

* Update check in additional field test plugin

* Change fields multiple times in one test

* Add server-side validation tests

* Get exact matches for checkout form fields

* Remove unnecessarily translated strings

* update hook in test plugin to compare to confirmation gov id

* Fill in gov ID confirmation field

* Register a field of each type in each location

* Don't validate field unless both are filled

* Fill additional fields and check their values

* Fill additional fields

* Check select values in order confirmation

* Change the values of all field types multiple times

* Make checkout wait until not calculating before submitting

* Update tests to use all additional field types

* Blur after editing select box

* Add customer area checks

* Check shipping isn't calculating before submitting

* Add merchant-side tests for additional checkout fields

* Ensure customer data is done updating before submitting

* use waitForFunction to check for updating shipping

* Add changelog

* Ensure fields are blurred before pressing button

* Update validation error check

* Add test for logged out shopper

* make specific function to wait for checkout to be finished updating

* Add test to ensure fields are saved across orders

* Add sanitize and validate callbacks to gov id fields

* Make purchase type select field required

* Add sanitization test

* Use experimental function in test plugin

* Add standalone sanitization filter test

* Update testing plugin to use new and renamed filters

* Fix typo

* Move empty value test to logged out shopper block and check empty val

* Update tests to include tests for new validation/sanitization filters

* Add verifyAdditionalFieldsDetails function to checkout page

* Use new verifyAdditionalFieldsDetails function to improve readability

* Update second test to use new function to improve readability

* Update third test to improve readability

* Update fourth function to improve readability

* Update fourth test to improve readability

* Update guest shopper test to be more readable

* Update helper function to only return value not assert

* Remove check causing test to fail in CI

* Make check for guest shopper same as logged in

* Move guest shopper tests to their own file

* Ensure unchecking checkbox works OK
2024-03-14 13:39:30 +01:00
Niels Lange a7383579be
Allow usage of block notice templates when using classic themes (#45164)
* Allow block notice templates in classic themes

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

* Fix e2e constants file

* Improve inline comments

* Add filter and enhance e2e tests

* Adjust test names

* Adress PHP lint errors

* Adress PHP lint errors

* Adress PHP lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-14 19:33:33 +07:00
RJ 59635fb4c8
add: update onboarding task list copies and illustrations (#44854) 2024-03-14 15:20:31 +08:00
Patrick Rauland 72f75edf58
Adding accessible markup to sale price. (#44413)
* Adding accessible markup to sale price. See #31099

This PR adds accessible markup to the sale price.

A user who only uses screen reader software can now hear and understand the original price as well as the current price.

This is important for accessibility.

Full issue: https://github.com/woocommerce/woocommerce/issues/31099

* Improving sale price string formatting & localization #31099

This PR merges in feedback from the WooCommerce team.

* Improving string translation & output. Giving RTL languages more customization with the price in the translatable string.
* Formatting regular price & sale price at the top and then inserting into the HTML below. This prevents some sloppy logic where you might print out a blank del or ins tag.

* Swapping esc_html & sprintf #31099

Reversed the esc_html() and sprintf(). This is intentional because if translations accidentally include some HTML, that could break things.

Also, stripping HTML tags in $formatted_regular_price so that the end result in the screen-reader-text span is just plain text.

* Adjusting white space #31099

Mostly removing white space for the lint checker

* Adding translator comments #31099

Adding translator comments for lint

* Add changelog

* Fix some PHPCS violations

* Fix unit tests

* Adjust E2E test

---------

Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-03-13 20:43:44 -03:00
Jorge A. Torres b3c328d4e4
[HPOS CLI] Add support for backfilling specific properties or metadata (#45171)
* `wc hpos diff` command enhancements

* Add support for partial backfills to LegacyDataHandler

* Add unit tests

* Add support for partial backfills to `wp wc hpos backfill` CLI tool

* Add changelog

* Augment update_order_from_object() with args parameter

* Implement update_order_from_object() for HPOS

* Simplify partial backfill logic in LegacyDataHandler

* Move prop name validation to legacy data handler

* Apply changes to order before passing to backfill functions

* Simplify update_order_from_object() in HPOS datastore

* Simplify order update from object across datastores

* Undo change

* Minor fix for CPT version (which only takes order differences into account)

* Improve readability around ‘woocommerce_orders_table_datastore_should_save_after_meta_change’ filter

* Commit docblock suggestion

* PHPCS fixes

* Enhance unit test
2024-03-13 19:29:49 -03:00
Maikel Perez 0fc75c5148
Remove Custom Fields for New Product Editor (#45493)
* Add remove custom field for the new product editor

* Add changelog file

* Show add button when the custom fields are empty

* Ensures to always convert the metas into a string array since it can be anything

* Add changelog file
2024-03-13 19:16:12 -03:00
Barry Hughes 3f1dbd5b13
Switch from "invoice" to "order details" in our emails. (#45395)
* Switch from "invoice" to "order details" in our emails.

* Revise default order details email subject text.

* Revise default order details header text.

* Bring E2E check up-to-date with latest text revision.

* Update API tests to match order detail email changes.

* Fix typo

---------

Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
2024-03-13 19:34:39 +00:00
Roy Ho 5933945127
Bump woocommerce-sniffs to 1.0.0 for WPCS 3.0 support (#45533)
* Bump woocommerce-sniffs to 1.0.0 for WPCS 3.0 support

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-13 13:22:16 -03:00
jonathansadowski be787742e1
Add WCA config json to changes config for CI (#45524)
* Add json config files to ci changes config

* Add admin config to Woo plugin ci config

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-13 10:29:34 -05:00
Alba Rincón e8e2c5d554
Show the "Design your own" banner when editing a theme which is not TT4 (#45481)
* Show the "Design your own" banner when editing a theme which is not TT4

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

* Fix lint errors

* Pass the active theme to the context

* Fix lint errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-13 14:55:04 +01:00
Nathan Silveira 8bef21dbc3
Add set_attribute method to Block class (#45523) 2024-03-13 10:13:02 -03:00
Tung Du 50beebe3e5
[Experimental] Display the formatted price in price filter text input fields (#45409)
* fix: display the formatted price in price filter text input fields

* chore: changelog

* Display formatted price within the Product Filter: Price input fields

---------

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2024-03-13 09:47:36 -03:00
Veljko V 60aa614b98
Add E2E test for Merchant Checkout Block flow (#45449) 2024-03-13 14:28:21 +02:00
Paul Sealock 2f88da580f
Task List: Avoid fetching tasks on non-visible lists (#45498) 2024-03-13 23:18:17 +13:00
Niels Lange 6b07ca44f5
Add totalValue filter (#45170)
* Add totalValue filter

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

* Remove nowrap to prevent text overflow

* Start docs for ‘totalValue’ filter

* Fix *.md lint issues

* Ignore .md lint errors for now

* Update code example and add screenshots

* Fix failing JS unit tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-13 00:42:24 +07:00
Fernando Marichal 55ec9eca2d
Add source property to legacy editor (#45515)
* Add source property to legacy editor

* Add changelog
2024-03-12 13:40:01 -03:00
Leif Singer a917efc44e
Add the ability to search for a currency by ISO code (#45512)
* Fix - #33503

Added ISO code along with the string. So it can be searched by using country code.

* Fixing linting issues

Added space with single quote to fix linting issue.

* fix linting issues

* add changelog file

* use emdash for separating data

* update test to new format

* include ISO code in settings test fixture

---------

Co-authored-by: daniyal.ahmad1992@gmail.com <daniyal.ahmad1992@gmail.com>
2024-03-12 17:32:32 +01:00
Fernando Marichal 1c068ce3a4
Update Attributes tooltip copy (#45485)
* Change attributes tooltip copy

* Add changelogs
2024-03-12 12:58:49 -03:00
Luigi Teschio 10005111c6
CYS - reduce editor instance re-render (#45458)
* CYS - reduce editor instance re-render

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

* fix crash when currentTemplate is undefined

* fix ts error

* remove unused import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-12 15:05:12 +01:00
Leif Singer 15855b55a3
Add a filter `woocommerce_admin_terms_metabox_datalimit` to change the data-limit value for the attributes term box (#45506)
* Update html-product-attribute-inner.php

Add a new filter `woocommerce_admin_terms_metabox_datalimit` to change the value of data-limit. See #37548 for more context.

* Update html-product-attribute-inner.php

* Creating a changelog file again

* update @since tag

* tweak changelog file wording

---------

Co-authored-by: Saif H. Hassan <67080558+Babylon1999@users.noreply.github.com>
2024-03-12 13:22:48 +00:00
Leif Singer 28e7351180
Fix the `test_widget_renders_completed_task_count` unit test (#45509) 2024-03-12 12:22:38 +00:00
Sam Seay 4cd89e4beb
Blocks Playwright tests: Add tests for the new attribute filter block (#45333) 2024-03-13 00:15:05 +13:00
Patricia Hillebrandt 4933b86cc7
[CYS on core] Update the WooCommerce Extensions Themes page to include references to the CYS (#45468)
* Introduce the new 'Design your own' button in the themes screen.

* unify the SCSS margins

* Add double quotes for woocommerce-marketplace__sub-header

* Add the CYS banner to the marketplace.

* Ensure each child in a list should have a unique 'key' prop

* Update the NoAIBanner component to direct users to the CYS flow.

* Add the customizeStoreDesignUrl const

* Ditch navigateOrParent

* Add the 'Browse the WordPress.org theme directory to discover more' link.

* Ensure the warning Modal is displayed whenever the user clicks on the 'Design your own' button and their current active theme is not TT4

* Remove the unnecessary fragment

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

* Fix lint.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-12 11:03:08 +01:00
Paul Sealock 172bbac661
Remote Specs: Update endpoints to 2.0 (#45298) 2024-03-12 15:53:59 +13:00
Paul Sealock e16a644e86
Launch Your Store: Add useLaunchYourStore helper method (#45404) 2024-03-12 12:50:22 +13:00
Paul Sealock ca2c12e667
Feature flags: Update config on watch (#45329) 2024-03-12 12:17:32 +13:00
Moon f061323d26
Tax task - Make postcode optional for countries without postcodes (#45367)
* Set field IDs

* Validate post code only when it is actually required

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

* Remove unused import

* Update test snapshot

* Update test snapshot

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-11 14:22:40 -07:00
Moon f901f60e4c
Update mercado pago payment copy (#45364)
* Update mercado copy

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-11 13:42:23 -07:00
Christopher Allford 1e7b8c4004
Product Collection: Added `priceRange` PHPUnit Tests (#45363) 2024-03-11 10:15:09 -07:00
99w 0b6259edfd
Add filter to allow changing order stock reservation minutes (#45246) 2024-03-11 17:46:05 +01:00
Maikel Perez 3658ac2d0e
List Custom Fields for New Product Editor (#45360)
* Create woocommerce/product-custom-fields block

* Register woocommerce/product-custom-fields block

* Add product-custom-fields block to the simple product template

* Create useCustomFields hook

* Create empty state

* Create CustomFields component

* Add custom fields table

* Add custom field remove button

* Hide the custom fields table base on the toggle value

* Remove non list features

* Add changelog files

* Fix linter errors

* Fix empty state styles

* Fix php linter error

* Remove context from the woocommerce/product-custom-fields-toggle-field block definition since it is not used

* Change url for the Read more about custom fields
2024-03-11 11:48:55 -03:00
Maikel Perez 0a90499e7b
Custom Fields for New Product Editor (#45291)
* Register metaboxhidden_product user meta as a user rest field

* Create useMetaboxHiddenProduct to manage the user metaboxhidden_product meta field

* Create woocommerce/product-custom-fields-toggle-field block

* Register woocommerce/product-custom-fields-toggle-field block

* Create product-custom-fields feature flag

* Hide custom fields behind the product-custom-fields feature flag

* Add changelog files

* Get default postcustom user meta value when the metaboxhidden_product does not exist yet in the user object
2024-03-11 10:55:31 -03:00
Alba Rincón cb7e1c2eb5
[CYS] Fix the Opt-in modal buttons and checkbox styles (#45444)
* Fix the CYS Opt-in modal buttons and checkbox styles

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-11 12:30:47 +01:00
Tommy Ferry 7fe00de727
Add product archive header template and re-hook (#33681)
* Add product archive header template and re-hook

Moves the product taxonomy archive header into its own template file,
creates a related output function, and then re-hooks the new template
back into the archive-product.php file in the same place, via the
'woocommerce_before_main_content' hook, priority 40.

This is so that this template part can be removed/unhooked via the
'remove_action' function, which is a cleaner approach than template
overrides or additional style changes.

Resolves: #33672

* add product archive header template changelog

* bump template versions

* bump template versions correctly

* add a new hook in the archive-product.php template for the header template
2024-03-08 15:33:40 -06:00
Tung Du 8e200a35b7
[Experimental] Fix minor issues of new filter blocks (#45305)
* fix: make the dropdown hidden by default

* fix: price clause

* fix: variable name in attribute clause generator

* chore: changelog

* fix: flashing issue for dropdown has selected items
2024-03-08 17:00:49 -03:00
Vlad Olaru ebd54a7c59
Update/default payments gateways recommendations (#39635)
* Update default gateways recommendations

* Add changelog entry

* Add Airwallex where missing
2024-03-08 20:24:32 +01:00
Leif Singer ba4260a344
Add callback URL domain to auth screen (#45445)
* add callback URL domain to auth screen

* add changelog file

* bump template version

* tweak wording
2024-03-08 20:14:20 +01:00
Alexandre Lara b162c9fab0
[Experimental] Product Filter: Price (Beta) block: Prevent invalid price range selection in Product Filter Price block (#45403)
* Prevent invalid price range selection in Product Filter Price block

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 16:08:20 -03:00
Bhupesh Mishra 319408bb67
changed filter by attribute filter options order (#44799)
* changed filter by attribute filter options order

In filter by attribute, order of the filter conditions "ALL" and "ANY" reversed as requested.

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

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 13:45:53 +01:00
Néstor Soriano 0432a8fd88
Add the plugin install engine (#44856)
* Add the PluginInstaller class

* Add changelog file

* Fix linting issues

* Changes in the installer:

- Allow installS from the WordPress.org directory only
- If the installer name is WooCommerce, throw if the caller is not
  in 'includes' or 'src' in WooCommerce core
- Remove two unnecessary includes
- Check if WP plugin upgrader classes already exist before
  executing the includes for them
- Get the installed plugin info using the plugin_info method
  of the plugin upgrader class

* Remove the get_installed_plugin_info method as it's no longer used

* Log plugin install only on sites with WooCommerce active
2024-03-08 07:29:41 -05:00
Jorge A. Torres 0da0e372d6
[HPOS CLI] Flush in-memory cache after each batch in migration (#44670) 2024-03-08 12:47:27 +01:00
Alba Rincón 1c9620b3be
[CYS] Show the default header and footers as the first option (#45414)
* Show the default header and footers as the first option

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 12:03:19 +01:00
Luigi Teschio a57b322bd9
CYS: improve font installation with the async job (#45411)
* CYS: improve font installation with the async job

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 10:26:19 +00:00
Barry Hughes 6a910390a9
[Minor] Fix docblock/typo (#45405)
Fix docblock.
2024-03-08 10:53:12 +01:00
Chi-Hsuan Huang 10561c8c1a
Add default values for Launch your store task (#45306)
* Add LYS task default values

* Add changelog

* Add unit tests

* Init LaunchYourStore task only when feature flag is enabled

* Add action to woocommerce class

* Remove WCAdminHelper use

* Add lys options to permission list

* Set launch-status option

* Fix woocommerce_store_pages_only

* Use WC_Install::is_new_install() instead

* Use woocommerce_newly_installed action

* Check if feature flag is enabled

* Use singleton WooCommerce object in tests

---------

Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2024-03-08 17:27:46 +08:00
Luigi Teschio 913953f586
CYS: fix Undefined array key queryId warning (#45399)
* CYS: fix Undefined array key queryId warning

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 10:02:41 +01:00
Karol Manijak a3811fa007
Product Collection: Set initial value of Created filter for New Arrivals collection (#45355)
* Set initial vlaue of Created filter for New Arrivals collection

* Add changelog

* Remove a check for products in tests as they may not really be displayed

* Adjust the New Arrivals test

* Adjust the tests logic after the change

* Bring back previous formatting

* Bring back function closure removed by mistake
2024-03-08 08:33:21 +01:00
Niels Lange ba85f36219
Unskip Mini Cart i18n test (#45371)
* Unskip Mini Cart i18n test

* Install language packs before each i18n-related test suite

* Delete translations.sh

* Add changelog

* Replace deprecated WP-CLI command

* Remove obsolete WP-CLI command
2024-03-08 12:39:22 +07:00
Moon 1f914c755e
Add Launch Your Store settings section (#45402)
* Support div setting type

* Add wc_settings_general_site_visibility_slotfill slotfill

* Add site visibility setting section

* Add placeholder

* Rename div to slotfill_placeholder

* Add comment

* Fix component name

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

* Use unique id

* Rename option names

* Put LYS settings behind launch-your-store flag

* Move Site Visibility header to component

* Lint fixes

* Lint fixes

* Use woocommerce-settings scope

* lint fix

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-08 04:11:52 +00:00
Jorge A. Torres f229c3d765
Prevent backup post from being deleted when HPOS is authoritative (#45330)
This PR short-circuits wp_delete_post() so that when HPOS is authoritative, any attempts to delete the backup post are not successful (which could also end up deleting the HPOS order). This only applies to non placeholder posts, as placeholder posts won't trigger the cascade of operations that might be problematic here.

Fixes #42746
2024-03-07 16:24:36 -08:00
Luigi Teschio 76e7d84523
[CYS] Improve logic to ensure that the font is active (#45385)
* improve logic to ensure that the font is active

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-07 18:44:01 +00:00
Alba Rincón 60d93e447f
[CYS on core] Set the default width after logo update (#45384)
* Set default width after logo update

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-07 15:13:31 +01:00
louwie17 d6cbbfb4d2
Add simple products to the Analytics orders query for the attributes filter (#44901)
* Add subquery for simple products

* Update query to make use of product lookup instead

* Add changelog

* Revert change

* Update PHP tests and fix lint errors

* Move subquery out to its own variable to make it more readable
2024-03-07 10:52:38 -03:00
Bart Kalisz 211b6ef01b
Blocks E2E: Be more descriptive with the workflow job titles (#45381) 2024-03-07 13:32:29 +00:00
Bart Kalisz 9a14411937
Blocks E2E: Allow manually triggering the workflow (#45382) 2024-03-07 14:01:22 +01:00
Bart Kalisz 8ff89fa6db
Blocks E2E: Do not report slow tests (#45375) 2024-03-07 12:57:48 +01:00