Changes proposed in this Pull Request
This PR is a different approach to handle when the client should redirect once some plugins are installed on the site.
Almost all logic is handled by the withPluginRedirect()
HOC, which wraps the <PluginMeta />
component.
It supports the WooCommerce
plugin redirection so far, but it gets almost everything ready to extend its functionality to scale to other plugins that require dealing with similar behavior.
Fixes #51327 #17686 #52539
Testing instructions
Test with Jetpack and Atomic site
- Go to WooCommerce plugin page in calypso:
<hostname>/plugins/woocommerce/<site-id>
- Click on the Install button to trigger the install process.
- Once the plugin is installed, the app should show the first success notice:
- then, seconds after it should show another success message
- From here, confirm you have 5 seconds to cancel the redirect by clicking on the
Cancel
button.
- Confirm that after fice seconds, the client performs a redirect to the WooCommerce Wizard page.
Videos
Jetpack site
Screen.Recording.2021-04-28.at.5.07.48.PM.mov
Atomic site
Screen.Recording.2021-04-28.at.5.09.44.PM.mov
Related to #
Unfortunately, no screenshots were provided by the developer.