Commit Graph

20862 Commits

Author SHA1 Message Date
Jonathan Lane e5e51a41b8
Update Playwright to 1.44.1 from 1.41.1 (#48291)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-06-11 21:52:48 +03:00
Néstor Soriano e64f7b31bc
Make coupon metadata read robust against wrongly stored product related metadata (#48362)
Coupon metadata keys `product_ids` and `excluded_product_ids` are stored by WooCommerce as a comma-saparated list of values, but apparently some plugins mistakenly re-store these as serialized arrays. This pull request changes the database metadata read code so that it supports both comma-separated lists and serialized arrays.

Fixes #40569
2024-06-11 11:23:28 -07:00
Corey McKrill dc5ad32fb7
Logging: Ensure filtered log messages don't persist across multiple log handlers (#48336)
Log messages can be modified via the `woocommerce_logger_log_message`
filter hook on a per-handler basis, but if the message is modified for
the first handler, the subsequent handlers were receiving the modified
message instead of the original. This simply ensures each handler
receives the original message instead.

Fixes #47126
2024-06-11 10:33:02 -07:00
Adrian Moldovan a7f634d5ef
[blocks e2e] Move Blocks e2e into ci.yml (#48224) 2024-06-11 19:57:23 +03:00
Luigi Teschio af2946aa34
CYS: Refactor routing approach (#48312)
* CYS: Refactor routing approach

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

* remove focus logic

* remove routekey prop

* pass onNavigateBackClick callback as prop

* create dedicated CSS class

* lint css

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-11 15:26:04 +02:00
Damián Suárez 4921018e5a
Product Block Editor: disable the `product-editor-template-system` flag even for the dev-env (#48378)
* disable `product-editor-template-system` as default

* changelog
2024-06-11 14:22:06 +01:00
Adrian Moldovan 665d45ba38
[e2e tests] Disable task list reminder bar in analytics-data spec - fixed flaky tests (#48357)
* Disable task list reminder bar

* Remove unused product fixture

* Disable tour via the api
2024-06-11 13:55:38 +02:00
rodelgc deb15d201e
Sync #319 with trunk (#48348)
* Use DOM API to create Order Attribution inputs

* Add changelog entry

* Delete unnecessary changelog

---------

Co-authored-by: Tomek Wytrębowicz <tomalecpub@gmail.com>
2024-06-11 16:40:35 +08:00
Chi-Hsuan Huang f1badbfb4b
Add global ErrorBoundary component for handling errors in react admin (#48250)
* feat: Add ErrorBoundary component for handling errors in WooCommerce admin client

* Add changelog

* Add tests for error-boundary

* Update plugins/woocommerce-admin/client/error-boundary/index.tsx

Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>

* Wrap text in __()

* Address feedback

* Fix tests

* Improve mobile view

* Update button

---------

Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>
2024-06-11 16:14:44 +08:00
Albert Juhé Lluveras 545e48e05a
Expand block templates documentation (#48247)
* Expand block templates documentation

* Add changelog file

* New manifest

* Minor changes

* Add Page: Coming soon template
2024-06-11 10:04:48 +02:00
github-actions[bot] 0139bd1b2b
Delete changelog files based on PR 48201 (#48332)
Delete changelog files for 48201

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-06-11 14:41:08 +08:00
Chi-Hsuan Huang bca269de3a
Reduce redundant LYS option API Calls (#48303)
* Update useLaunchYourStore hook to accept enabled parameter and only enable it in homescreen

* Add changelog

* Fix type

* Change isHomescreen function to variable
2024-06-11 13:28:05 +08:00
Néstor Soriano eb71b8ba25
Add CLI tools for the product attributes lookup table (#47311)
* Add the ProductAttributesLookup\CLIRunner class

* Fix the restoring of the lookup table usage option

* Improve the progress bar of the regeneration command

* Add changelog file

* Fix existing unit tests

* Add linter exception for TODO comment

* Fix example in CLI runner

* Fix: get_lookup_table_info was returning data as strings.

* Show count of lookup table rows after the "regenerate" command finishes.

* Improve error message
2024-06-10 11:26:47 -07:00
Adrian Moldovan 1533afdca3
[e2e tests] Fix e2e test results path and report name (#48320)
* Fix the report name sent to woocommerce-test-reports workflow

* Add test type

* Test change

* Remove test type

* Merge artifacts to keep allure-results

* Overwrite artifacts if one already exists with the same name

* Test changes to trigger tests

* Fix allure-results and .state paths

* Filter tests for faster feedback

* Debug artifacts content

* Use name instead of pattern

* Use name instead of pattern

* Don't use an intermediate path

* Use artifact name and path instead of only pattern

* Use artifact name and path instead of only pattern

* Use artifact name and path instead of only pattern

* Remove testMatch filter to run all tests

* Revert test change

* Add changelog
2024-06-10 11:21:46 -07:00
Nathan Silveira b5992b3c9c
Run possibly_add_template_id function in woocommerce_rest_prepare_product_variation_object hook (#48325)
* Add template ID for variations

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

* Update 48325-fix-prepare-variation-boejct

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

* Update 48325-fix-prepare-variation-boejct

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-10 14:40:14 -03:00
Damián Suárez 114a0e547e
PFT: update CPT product_form posts when plugin updates (#48265)
* edit the CPT post when plugin updates

* minor jsdoc improvement

* changelog
2024-06-10 16:53:14 +01:00
Ilyas Foo 0d461fa6e7
Add unit tests for some tracks in product editor (#48245)
* Add tests for ProductPage

* Add tests for ProductVariationPage

* Add test for product_tab_click event

* Add test for product_editor_feedback_bar_turnoff_editor_click event

* Add test for product_dropdown_option_click event

* Add test for product_add_view track

* Changelogs

* Changelog

* Lint

* Add product_edit_view test and falsey test

* Fix test name
2024-06-10 23:05:20 +08:00
Niels Lange 1167b54a3d
Display return to cart link on mobile devices (#48103)
* Display return to cart link on mobile devices

* Add changelog entry
2024-06-10 16:25:47 +02:00
Gerhard Potgieter 5b06493a5c
Fix tax table ajax save (#48201)
* Ensure onsubmit event that triggers ajax save on tax table is bind to the correct button
Unblock the button busy state after saving

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

* Update changelog

* Update changelog entry

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: André Kallehauge <3846700+kallehauge@users.noreply.github.com>
2024-06-10 15:45:35 +02:00
Karol Manijak 9b3879f7cf
Add "(Experimental)" suffix to experimental blocks (#48071)
* Add (Experimental) suffix to experimental blocks

* Add comments reminding to update feature flags doc

* Update feature flag doc

* Add changelog

* Provide links to all feature flags

* Add JS flag for Product Filter: Rating (Experimental)

* Bring back linting in PHP file

* Update block references

* Update variation names

* Update tests

* Update test

* Add notification that block is not available in inserter to block references doc

* Add missing feature flag

* Remove information about block not being exposed in inserter from block references

* Update block references
2024-06-10 15:12:10 +02:00
Alba Rincón 1fdba93d9f
Add a step to install patterns when during the CYS flow (#48274)
* Add a step to install patterns when during the CYS flow

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

* Add feature flag to the install patterns function

* Fix changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-10 15:00:33 +02:00
Alba Rincón 9d114c6d2d
[CYS - Full Composability] Select the next block after deleting the selected one (#48316)
* Select the next block after deleting one

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

* Fix lint error

* Check if next block client is defined

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-10 14:33:32 +02:00
Jonathan Lane ccbb811d7d
Update order URLs for HPOS in e2e tests (#46397)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
2024-06-10 12:35:28 +03:00
Bart Kalisz d3142a8941
Move archive product title update logic outside BlockTemplatesController (#48255)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2024-06-10 11:26:15 +02:00
79mplus Admin acec2f6903
Scroll to view the templates section on the status page. (#48125) 2024-06-10 10:20:43 +02:00
Chi-Hsuan Huang 04ffcd1ab0
Remove unused `woocommerce_task_list_prompt_shown` option (#48304)
* Remove unused woocommerce_task_list_prompt_shown option

* Add changelog

* Fix lint
2024-06-10 07:46:42 +00:00
Chi-Hsuan Huang 7cc360fa09
Fix untranslated strings on CYS and marketplace (#48127)
* Fix untranslated "Give feedback" text

* Add is_free property to theme API and fix untranslated price texts

* Fix prices

* Add changelog

* Capitalize Free

* Remove default price value
2024-06-10 07:30:46 +00:00
Maikel Perez 3d0b9993be
Product template not updating in the UI when it is changed (#48288)
* Fix Product template not updating in the UI when it is changed

* Add changelog file
2024-06-07 20:00:15 +00:00
Nathan Silveira 442adcc395
Determine _product_template_id from WP filter (#47762)
* Remove template matching from front-end

* Create 'woocommerce_rest_get_product' filter to allow extensions to change the product when it's fetched through the REST API

* Stop defaulting to 'standard-product-template' product template and handle defaults only in getLayoutTemplateId function

* Use created hook to determine and persist the product template ID when it's not defined.

Also introduce 'match_fn' in ProductTemplate to allow extensions to provide robust ways of matching the template

* Add changelog

* Fix tests

* Remove outdated tests

* Fix issue in filter because $product can be false and move API change to v3

* Add comments to continue statements

* Small refactor

* Only send layout template id to useLayoutTemplate after product is loaded

* Revert front-end changes

* Remove match_fn and create filter to allow extensions to determine the product template id

* Avoid loading layout template before product is loaded

* Create woocommerce_product_editor_determine_product_template filter and use it

* Update changelogs and remove unused code

* Remove _product_template_id for products that were created with the new product editor.

* Use only id to find productTemplate

* Turn hook into experimental

* Remove deprecated tests

* Rename filter

* Add more typings to useEntityRecord

* Use hasResolved boolean to check whether product has been resolved

* Add changelog

* Add 'variation' to ProductType

* Don't default to the standard-product-template for variations

* Update changelog

* Accept null in getLayoutTemplateId

* Fix edit variable product test

* Rename hook

* Revert changed logic to avoid regressions

* Increment useProductTemplate logic

* Default to standard-product-template instead of undefined when no matches

* Re-import Features class

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-06-07 19:48:20 +00:00
Corey McKrill 7c2b171b36
Ensure attribute slugs are properly handled in the Products REST API controller (#48198)
* Ensure attribute slugs are properly sanitized when setting

* Update approach to avoid breaking functionality in WP Admin UI

* Add changelog file

* Add unit test
2024-06-07 14:14:46 -05:00
Veljko V 31e8b6cc6b
Fix flaky filling product price in merchant/products/block-editor/create-variable-product-block-editor.spec.js (#48276)
* Fix flaky filling product price

* Add changelog
2024-06-07 09:18:27 -07:00
Tom Cafferkey 5bc915e811
Product Gallery: Prevent block from being registered on the post editor (#48228)
* Prevent ProductGallery block from being registered on the post or page editor

* Add product gallery to widget blacklist

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

* Update changelog

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-07 13:51:04 +00:00
Damián Suárez b019aa2700
PFT: introduce controller and initialize it (#48221)
* introduce super super base  product form template

* introduce ProductFormsController controller

* initialize PFT (product form template)

* changelog

* do not use clas prop to store controller

* show temporarely the Product Form CPT in the UI

* migrate also when plugin is installed

* eslinting

* minor code refactoring

* check $hook_extra param is defined

* introduce $product_form_templates private prop

* eslinting

* bump simple template version

* rename class method

* pick the action when plugin action
2024-06-07 14:37:21 +01:00
rodelgc 40c7cc1db6
Delete changelog files for 48231 (#48279) 2024-06-07 21:26:32 +08:00
Thomas Roberts 89bcbc7915
Apply lint fixes to payment method integration documentation (#48226) 2024-06-07 04:26:09 -07:00
github-actions[bot] 6b44e366f1
Delete changelog files based on PR 48235 (#48259)
Delete changelog files for 48235

Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
2024-06-07 19:11:46 +08:00
Alba Rincón bff253d6dc
CYS Patterns: exclude testimonial patterns using jetpack (#48233)
* CYS Patters: exclude testimonial patterns using jetpack

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-07 11:45:09 +02:00
Alba Rincón 3a28c8ce7b
CYS > Ensure that after installing fonts or patterns the user lands back in the same CYS section (#48227)
* Fix crash when currentTemplate is null

* Redirect to the proper section after installing fonts or patterns

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-07 11:38:46 +02:00
Karol Manijak 5151546159
Update test adding blocks (#48211)
* Simplify the list of blocks to test and order them alphabetically

* Add missing blocks in test checking if they can be inserted

* Remove Coming Soon that's not available yet

* Add changelog

* Improve specificity of the Reviews by Product test

* Get better selector for Reviews by Product placeholder

* Exclude Product Gallery (Beta) - not intended to be used in post

* Fix alphabetical order
2024-06-07 10:04:15 +02:00
Hsing-yu Flowers 9032c9d954
Add error class to checkout endpoint response (#47489)
* Add error class to checkout endpoint response

* Check if previous exist before using it

* Remove assigned empty array to the additional data

* Create initial additional data state

* Fix exception not escaped linting error

* Get Exception class when WP_DEBUG is defined and true

* Add hook docblock comment

* Add phpcs disable missing since comment

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-07 13:20:33 +05:30
Jorge A. Torres 7f75aa7487
Add `original_post_status` to HPOS order edit screen (#48196)
* Include "original_post_status" with prefixed order status on HPOS edit screen

* Add changelog

* Fix PHPCS issue
2024-06-07 13:19:05 +05:30
Ilyas Foo 60ca86e31c
Add unit tests for 4 wcadmin tracks (#47876)
* Add unit test for pageview on non-embedded layout component

* Add tracks test for payments welcome page

* Add test for task completion track

* Update completion track to use get_json instead for more accurate coverage

* Changelog

* Lint

* Add test for tasklist item click

* Change test name
2024-06-07 15:14:26 +08:00
RJ 52e2e9f864
dev: core profiler xstate v5 migration (#48135)
* updated core profiler to xstate v5
2024-06-07 15:06:40 +08:00
Adrian Duffell 2583289197
Enable Launch Your Store feature flag in 9.1 (#48244)
* Revert "Disable Launch Your Store feature flag in 9.0 (#48231)"

This reverts commit 76d2b205e5.

* Re-add the previous changelog

* Update version number in db update

* Add changelog
2024-06-07 13:49:55 +08:00
Jonathan Lane 8efb1d3c3d
Add a skipped tests custom reporter for e2e tests (#48195)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-06-06 23:48:20 +03:00
Matt Sherman 17b73ad463
Product Editor: Move variation pricing fields to General tab (#48155) 2024-06-06 16:44:27 -04:00
Adrian Duffell 76d2b205e5
Disable Launch Your Store feature flag in 9.0 (#48231)
* update: lys feature flag off (#46852)

* Revert db update

---------

Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>
2024-06-06 13:11:31 -07:00
Adrian Moldovan 8fc6970b90
[ci] Merge test jobs into a single generic job (#48175) 2024-06-06 21:50:52 +03:00
Fernando Marichal 15b9805704
Revert customer-effort-score-tracks feature flag removal (#48235)
* Revert "Remove customer-effort-score-tracks"

This reverts commit 079d1fc6b6.

* Add  changelog
2024-06-06 15:27:10 -03:00
Veljko V afdd6e1cd5
Improve editor util for inserting blocks via shortcut in e2e test suite (#48225)
* Improve inserting blocks via shortcut and update relevant tests

* Add changelog

* Update util function

* Switch fill to pressing to avoid flakiness
2024-06-06 09:04:26 -07:00