Commit Graph

19533 Commits

Author SHA1 Message Date
github-actions[bot] f6f7c076f4
Delete changelog files based on PR 43504 (#43523)
Delete changelog files for 43504

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-12 16:52:02 +01:00
github-actions[bot] 6dba702341
Delete changelog files based on PR 43506 (#43539)
Delete changelog files for 43506

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-12 16:51:44 +01:00
Jonathan Lane ac5ffdae46
Move e2e HPOS disabled tests to matrix (#43537)
* Move e2e HPOS disabled tests to matrix

* Changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-12 10:30:10 -04:00
Alba Rincón be1c794387
Remove the `patterns_ai_data` post from DB when resetting the CYS (#43499)
* Call the `/wc/private/ai/patterns` to remove the `patterns_ai_data` post from the db

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-12 13:58:32 +01:00
Luigi Teschio 5edea79b41
CYS: fix php warning raise by the Product Collection block (#43546)
* CYS: fix php warning raise by the Product Collection block

* fix typo

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-12 13:44:06 +01:00
Albert Juhé Lluveras aa661f2234
Fix Mini-Cart price disappearing on hover (#43550)
* Fix Mini-Cart price disappearing on hover

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-12 13:39:34 +01:00
Roy Ho 5d87130b43
[Experimental] Product gallery/remove default (#43487)
* Remove Product Gallery block as default

* Add beta label to Product Gallery block title

* Add changelog files
2024-01-11 18:03:58 -08:00
Niels Lange 780196a5b0
Fix notice template overwrites (#43506)
* Fix notice template overwrites

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

* Bump template versions

* Changing template version numbers to 8.5.0 as they haven’t been touched

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-11 22:12:55 +01:00
Jorge A. Torres 9ce508f47d
Add HPOS CLI tool to compare an order between datastores (#43173)
* Add `wp wc hpos status` command

* Add helper method to build order from different datastores

* Add helper method `get_diff_for_order()` to compare orders between datastores

* Add CLI tool `wp wc hpos diff` to compare an order between datastores

* Add changelog

* PHPCS fixes

* Better format for dates
2024-01-11 16:51:01 +00:00
Luigi Teschio ac43fb2426
fix ESLint configuration regarding import path aliases (#43421)
* fix ESLint configuration regarding import path aliases

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

* fix eslint configuration

* update eslint-import-resolver-typescript version

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-11 16:40:38 +01:00
Vedanshu Jain c675ce53a5
Fix product prices not being updated on scheduled sale automatically. (#43497)
* Add test for scheduled date start

* Add more test around product sales.

* Simplify sales check + also check product sale price is changed.

* Apply conding standards.

* Add changelog.

* Revert changes added in 39948 with explanation.

* Revert changes added in 39948 with explanation.
2024-01-11 15:18:18 +00:00
Luigi Teschio c409fcd050
[CYS - Core] introduce route guards for the AI flow (#43481)
* CYS - Core: Setup the site with a default homepage when the assembler is loaded

* CYS - Core: Implement route guards

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-11 16:12:41 +01:00
Seghir Nadir 77d0a6a847
Limit cookie dedupe logic to only WooCommerce Cart cookies (#43504)
* limit check to only Woo cookies

* limit logic to woo cookies only

* add changelog

* no need for set-cookie prefix
2024-01-11 15:53:50 +01:00
Luigi Teschio c686f605e6
[CYS - Core] Update the homepage with default patterns when the assembler is loaded (#43457)
CYS - Core: Setup the site with a default homepage when the assembler is loaded
2024-01-11 15:32:16 +01:00
Paulo Arromba 99e825df1f
Migrate merchant local-pickup e2e tests to Playwright (#43057)
* Playwright migrated test file bootstrap and first test for local pickup

* Added page reload to force a new render

* Updated test description

* WIP: figuring out the fake input checkbox

* WIP: figuring out flaky state of local pickup enabled

* Fix flakey enable/disable local pickup

* Migrated remaining local pickup tests to Playwright

* Removed deprecated E2E

* Added changelog

* Corrected linting errors

* Fixed playwright/no-element-handle lint error

* Replace CSS IDs and classes with recommended built in locators

* Remove obsolete function calls

---------

Co-authored-by: Niels Lange <info@nielslange.de>
2024-01-11 21:25:12 +07:00
Albert Juhé Lluveras 67fb8d7511
Add e2e tests to verify Products by Category/Tag/Attribute templates default to Product Catalog template (#43471)
* Add e2e tests to verify Products by Category/Tag/Attribute templates default to Product Catalog template

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-11 12:47:56 +01:00
Sam Seay 5fdbe63530
[Experimental] Rename Collection Filters to Product Filters (#43363)
---------
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2024-01-12 00:27:33 +13:00
Veljko V b6bdfe0572
Add new E2E tests for Shopper Cart Quantity Limit and Cross Sell Items (#43333)
* Add e2e test for shopper cart quantity limit and cross sell items

* Add changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-10 11:36:32 -08:00
Veljko V eb49308781
Add new E2E tests to cover Shopper Checkout Block flow (#41218)
* Add few E2E tests to cover half of the milestone

* Improve welcome modal closing

* Add new test scenarios

* Add more tests to cover creating account and shipping

* Update shipping zone labels to fulfil latest design changes

* Add tests for checkout block coupons and cart block coupons

* Remove only flag leftover

* Add checkout block tax tests and merge with cart test

* Update selectors to match checkout page

* Update checkout block test and comment scenario until issue resolved

* Remove only leftover

* Update checkout block test

* Improve filling shipping and billing checkout

* Create order via API with coupon

* Include checkout filling util helper

* Update test to use get by role for alerts

* Remove only leftover

* Adjust scenario for placing an order as a customer

* Improve existing customer placing order scenario

* Add util helper for adding products to cart

* Remove leftover from testing

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-10 11:36:11 -08:00
Jonathan Lane 9c2048f029
Shard e2e test execution on CI (#43056)
* Try sharding e2e tests

* Update reporter for merge

* Add changelog

* Change to trigger CI

* Update job name to match existing run

* Install with dependencies

* Set working directory

* Only run 2 workers at a time on CI

* Try single run, but 6 shards

* Simplify welcome modal closing util helper

* Switch to more simpler way of closing welcome modal

* Fix flakiness in create shipping zone test

* Try 10 shards

* Drop CI retries to 2 from 4

* Update path to reports

* Fix syntax error in GH file

* Remove working directory

* Update directories

* Path again

* Use Allure dir

* Fix merge step

* Install dependencies

* Setup repo in report merge

* Commands to merge reports

* Set working directory

* Update actions

* Name upload artifacts

* Just numbers for shards

* Update matrix

* Need to redeclare env variables

* Update file paths for merge step

* Remove working directory for merge step

* Try absolute paths

* Missed a path

* Put all artifacts in single download folder

* Tweak download action

* Might not have to merge reports

* Fix typo

* Update path for summary report

* Update results paths

* Tweak condition

* Add step to check success of matrix run

* Remove ternary per feedback

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Veljko <veljano@yahoo.com>
2024-01-10 10:42:05 -08:00
Jonathan Lane bcea0fecb9
Add conditional skip to FTUX (#43437)
* Add conditional skip to FTUX

* Changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-01-10 08:33:02 -08:00
Albert Juhé Lluveras 6bc865dd9b
Add e2e tests for user customization of block templates (#43426)
* Add e2e tests for user customization of block templates

* Update instructions to run Playwright e2e tests

* Code cleanup

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

* Create revertTemplateCustomizations util

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-10 16:51:53 +01:00
github-actions[bot] b9f371c23b
Delete changelog files based on PR 43269 (#43467)
Delete changelog files for 43269

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-10 16:31:08 +01:00
Thomas Roberts d8331dc3f1
Add additional information block for custom checkout fields (#43274)
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-01-10 06:20:06 -08:00
github-actions[bot] 5451d1ef23
Delete changelog files based on PR 43428 (#43461)
Delete changelog files for 43428

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-10 14:48:57 +01:00
Jorge A. Torres 39ec01bceb
Fix PHP warning related to logging severity threshold (#43448)
* Fix PHP warning related to logging default severity threshold

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-10 13:32:35 +00:00
Bartosz Budzanowski a6705cda15
Force marketing menu items order. (#41836)
* Force marketing menu items order.

* Add changelog.

* Make sure that Overwiev is present.

* Coupons should be always second.

* Update plugins/woocommerce/src/Internal/Admin/Marketing.php

Co-authored-by: Gan Eng Chin <ecgan@users.noreply.github.com>

* Update plugins/woocommerce/src/Internal/Admin/Marketing.php

Co-authored-by: Gan Eng Chin <ecgan@users.noreply.github.com>

* Use fallback for different languages.

* Use location as a fallback for names.

* Fix linting.

* Refactor.

* Remove unneded new line.

* Remove duplicated code.

---------

Co-authored-by: Gan Eng Chin <ecgan@users.noreply.github.com>
2024-01-10 14:23:41 +01:00
Gan Eng Chin 0636a09f63
Delete old marketing recommendations transient upon update to WC 8.6.0 (#43162)
* Add MarketingRecommendations feature.

The code here is based on other feature with default fallbacks and with data source poller, e.g. see payment gateway suggestions.

* Use MarketingRecommendations feature in API.

* Add spec_key for MarketingRecommendationsDataSourcePoller.

If we don't specify it, the default is `id`, which is not used in our recommendation data, and this will cause things not to work as expected.

* Recursively convert object to array.

This is because all the subsequent functions work with arrays, not objects.

* Make recommended marketing tools and coupons use MarketingRecommendationsInit.

This is so that recommended channels, tools, and coupons make use of the same transient data with data source poller.

* Add changelog.

* Fix PHP lint issues.

* Add doc comment to fix lint error.

* Fix tests in MarketingRecommendationsTest.

* Replace recommendations.json file with generated data in DefaultMarketingRecommendations.

This is to have i18n support.

* Add icons for fallback marketing recommendations.

* Fix PHP linting issue.

* Fix linting issue.

* Fix failing tests with PHP 8.0.

* Remove unused replaced code in MarketingSpecs.

* Delete old marketing recommendations transient upon update to WC 8.6.0.

* Add changelog.
2024-01-10 21:05:36 +08:00
Chris Lilitsas e24aabff04
Introduce a new block style for the Product Details block and set it as default (#42965)
* Introduce the minimal block style for productDetails block

* Change the default style in the template

* Change the default template when using the transform-to-blocks button

* Cleanup

* Organize CSS selectors

* Add opacity on hover

* Fix specificity and add explanation

* Cleanup

* Changelog
2024-01-10 14:08:48 +02:00
Karol Manijak 30888d7f1b
Product Collection: Rename "Inherit query from template" option and make description contextual (#43270)
* Update the copy of Inherit Query from template and make it contextual

* Add changelog
2024-01-10 12:40:05 +01:00
Tung Du 8fb3d394a5
[Experimental] Add basic e2e test for new filter blocks (#43392) 2024-01-10 18:17:00 +07:00
Gan Eng Chin 6802b2720a
Add Default Fallback Marketing Channel Recommendations (#43001)
* Add MarketingRecommendations feature.

The code here is based on other feature with default fallbacks and with data source poller, e.g. see payment gateway suggestions.

* Use MarketingRecommendations feature in API.

* Add spec_key for MarketingRecommendationsDataSourcePoller.

If we don't specify it, the default is `id`, which is not used in our recommendation data, and this will cause things not to work as expected.

* Recursively convert object to array.

This is because all the subsequent functions work with arrays, not objects.

* Make recommended marketing tools and coupons use MarketingRecommendationsInit.

This is so that recommended channels, tools, and coupons make use of the same transient data with data source poller.

* Add changelog.

* Fix PHP lint issues.

* Add doc comment to fix lint error.

* Fix tests in MarketingRecommendationsTest.

* Replace recommendations.json file with generated data in DefaultMarketingRecommendations.

This is to have i18n support.

* Add icons for fallback marketing recommendations.

* Fix PHP linting issue.

* Fix linting issue.

* Fix failing tests with PHP 8.0.

* Remove unused replaced code in MarketingSpecs.

* Remove unneeded false check.

This is because `is_array` would return `false` when `false` is being passed as the argument.

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

---------

Co-authored-by: Bartosz Budzanowski <bartosz.budzanowski@automattic.com>
2024-01-10 18:39:59 +08:00
And Finally b62c3bc2f4
Do not access change_feature_enable() statically. Closes #43175. (#43428)
* Do not access change_feature_enable() statically. Closes #43175. Copy of @helgatheviking's cd71d08577.

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-10 09:43:03 +00:00
Corey McKrill 4ecbaf573c
Logging: Add settings UI to configure the logger (#42979)
* Centralize log level labels

* Fire an action specific to loading the Logs tab

* Functional settings screen (no way to navigate to it yet)

* Deprecate wc_register_default_log_handler

* Hook up the settings

* Add section nav

* Add an action hook to the settings form

* Rename render_page method to render_form

* Scaffold the unit tests

* Remove logging enabled check from WC_Logger construct

Caching the enabled setting value turns out to not be a great idea,
it breaks some tests, and could cause issues if the setting value
changes, and then a logging event happens later in the same request.

WP has its own caching layer for options anyway, but one that will
update if the value of the option changes. So this just makes the
enabled check directly from the should_handle method.

* Add most unit tests. Still needs a couple more

* Add remaining unit tests

* Update since values on new hooks to 8.6.0

* phpcs cleanup

* Change deprecated tag from 8.5.0 to 8.6.0

* Add missing return types to unit tests

* Add changelog file

* Add missing clear method to new log file handler

* Change level_threshold default value to 'none'

* Ensure logger has a valid level threshold set, regardless of level given

* Update legacy unit test

* Ensure settings only saved on settings view

* Add settings sections for filesystem and database

Also add a filesystem setting for collapsing log entry lines.

* Add public LoggingUtil class for external usage, and use in WC_Logger

* Remove unused import

* Deprecate wc_get_log_file_path and wc_get_log_file_name

* Preserve white space in log file lines

It turns out that several extensions add log entries that are just
a print_r of an array. Preserving the white space is important for
making this data legible (ideally they'd switch to adding this data
within the context parameter)

* More legacy unit test fixes

* Remove entry collapse option and functionality

It's unclear right now that entry collapsing provides much real
benefit, while it clearly does have some potential drawbacks if
extensions are in use that add print_r output to the log files.

* phpcs cleanup

* Yet more unit test tweaks

* Remove unused code

* Don't wrap extra handler options in <code>, it gets excaped

* Attempt fix for WC_Tests_Logger::test_clear

This is only failing on GH CI, not when running locally. Maybe
ensuring all the created log files are deleted will help.

* Improve logging of fatal errors

This improves the formatting of error messages caught and logged
during shutdown to be more legible and to take advantage of the
logging method's context parameter. With this change, the log entry
will be a simple message on one line, and any stack trace will be
available but hidden in an "Additional context" details element.

* Tweaks to some settings' wording

* Update webooks link to logs, undeprecate

* Remove `realpath` usage since it deos not work if log directory does not already exists.

---------

Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
2024-01-10 14:44:05 +05:30
Alba Rincón a38c7bcccf
CYS: fix PHP warnings and pattern button (#43354)
* Remove custom styles from button

* Avoid php warning about images and slug not defined

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

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

* Fix linting errors

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-10 09:03:56 +01:00
berislav grgičak c018d7751b
Redirect Woo.com connect request to selected page (#43315)
* Working redirect

* Dynamic connect urls

* Clean up

* Changelog
2024-01-10 07:20:15 +01:00
Chi-Hsuan Huang 2c122ba446
Track core profiler individual plugin installation success/failure (#43309)
* Track core profiler individual plugin installation success/failure

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

* Log coreprofiler_store_extension_installed_and_activated async failures

* Log coreprofiler_store_extension_installed_and_activated sync success

* Rename track prop key

* Track error_message for recordFailedPluginInstallations

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-10 11:48:34 +08:00
Maikel Perez 1ad48760c9
Redirect supported product types to the new experience based on the product template associated to it (#43341)
* Redirect supported product types to the new experience based on the product template associated to it

* Add changelog file

* Fix linter error

* Redirect using the product type first and then the associated product template

* Set the product template id also for unsupported product templates

* Add changelog file

* Remove supported_product_types from the RedirectionController since the product_templates is used instead

* Fix php linter error
2024-01-09 18:31:25 -03:00
Alejandro López Ariza ed015e5485
Update stable tag to 8.4.0 (#43425)
woorelease: Update stable tag to 8.4.0
2024-01-09 16:51:08 +01:00
Luigi Teschio 1453597400
CYS - Core: implement 'noAI' flowType (#43368)
* CYS - Core: implement 'noAI' flowType

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

* remove unused import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-09 15:49:59 +01:00
Ismael Martín Alabarce 45377e63be
Update WooPayments task copy (#43365)
* Update WooPayments task copy

* Add changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-09 12:43:47 +01:00
Alejandro López Ariza 937b6d66c8
Update stable tag to 8.5.0 (#43402)
woorelease: Update stable tag to 8.5.0
2024-01-09 11:21:42 +01:00
Daniel Dudzic 3be8264c5d
[Experimental] Product Gallery Pager: Improve accessibility (#43348)
* Product Gallery Pager: Improve accessibility

* Product Gallery Pager: Fix number pager styling
2024-01-09 10:48:49 +01:00
Denis Dvali aa4fda8b27
Remove v1 of plugin installer (#37893)
* Remove v1 of plugin installer.

* Rename WC_REST_WCCOM_Site_Installer_Controller_V2 into WC_REST_WCCOM_Site_Installer_Controller.

* - Create base controller for WCCOM Site requests, extended by Installer and SSR controllers.
- Switch get SSR endpoint to v2 namespace.

* Remove namespace property from Installer controller.

* Linting.

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

* Switch request method of reset install endpoint to POST (#43150)

- Switch reset installation state request to POST.
- Change wccom-site API namespace to v3.

* Exclude deleted files from linter check (#43355)

Exclude deleted files from linter check.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-09 09:23:13 +00:00
Tom Cafferkey b58a1932fe
Block Hooks API: Abstract Block Hooks code into a separate trait class (#43250)
Co-authored-by: github-actions <github-actions@github.com>
2024-01-09 08:41:42 +00:00
github-actions[bot] 4f6f7aa8c6
Delete changelog files based on PR 43344 (#43388)
Delete changelog files for 43344

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-09 00:05:51 +00:00
Alexandre Lara 65d9c6764c
[Experimental] Product Gallery block: Rename media setting to "Open pop-up when clicked" (#43302)
* Rename media setting to "Open pop-up when clicked"

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-08 16:58:27 -03:00
Gan Eng Chin 8b1df6c946
Fix "rm: .git/hooks: No such file or directory" error in `pnpm install` when the directory is missing (#43142)
* Fix "rm: .git/hooks: No such file or directory" error in `pnpm install`.

* Add changelog.

* Use "rm -rf" instead of "test" command on .git/hooks directory.

We use the "-f" flag so that it does not throw error when the directory does not exist.
2024-01-08 14:13:42 -04:00
jonathansadowski ce3a38ac55
Try reducing blocks build size (#43344)
* Try reducing blocks build size

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

* Only set NODE_ENV if its not already defined

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-08 11:33:49 -06:00
Tomek Wytrębowicz fa62e63037
Make OSA fields extendable, simplify naming (#41690)
- Use `referrer` & `source_type` field names consistently
   Remove the need to translate it back and forth.
- Make fields actually extendable using `wc_order_attribution_tracking_fields`.
   Propagate the field configuration to the client side as well.
   Disambiguate fields in variables and functions.

Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>
2024-01-08 16:17:04 +01:00
Jorge A. Torres ebb6b0fe54
Fix possible duplication in certain HPOS related Tracks events (#43318)
* Fix possible duplication of HPOS related Tracks events

* Add changelog
2024-01-08 20:12:37 +05:30
Thomas Roberts c159e8a858
Update Checkout Fields error reporting to use `_doing_it_wrong` instead of wc logger (#43283)
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2024-01-08 03:16:08 -08:00
Karol Manijak 8d4f1cecec
Product Collection: Make sure all variations are taken into account when choosing collection (#43273)
* Make sure all variations are taken into account when choosing collection

* Add changelog
2024-01-08 10:55:42 +01:00
Tung Du aab950e27a
[Experimental] Add: Filter blocks migration (#43218)
* add: upgrade panel

* add: toolbar upgrade button

* add: downgrade panel

* chore: changelog

* refactor: move the upgrade component to `Collection Filters` block
2024-01-08 16:31:06 +07:00
Tung Du 823a35a9f2
[Experimental] Add: notice informing users about the usage of filter blocks (#43262) 2024-01-08 13:43:12 +07:00
Sam Seay 1eba9c62a8
Add lint config to blocks to lint imports (#43310) 2024-01-08 18:32:15 +13:00
Maikel Perez a7627fbf0e
Linked product list empty state (#43163)
* Add product search field to the linked product list block

* Add empty state to the linked product list block

* Fix AdviceCard styles

* Create skeleton for the linked product list block

* Fix linter errors

* Move the product list skeleton to the product list component folder

* Revert AdviceCard changes

* Remove upsells and cross-sells block to use linked-product-list block instead

* Add changelog files
2024-01-05 15:26:06 -05:00
Corey McKrill f8b906000f
Remove usage of PHP 8+ function from bootstrapper (#43308)
(PHP 7.4 compat) string lib polyfills are unavailable during bootstrapping.
2024-01-05 12:03:12 -08:00
Roy Ho 6ef04bafa5
Hide sale badge if product image is disabled (#43334)
* Hide sale badge if product image is disabled

* Fix css target to cover all product grid

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

* Hide on sale badge via PHP side

* Remove css changes

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-05 11:16:37 -08:00
Seghir Nadir e50e7799c0
Support additional fields in the Contact step for Checkout (#43088)
* add custom fields to contact info step

* fix linting

* add changelog

* adjust fields validation

* address review changes

* address sanization and validation

* fix billing address shape

* address schema issues

* cast address to array

* dont sanitize stuff that will validated

* fix linting issues

* fix cart unit test

* revert test

* fix the email issue
2024-01-05 18:35:28 +01:00
Alba Rincón 5752bd7a9f
Fix CYS updateStorePatters to use the new images endpoint structure (#43285)
* Return the correct empty images response

* Use the correct structure in the images endpoint response

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

* Throw error when no images and the store is already ai generated

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-05 17:56:51 +01:00
Matt Sherman 9ba256235a
Fix @woocommerce/block-templates changes not being picked up on build (#43328) 2024-01-05 11:44:25 -05:00
Luigi Teschio 3978be9fdd
fix - Product Button: don't trigger jQuery add to cart function when the button is clicked on classic themes (#43325)
* fix - Product Button: don't trigger old add to cart function when the button is clicked on classic themes

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

* improve E2E tests

* update changelog

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

* update changelog

* use beforeEach

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-05 17:34:16 +01:00
Roy Ho 8bbb35d63e
[Experimental] Product Gallery: Use @container rule to adjust overlay link count font size (#43294)
* Product Gallery: Use @container rule to adjust overlay link count font size

* Add changelogs

* Remove em from line height

* Make view all link smaller
2024-01-05 07:23:19 -08:00
Albert Juhé Lluveras 67ddade2fd
Delete woocommerce-gutenberg-products-block.php file (#43319)
* Delete woocommerce-gutenberg-products-block.php file

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-05 15:32:15 +01:00
louwie17 62e2b53a55
Fix highlight tooltip deprecation notices (#43303)
* Remove deprecated achorRect and IsolatedEventContainer usage

* Add changelog

* Remove unused code

* Add option for shouldCloseOnClickOutside
2024-01-05 08:35:06 -04:00
Tung Du 37c94c7604
[Experimental] Fix: get the correct min/max price for filtering (#43313) 2024-01-05 17:19:33 +07:00
Saad Tarhi 009ff8707b
Move shopper-side Cart E2E tests to Playwright (#42897)
* Convert empty cart E2E test

* Convert product removal E2E test

* Convert quantity update E2E test to Playwright

* Convert E2E tests of the remaining methods that update cart quantity

* Convert E2E test: Proceed to Checkout

* Convert E2E test: Cross-Sells

* Remove test files

* Update plugins/woocommerce-blocks/tests/e2e/tests/cart/cart-block.shopper.block_theme.side_effects.spec.ts

Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>

* Set up cross sells products before e2e test

* Solve merge conflict

* Add changelog entry

* Remove obsolete import

---------

Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
2024-01-05 17:15:23 +07:00
Albert Juhé Lluveras b07005afd1
Fix commands with tags breaking the command palette (#43269)
* Fix commands with tags breaking the command palette

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-05 10:41:37 +01:00
Tung Du af2dedb137
[Experimental] Filter blocks: add the navigate function back (#43287)
* fix: add the navigate function back

* fix: move the navigate function to a dedicate file only for frontend use
2024-01-05 14:33:43 +07:00
Niels Lange 413fb72630
Fix broken link to internal *.md file. (#43261) 2024-01-05 10:48:36 +07:00
Tarun Vijwani 2b0da27fd0
Update generic incompatibility notice (#42751)
* Move the switch to classic shortcode block button to separate component

- Move modal component file from incompatible-extension-notice component folder to switch-to-classic-shortcode-button folder.
- Rename modal component file to model-content component file.
- Move the switch to classic shortcode block button to separate component folder

* Update generic incompatibility notice

- Update the notice description.
- Add switch to classic shortcode block button to the notice.

* Fix margin in editor.scss

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

* Update class names in switch-to-classic-shortcode-button component

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

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

* Update plugins/woocommerce-blocks/assets/js/editor-components/switch-to-classic-shortcode-button/editor.scss

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

* Refactor SwitchToClassicShortcodeButton component

* Fix css lint erros

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

* Add type property to notice events

* Refactor switch to classic shortcode button logic

* Use isCart for switchButtonLabel and snackbarLabel

* Remove empty div in sidebar compatibility notice component

* Refactor switch to classic shortcode button event handling

* Adjust wording

* Adjust marging and readability

* Introduce union for SwitchToClassicShortcodeButtonProps type prop

* Simplify logic

* Use proposed text

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2024-01-05 10:47:34 +07:00
Corey McKrill 68c147a491
Settings: Make minor corrections to the HTML markup of settings fields (#43166)
* Corrections to HTML markup of settings controls

* Remove deprecated `valign` attributes from table row elements
* Remove orphaned quotation marks from the end of table row elements

Co-authored-by: Sagehen Studio <2924107+sagehenstudio@users.noreply.github.com>

* Enable title prop for `info` setting type

This gives the `<th>` for the info setting type a closing tag
since its not self-closing. It also allows for adding a `title` prop
to the info setting type, to match all the other setting types.

* Add changelog file

* phpcs cleanup

---------

Co-authored-by: Sagehen Studio <2924107+sagehenstudio@users.noreply.github.com>
2024-01-04 16:08:31 -08:00
github-actions[bot] 88d71aa9c8
Delete changelog files based on PR 43257 (#43291)
Delete changelog files for 43257

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
2024-01-04 17:08:52 +00:00
Damián Suárez 17c8354ad9
[Product Block Editor]: Be able to dismiss AdviceCard instances (#43124)
* introduce packages/js/data/src/user/types.ts pref

* be able to dismiss the Upsells advice

* rename user pref key

* typify product_advice_card_dismissed prop

* store is dismissed state in the user pref

* delegate the dismiss state to the component

* changelog

* remove console.log :'(

* fix TS issue

* fix TS issue

* changelog
2024-01-04 12:17:03 -03:00
Alexandre Lara bffe12b945
Product Gallery block: Fix e2e tests for Thumbnails block (#43060)
* Fix e2e tests for thumbnails change

* Add changelog
2024-01-04 10:38:32 -03:00
Maikel Perez f34bb52f9e
Linked product list (#43145)
* Create and register product-linked-list-field block

* Add upsells and cross-sells blocks to the simple product template

* Create formatted price component

* Add linked product table to the linked product list block

* Add remove product button to each product row

* Add see product page button

* Add link to the product name so it can be edited in a new tab

* Fix some styles

* Add product search field to the linked product list block

* Fix styles

* Add changelog files

* Fix linter error

* Fix rebase conflicts

* Use useProductEntityProp instead of useEntityProp within product-linked-list-field block

* Move the product list to its own component

* Move the product select to its own component

* Move the product image to its own component

* Fix linter error
2024-01-04 08:34:53 -05:00
Niels Lange 0cffd32875
Remove old noticed on classic checkout when applying coupon code (#43244)
* Remove old noticed on classic checkout when applying coupon code

* Remove old noticed on classic checkout when applying coupon code

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-04 12:31:00 +01:00
Alba Rincón f528361ec2
Show default patterns and products if the images request fails (#43157)
* Show default patterns and products if the images request fails

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

* Remove space

* Simplify condition

* Removed unused call

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-04 12:11:00 +01:00
Karol Manijak 4128bff64c
Fix incorrect layout of Product Collection placeholder on Firefox (#43264)
* Fix incorrect layout of Product Collection placeholder on Firefox

* Add changelog
2024-01-04 11:20:57 +01:00
Alba Rincón 9d86e1f038
Remove the double quotes from the AI generated content before saving it (#43249)
* Remove the double quotes from the AI generated content before saving it

This will avoid having two consecutive double quotes and breaking the JSON.

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

* Fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-04 09:47:28 +01:00
Kyle Nel 4428d81b12
Display ratings on marketplace product cards (#43240)
* Add rating and change product card layout

* Fix some minor CSS bugs in existing code

* Implement skeleton loader

* Update theme card styling to match design

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


---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-04 10:07:00 +02:00
Sam Seay faf1c6f09e
[Experimental] Use variations to provide all the product filters wrapped by CollectionFilters block (#43216)
---------
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2024-01-04 18:33:59 +13:00
Siddharth Thevaril a6ea063cba
Fix payment gateway doc (#43238)
* Fix namespace

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-04 12:07:07 +07:00
Tung Du de1d60ebe4
[Experimental] Add Widget support to new collection filter blocks (#43153) 2024-01-04 11:56:24 +07:00
Sam Seay 73160b3c41
[Experimental] Filter out filter options that would result in 0 products. (#43220) 2024-01-04 17:23:40 +13:00
kevinbates 7f7515aa1c
Update readme.txt (#43257)
* Update readme.txt : updated the intro text and added 3 links.

* Changelog.

---------

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2024-01-03 19:18:57 -08:00
Leif Singer a81cfff412
Add tests for searching for multiple term IDs (#43089)
* correct copy/paste error

* test searching by multiple tag IDs

* test searching by multiple category IDs

* add the changelog file
2024-01-03 19:18:22 -08:00
Matt Sherman a8dab20997
Layout templates REST API (#43067)
* Endpoint shell

* Single layout template route

* Add area query arg

* Fix BlockTemplateRegistry::get_registered() return type

* Check if templates are registered before registering

* Use json format for layout templates response

* Remove unused use

* Use json format for layout templates response for get_items

* Consolidate processing for get_items and get_item

* LayoutTemplateRegistry

* Fix matching by id

* Get templates from LayoutTemplateRegistry

* Remove unused method

* Fix typo in code doc

* Move template instantiation to registry

* Return template instance, not json when instantiating

* Use LayoutTemplateRegistry instead of BlockTemplateRegistry

* Add code docs for rest controller

* Fix code doc in BlockTemplateRegistry

* Code docs for LayoutTemplateRegistry

* Changelog

* Add code doc for LayoutTemplatesServiceProvider

* Unit test for registering a layout template

* Unit tests for invalid params when registering layout template

* Unit test for layout template instantiation

* Unit test for instantiating layout templates with query params

* Unit test for layout template instance caching

* Cache layout template instances

* Refactor layout template info querying

* Add unit test for layout template instantiation actions

* Add before and after layout template instantiation actions

* Use layout template ID for array key

* REST API unit test to get all items

* Unit test for unregister_all

* Method to unregister all layout templates

* REST API unit test to get all items for a specific area

* Fix to_json() in TestLayoutTemplate

* REST API unit test to get single item

* Fix get_item

* REST API unit test for single item with invalid id

* REST API unit test for get all items for invalid area

* Fix test_cached_instances - array access

* Test that old register hook is called

* Call old register hook

* Remove before hook (will put in separate PR)
2024-01-03 20:02:38 -05:00
Denis Dvali 280fe7cd51
Fix occurrences where Installer_Error exception is returned instead of being thrown (#43108)
* Fix occurrences where Installer_Error exception is returned instead of being thrown.

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

* Add @throws tag in function comment.
2024-01-03 14:59:08 -08:00
Tomek Wytrębowicz 70b22764a9
Fix Consent API integration with OSA (trunk-based) (#43012)
- Stop tracking order attribution when the consent is revoked on the same page.
   Switch `wp_consent_type_defined` to VanillaJS event, as this is what the latest Complianz dispatches.
   Remove jQuery dependency.
   5427807509
- Update checkout block data when consent is given/revoked on the same page
   263d0b8a14
- Register WPConsentAPI integration for OrderAttribution
   cde9f642a1
- Don't store empty meta values for order attribution 
   If no values at all are sent, don't create meta records
   00b83eed00
- Don't translate or add parenthesis to unknown placeholder
   bbc4b1f699
- Un-hardcode marketing category in wp-consent-api-integration.js
   45014a715a

Co-authored-by: Justin Palmer <228780+layoutd@users.noreply.github.com>
2024-01-03 22:36:35 +01:00
Damián Suárez b6f8ab94f5
[Woo beta tester]: add User Preference panel (#43125)
* introduce UserPreference panel

* render user preference panel

* expose UserPreferences type

* introduce force mode to update user pref

* rename global object with `__wcbt`

* changelog

* changelog
2024-01-03 17:42:18 -03:00
rodelgc 12e65af8ca
Fix WooAF changelog typo and release date (#43254)
* Fix typo

* Fix `acceleratedReleaseDate` output

* Comment unnecessary steps, jobs

* Do only a dry-run

* Revert "Do only a dry-run"

This reverts commit a41ea99401.

* Revert "Comment unnecessary steps, jobs"

This reverts commit 97985a0ad0.

* Add changelog
2024-01-03 12:56:39 -06:00
Albert Juhé Lluveras 263011bdd2
Prevent Command Palette scripts to enqueue unnecessary scripts in the editor (#43221)
* Prevent Command Palette scripts to enqueue unnecessary scripts in the editor

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

* Properly set script asset dependencies

* Create util function to simplify the code

* Fix JS warning when registering WooCommerce Commands

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-03 18:07:43 +01:00
Daniel Dudzic 7163d610e5
Product Gallery: Fix Large Image snapping position on window resize (#43251)
* Product Gallery: Fix Large Image snapping position on window resize

* Product Gallery Snap Fix: Add changelog
2024-01-03 17:46:43 +01:00
Niels Lange ce625318cf
Update contributors list (#43182)
* Update contributors list

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

* Add changelog entry

* Add contributors of WooCommerce Beta Tester

* Delete duplicate changelog entry

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-03 18:02:30 +07:00
Michael Pretty e7647333a1
Fix bug when searching orders with a term starting with d, s, or f (#43085)
* Don't prepare the order search $meta_sub_query twice.

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
2024-01-03 11:49:17 +01:00
Sam Seay 187780905f
[Experimental] Use CheckboxList component in interactivity attribute filter (#43217) 2024-01-03 22:58:57 +13:00
Sam Seay 161bf51bd3
[Experimental] Allow overriding placeholder in interactivity Dropdown::render (#43211)
* add: multiple select support to attribute dropdown
* fix: remove active filter from dropdown
* chore: remove unused extractBuiltinColor

---------
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2024-01-03 20:52:45 +13:00
Tung Du 97e4c55aeb
[Experimental] Rating Filter block: fix wrong import path (#43198) 2024-01-03 09:31:50 +07:00