Commit Graph

19463 Commits

Author SHA1 Message Date
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