Opened 4 weeks ago
Last modified 2 weeks ago
#65909 new enhancement
Show “Activate” after updating an inactive plugin from the Add Plugins screen
| Reported by: | nithi22 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Plugins | Version: | |
| Severity: | normal | Keywords: | has-patch has-test-info has-screenshots |
| Cc: | Focuses: |
Description
When installing a new plugin from the Add Plugins screen, the “Install Now” button changes to “Activate” after installation completes.
However, when a plugin is already installed but inactive and has an update available in the Add Plugins screen:
- Go to Plugins → Add New.
- Search for an installed, inactive plugin with an available update.
- Click “Update Now.”
- After the update completes, the button does not change to “Activate.”
- The user must go to Plugins → Installed Plugins and activate it from there.
It would improve consistency and usability if the “Update Now” button changed to “Activate” after a successful update of an inactive plugin, matching the behavior after installing a new plugin.
Video Reference:- https://www.loom.com/share/cd0cfabf209f46d2b37559991e90a6b2
Attachments (1)
Change History (4)
This ticket was mentioned in PR #13163 on WordPress/wordpress-develop by @wprashed.
4 weeks ago
#1
- Keywords has-patch added
#2
@
2 weeks ago
Test Report
Description
This report validates that the current patch for Trac #65909 addresses the issue.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/13163 at e4f5422d8cc25c0d94639b89f80aecd523f7dd1b
Environment
- WordPress: 7.2-alpha-20260827.074207
- PHP: 7.4.33
- Server: PHP.wasm
- Browser: Chromium
- OS: Windows
- Theme: Twenty Twenty-Five
- MU Plugins: None activated
- Plugins: Classic Editor 1.6.3, installed and inactive before testing
Steps to Test
- Install Classic Editor 1.6.3 without activating it.
- Open Plugins → Add Plugin and search for Classic Editor.
- Confirm Update Now is available for version 1.7.0.
- Click Update Now and wait for the update and dependency check to complete.
- Confirm the same card changes to Activate.
- Click Activate.
Expected Results
- ✅ After an inactive plugin updates from Add Plugins, its card changes to an actionable Activate button.
- ✅ Clicking Activate activates the plugin directly.
Actual Results
- ✅ Classic Editor updated from 1.6.3 to 1.7.0.
- ✅ The card changed to Activate after the dependency check.
- ✅ Clicking Activate showed the “Plugin activated” notice and listed Classic Editor as active.
Supplemental Artifacts
- After patch: attachment:trac-65909-playground-activate.png
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
## Trac Ticket
https://core.trac.wordpress.org/ticket/65909
## Description
When updating an inactive plugin from the Add Plugins screen (Plugins > Add New), the button currently remains as a disabled "Updated!" state. Users must navigate to the Installed Plugins screen to activate it.
This PR brings consistency with the plugin installation flow: after successfully updating an inactive plugin, the button changes to "Activate" (or "Network Activate").
### The Changes
wp_ajax_update_plugin()(src/wp-admin/includes/ajax-actions.php):activateUrlgeneration when the updated plugin is inactive and the current user has theactivate_plugincapability (matching the logic inwp_ajax_install_plugin()).wp.updates.updatePluginSuccess(src/js/_enqueues/wp/updates.js):wp.updates.checkPluginDependencies()whenresponse.activateUrlis present in the response.wp.updates.checkPluginDependenciesSuccess&wp.updates.checkPluginDependenciesError(src/js/_enqueues/wp/updates.js):.update-nowalongside.install-nowso update buttons seamlessly transform into.activate-nowbuttons.### How to Test
Fixes #65909.