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
* Add core profiler - welcome to woo page
* Update checkbox styles
* Add tracks
* Update default tracking value
* Update copies
* using invoked promise instead of useState
- take advantage of xstate's built ins for side effects instead of useEffect/hooks
- discovered that error result wasn't really handled in original useEffect
- use text labels instead of inline functions so that we can decouple the implementation from the machine model
- todo: can move the invoked function out elsewhere and also tests if needed (not necessary here because it's a simple call)
* add: core profiler scaffolding using xstate
* Add navigation and progress-bar components
* fix css lint error
* Update plugins/woocommerce-admin/client/core-profiler/components/navigation/woologo.tsx
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce-admin/client/core-profiler/components/progress-bar/progress-bar.tsx
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce-admin/client/core-profiler/components/navigation/navigation.tsx
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Remove var from __ function
* Use woocommerce prefix for classnames
* Fix css lint error
* Fix broken tests
* Add business location page
* Remove unwanted changes from rebase
* Remove unwanted changes from rebase
* Redirect to Woo Home on exit
* Add tracks
* Fix js lint error
* Add loader page
* Support meta value from nested states
* Use navigateTo
* Add tests for getCountryStateOptions
* Use Country type from navigation package
* Rename useStages to getLoaderStageMeta
* Add changelog
* Move progress from 20 to 80
* Fix xstate warning
* Fix broken pnpm lock
* Fix eslint errors
* Update plugins/woocommerce-admin/client/core-profiler/services/country.ts
Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>
* Update plugins/woocommerce-admin/client/core-profiler/index.tsx
Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>
* Save country to option
* Fix jslint error
* Update plugins/woocommerce-admin/client/core-profiler/services/country.ts
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Update plugins/woocommerce-admin/client/core-profiler/style.scss
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Fix eslint error
* Use decodeEntities directly
* Update comment for artificial 3 seconds wait
* Disable Go to my store button when country is empty
* Style for mobile devices
* Style updates for the country dropdown
* Fix js lint error
* Update country dropdown border color
* Style the loader
* Fix css lint
---------
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: rjchow <me@rjchow.com>
Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>