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
* 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>
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
* 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>
* Add `aria-describedby` to select options button
* add a changelog
* update the chnagelog file
* fix type
* fix the function name
* remove `aria-describedby`s if with value
* suggestions implemented
* Minor PHPCS fixes
---------
Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
We change the behavior of how we decide whether to continue or stop the migration. Earlier, when deciding, we were counting all pending orders which was slow especially on large sites, and will continue to get slower as the migration processes. However, now we will only fetch if there is any order that needs migrating to decide whether to go ahead with the migration or not, which should be much faster then calculating the total count.