Commit Graph

52088 Commits

Author SHA1 Message Date
nigeljamesstevenson ff50a69256
Remove the unnecessary `daily.playwright.config` (#38336) 2023-05-20 00:49:07 +01:00
Matt Sherman 08d7c24298
Fix race condition when rendering product attributes tab empty state (#38354) 2023-05-19 19:15:06 -04:00
Corey McKrill 4791f03b47
Implement admin-side order edit lock for HPOS orders (#38230)
This PR adds support to HPOS for order edit locking in the admin (similar to what posts and custom post types get by default). Specifically, the following is implemented:

* The lock is stored in order meta for interoperability with WP's implementation.
* Orders that are being edited by a user other than the current one will appear with a lock icon next to them in the list table. This lock icon/status is updated live via heartbeat with no page refresh necessary.
* When opening an order that is being edited by another user, a warning will be displayed, with the ability to take over the order:
* When someone has taken over an order you're editing, you'll get a warning about it automatically via heartbeat (no page refresh involved)

Fixes #37108
2023-05-19 15:50:08 -07:00
Nathan Silveira 5723f436cd
Add `wcadmin_settings_change` tracks event to shipping fields (#38305)
* Call update_option and update_options in shipping_zone_add_method

* Add new hook 'woocommerce_update_shipping_setting' to settings tracking

* Add tracking for shipping_zone_add_method

* Add tracking to shipping_zone_methods_save_changes

* Add changelog

* Update hook name and track modified option

* Prevent options from being added twice to array
start fixing php sniff issues

* Add docblocks

* Remove empty space

* Add docblock for parameter

* Fix lint issue

* Fix code introduced by mistake
2023-05-19 16:05:07 -03:00
Nathan Silveira ef0a32ff48
Reload page when toggling new-product-management-experience (#38348)
* Add callback to reload page when togglint new-product-management-experience

* Add changelog

* Implement reload for product-block-editor and code review suggestions
2023-05-19 14:57:51 -03:00
Maikel David Pérez Gómez ebf0b92960
Use feature the new feature flags engine to guard the access to the new product blocks experience (#37122)
Unregister the product-block-editor feature flag from WC Admin Test Helper, and enable product block editor feature.
2023-05-19 12:53:55 -04:00
Nathan Silveira 5437ed50c3
Use SelectTree in Parent Category field (#38261)
* Increment label CSS to look the same as TextControl's label

* Migrate Parent Category field to SelectTree

* Add changelogs

* Fix unit test that was edited by mistake

* Revert css changes in select-control.scss

* Use BaseControl as label on SelectTree

* Increment changelog

* Increment changelogs

* Refactor test

* Refactor category-field functions and use them in related places

* Fix ordered list appearing empty
2023-05-19 12:45:11 -03:00
Nathan Silveira 869b897ddd
Rename tracks event `product_attributes_add` to `product_attributes_save` on the product page and update attributes (#38278)
* Change attributes of tracks event product_attributes_add

* Don't send used_for_variations_count if it's not variable product type

* Explicitly add null values in product_attributes_add when the attribute is sent on the other call

* Rename product_attributes_add on the product page to product_attributes_save
Fix inverted local and global attributes count
Remove unnecessary parameters
Refactor code

* Update changelog
2023-05-19 12:44:54 -03:00
nigeljamesstevenson 67a583d9a8
Remove wp-env workaround (#38326) 2023-05-19 16:14:55 +01:00
Vedanshu Jain 048778a72b
Support strict SQL modes in HPOS migration that dont allow zero date (#38332) 2023-05-19 16:57:50 +02:00
nigeljamesstevenson f903feb741
Break down `create-variable-product` spec into smaller files (#38335) 2023-05-19 15:38:41 +01:00
Mike Jolley 28c72e81c4
Remove the global wc-cart-fragments enqueue (#35530) 2023-05-19 13:53:41 +01:00
Matt Sherman ab770510c1
Always show product variations empty state with message when there are no "used for variations" attributes (#38358) 2023-05-19 08:37:22 -04:00
Matt Sherman 2992e22507
Show correct confirmation message when removing an attribute from a product (#38355) 2023-05-19 08:27:47 -04:00
nigeljamesstevenson c99d60647e
E2e/gutenberg latest nightly 0 (#38287) 2023-05-19 12:24:08 +01:00
Chi-Hsuan Huang fc493c41ef
Remove sample data from product templates (#38343)
* Remove sample data from product templates for product task

* Add changelog

* Update product templates

* Remove unused columns from product templates and set Published to -1
2023-05-19 19:04:15 +08:00
Peter Fabian 862a947d7c
Install/update: Make the DELETE in 2 queries instead of 60+ (#37472) 2023-05-19 12:35:37 +02:00
Ashwin Parthasarathi ee31067f8f
Dev/37219 add hook to remove order items (#37822) 2023-05-19 12:10:11 +02:00
RJ 06e6f5012f
dev: moved geolocation utils from wccom to here (#38356) 2023-05-19 15:02:39 +08:00
Sam Seay 5ba15f84cd
Remove the code cov action from CI checks (#38314)
Remove the code cov action.
2023-05-19 13:29:17 +12:00
Sam Seay aecd786907
Add troubleshooting for PHP install (#38239)
* Add troubleshooting for PHP install.

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

---------

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>
2023-05-19 12:03:43 +12:00
Jorge A. Torres f94ef3aa0a Add tests 2023-05-18 17:33:24 -05:00
Jorge A. Torres 0d4fd536b8 Move EditLock to correct folder 2023-05-18 17:33:24 -05:00
Jorge A. Torres 7b2afeb381 Improve styles for edit lock icon 2023-05-18 17:33:24 -05:00
Jorge A. Torres 4025c07097 Add changelog 2023-05-18 17:33:23 -05:00
Jorge A. Torres 5dd84a5fe6 Integrate edit lock into edit order screen 2023-05-18 17:33:23 -05:00
Jorge A. Torres ead99659e8 Integrates edit locking into the orders list table 2023-05-18 17:33:23 -05:00
Jorge A. Torres 4a11c03083 Remove ‘_edit_lock’ from internal datastore keys 2023-05-18 17:33:23 -05:00
Jorge A. Torres cc385bf16d fixes to css list table 2023-05-18 17:33:23 -05:00
Jorge A. Torres fb5ac94218 Change how the checkbox column is rendered in the ListTable 2023-05-18 17:33:23 -05:00
Jorge A. Torres e74f3eb206 Initial version of EditLock 2023-05-18 17:33:23 -05:00
Jorge A. Torres f306e632fa Allow CSS classes to be defined for table list rows and the table itself 2023-05-18 17:33:23 -05:00
Jorge A. Torres d18c13eb71 Fix possible error in ListTable bulk actions 2023-05-18 17:33:23 -05:00
Corey McKrill e8afe4649a
COT CLI: Add support to verify specific order types. (#38318)
This PR fixes the bug the where we were only verifying shop_order orders. This also adds the option to provide a list separated by , of order types to verify.

Fixes #38317
2023-05-18 10:09:33 -07:00
louwie17 2843fbb7a8
Fix editor header hidden in Firefox (#38247)
* Update page config to add support for layout header/footer

* Fix lint error
2023-05-18 13:00:42 -03:00
Ron Rennick 5d6b3d5ceb
Use esc_html_e instead of esc_attr_e (#36868) 2023-05-18 11:56:11 -03:00
Vedanshu Jain 2650292fa6 Minor doc fix. 2023-05-18 17:08:54 +05:30
Vedanshu Jain 33acd4c4d1 Add support to verify specific order types. 2023-05-18 17:08:54 +05:30
rodelgc 94b665817c Merge branch 'trunk' into e2e/remove-daily-playwright-config 2023-05-18 19:36:19 +08:00
rodelgc e3a39d5b20 Clear cookies on request 2023-05-18 19:34:35 +08:00
Joshua T Flowers d17ca83b02
Add error specific messages to product save functionality (#38307)
* Allow errors to be thrown when saving entity records

* Show frontend error message when one exists

* Allow errors to be thrown in preview save entity

* Rename new util to getProductErrorMessage

* Add tests around error message util

* Add changelog entry
2023-05-18 05:28:28 -03:00
Joshua T Flowers 81e92392d5
Fix double scrollbars on product editor page (#38281)
* Refactor Layout component to functional component

* Add class to pages based on page path

* Add styling for interface skeleton on product pages

* Add changelog entries

* Move product page styles out of product editor package and into client

* Fix linting issues

* Check for location before checking path in page tracking

* Dont add body classes when no page path exists

* Record page view without router location for embed pages
2023-05-18 05:25:36 -03:00
Néstor Soriano 32bd197d0e
Minor grammar fix 2023-05-18 09:26:25 +02:00
Chi-Hsuan Huang b8aa7eb1fe
Update task list documentation and example (#38245)
* Update woocommerce task list examples

* Update onboarding-tasks.md

* Add changelog

* Update changelog

* Update task list doc

* Update onboarding-tasks.md

* Update examples readme

* Fix lint

* Update onboarding-tasks.md

* Fix build wca example cmd

* Update plugins/woocommerce-admin/docs/features/onboarding-tasks.md

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

* Update plugins/woocommerce-admin/docs/features/onboarding-tasks.md

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

* Update plugins/woocommerce-admin/docs/features/onboarding-tasks.md

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

* Update plugins/woocommerce-admin/docs/features/onboarding-tasks.md

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

* Update task list image

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-05-18 11:21:53 +08:00
RJ 00952e8b95
add: core profiler fetch extensions (#38270)
add: fetch extensions and countries from API for core profiler

- prefetch it once in the machine init so that it's instant when used later
- fetch it again in preExtensions state and store it to context
- added prefetch for getCountries as well
2023-05-18 10:50:59 +08:00
Moon baf7714dfa
Add onboarding/plugins REST endpoint (#38174)
* Remove unused $job_id argument

* Support WP_Upgrader argument -- helps for testing

* Minor refactor to support a custom logger in install_plugins

   * Support a custom logger in install_plugins
   * Support swapping out WP_Upgrader impl.
   * Added woocommerce_plugins_install_async_callback callback to call install_plugins with a custom logger from action scheduler

* Add a new REST endpoint for onboarding plugins

* POST /wc-admin/onboarding/plugins/install-async -- queues plugin installs to action scheudler
* GET /wc-admin/onboarding/plugins/scheduled-installs/:job_id -- returns current status of given job id

* Remove WP_Upgrader support -- not using it

* Add changelog

* Fix phpcs errors

* Call complete

* Update test to wait 1 sec before checking the action scheduler

* Remove test that requires waiting an async action

* Add test for 404 status

* Add status field

* Remove woocommerce_plugins_install_async_callback action -- no longer used

* Call run-in-background endpoint with blocking=false to simulate a background process

* Update plugins/woocommerce/src/Admin/PluginsInstallLoggers/AsynPluginsInstallLogger.php

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

* Update plugins/woocommerce/src/Admin/PluginsInstallLoggers/PluginsInstallLogger.php

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

* Update plugins/woocommerce/tests/php/src/Admin/API/OnboardingPluginsTest.php

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

* Update plugins/woocommerce/tests/php/src/Admin/API/OnboardingPluginsTest.php

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

* Update plugins/woocommerce/tests/php/src/Admin/API/OnboardingPluginsTest.php

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

* Update plugins/woocommerce/src/Admin/PluginsInstallLoggers/PluginsInstallLogger.php

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

* Fix incorrect logger name

* Add max_execution_time setting

* Remove test code

* Skip failing test -- hard to test as the function uses site url and test env does not actaully have a running WP

* code format

* Revert background process changes

* Add install and activate endpoint

* Update plugins/woocommerce/src/Admin/PluginsInstallLoggers/AsynPluginsInstallLogger.php

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

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

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

* Require activate_plugins permission

* Add test to check for permissions

* Update install and activate schema

* Fix: import AsyncPluginsInstallLogger correctly

* Fix: add missing comments

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-05-17 19:08:00 -07:00
Paul Sealock 600b19c6f8
Monorepo Utils: Consolidate checking environment to use isGithubCI (#38310)
* use isGithubCI

* Add basic tests for isGithubCI and fix failing existing test.

---------

Co-authored-by: Sam Seay <samueljseay@gmail.com>
2023-05-18 10:42:09 +12:00
Paul Sealock b7d17f3d8d
Code Freeze CLI Add changelog to code freeze action (#38264)
Add changelog CLI to code freeze action
2023-05-18 10:41:46 +12:00
Ron Rennick d8eee11eb2
Fix TT3 styles and typography in the single product's attributes table (#37895) 2023-05-17 16:37:49 -03:00
rodelgc 677c3c9cee Add changelog 2023-05-18 00:22:32 +08:00