[wp-trac] [WordPress Trac] #61319: Plugin Dependencies: Change AJAX activation handler to restore auto-redirect after plugin activation

WordPress Trac noreply at wordpress.org
Wed May 29 17:09:53 UTC 2024


#61319: Plugin Dependencies: Change AJAX activation handler to restore auto-
redirect after plugin activation
----------------------------------------+-----------------------------
 Reporter:  hellofromTonya              |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  6.5.4
Component:  Upgrade/Install             |     Version:  6.5
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch has-testing-info  |     Focuses:  administration
----------------------------------------+-----------------------------
Changes (by hellofromTonya):

 * keywords:  has-patch => has-patch has-testing-info


Comment:

 = Testing Instructions

 These steps define how to reproduce the issue, and indicate the expected
 behavior.

 Patch: https://github.com/WordPress/wordpress-develop/pull/6670

 == Set up

 Patch: https://github.com/WordPress/wordpress-develop/pull/6670
 Note: After applying the patch, it needs to be built (i.e. to build the JS
 and its minified version) which is done by:

 {{{
 npm install
 npm run build:dev
 }}}

 == Steps to Test in the Add Plugins UI:

 1. Navigate to Plugins > Add New Plugin.
 2. In the plugins search box, type the name of the plugin you're testing
 (e.g. `woocommerce`) and press enter. The UI should populate with that and
 associated plugins.
 3. In the plugin's card, press the "Activate" button.

 **Expected Results:**
 After triggering the `Activate` button:
 * The browser should navigate to either:
    * the `plugins.php` UI
    * or, if if the plugin has a redirect in it, the plugin's configure
 page / onboarding wizard
 * The "Refresh now" admin notice and button should not appear.

 == Steps to Test in the More Details modal:
 Note: Deactivate the plugin first.

 1. Navigate to Plugins > Add New Plugin.
 2. In the plugins search box, type the name of the plugin you're testing
 (e.g. `woocommerce`) and press enter. The UI should populate with that and
 associated plugins.
 4. In the plugin's card, click on the "More Details" link below the
 "Activation" button.
 5. Press the "Activate" button (may need to scroll down to the button).

 **Expected Results:**
 After triggering the `Activate` button:
 * The browser should navigate to either:
    * the `plugins.php` UI
    * or, if if the plugin has a redirect in it, the plugin's configure
 page / onboarding wizard
 * The "Refresh now" admin notice and button should not appear.
 * The plugin should be activated.

 == Steps to Test another plugin that requires the plugin you're testing
 Note: Deactivate the plugin first.

 Example: When searching for WooCommerce plugins to add, notice there are
 several dependent upon WooCommerce, such as WooCommerce Stripe Payment
 Gateway.

 The instructions will be for WooCommerce. But it's the same steps for
 others such as Elementor.

 1. Navigate to Plugins > Add New Plugin.
 2. In the plugins search box, type `woocommerce` and press enter. The UI
 should populate with that and associated plugins.
 3. For one of the plugins requiring WooCommerce (such as WooCommerce
 Stripe Payment Gateway):
   4.1 Press the "Install Now" button.
   4.2 After installed, notice unable to activate the plugin. This is by
 design as it requires WooCommerce.
   4.3 In the "Additional plugins are required" section, click
 WooCommerce's "More Details" link.
   4.4 In the modal, press the "Activate" button. Expected: WooCommerce's
 onboarding wizard should load.
   4.5 In your browser, click the button to navigate back to the Add
 Plugins UI. Expected: WooCommerce Stripe Payment Gateway plugin's
 `Activate` button is available.
   4.6 Activate the plugin.

 **Expected Results:**
 After triggering WooCommerce activation button:
 * The browser should navigate to Woo's onboarding wizard.
 * The "Refresh now" admin notice and button should not appear.
 * The plugin should be activated.

 After navigating back to the Add Plugins UI, plugins requiring WooCommerce
 are now able to be activated.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61319#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list