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
* 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
* 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
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
* 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>
* Create ValidationContext
* Add ValidationProvider to the product editor
* Add new validation to the name block
* Add new validation to the Save button
* Store validations within a useRef instead of useState to improves re-renders
* Create find first visible and invalid element function
* Add focus first invalid element feat when submitting
* Integrate autofocus with name block
* Migrate sale-price block to the new validation system
* Add changelog file
* Migrate regular-price block to the new validation system
* Migrate schedule-sale block to the new validation system
* Migrate inventory-quantity block to the new validation system
* Migrate shipping-dimensions block to the new validation system
* Remove old validation hook
* Add validation to the save-draft button
* Add validation to the preview button
* Expose validation hooks to be used outside of the package
* Make sure the product is in fact saved before calling the onPublishSuccess
Co-authored-by: James Collins <james@om4.com.au>
Co-authored-by: Nestor Soriano <konamiman@konamiman.com>
Includes UI detailing how many webhooks are assigned to each of the users being deleted, and explaining how the re-assignment works.
* Remove block registration from within the Editor component
* Expose the initBlocks function to be used outside of the product package
* Register blocks within the ProductPage component
* Add changelog files
* Unregister blocks when product page gets unmounted
* Move API instance generation into functions to ensure they don't run on import.
* Dont use extraneous variables, call singleton fns directly.
* Get rid of accidental change