Skip to content

Plugins: Update the Plugins screen after updating a plugin from the details modal - #14289

Open
DevinWalker wants to merge 2 commits into
WordPress:trunkfrom
DevinWalker:62212-plugin-details-modal-update
Open

DevinWalker wants to merge 2 commits into
WordPress:trunkfrom
DevinWalker:62212-plugin-details-modal-update

Conversation

@DevinWalker

@DevinWalker DevinWalker commented Oct 15, 2026 •

Copy link
Copy Markdown

Updating a plugin from the "View details" modal on the Plugins screen leaves the list out of date. The modal shows "Updated!", but after closing it the row still shows the old version and the update notice, and the update counts don't change until you reload.

Since 6.5 the update runs inside the modal's iframe. When it finishes, the iframe posts an updated-plugin message to the parent window, but the parent only uses it to update plugin cards on the Add Plugins screen.

This PR:

  • Adds the plugin file and the old and new versions to the updated-plugin message.
  • Updates the plugin's row on the Plugins screen when that message arrives, matching what the inline "update now" link does.
  • Decrements the update counts on any screen that opens the modal. Add Plugins and Dashboard > Updates had the same stale counts.
  • Removes the click handler for #plugin_update_from_iframe. Nothing has output that ID since 6.5 (comment:1 on the ticket).

The modal still stays open and shows "Updating..." then "Updated!", same as 6.5. The parent doesn't call wp.updates.updatePluginSuccess() or trigger wp-plugin-update-success, so screen readers don't hear "Update completed successfully." twice, and a bulk update notice in progress on the same screen doesn't count the modal update.

Trac ticket: https://core.trac.wordpress.org/ticket/62212

Before and after

After updating Classic Editor from 1.6.3 to 1.7.0 in the "View details" modal and closing it:

Before: the row still shows 1.6.3 and the update notice, and the update counts stay at 1. After: the row shows 1.7.0 with an "Updated!" notice, and the counts are cleared.

Testing Instructions

  1. Install an older version of a plugin, for example npm run env:cli -- plugin install classic-editor --version=1.6.3 --force.
  2. Go to "Plugins > Installed Plugins" and click "View version 1.7.0 details" in the update notice.
  3. Click "Update Now" in the modal and wait for "Updated!".
  4. Close the modal.
  5. Before: the row still shows 1.6.3 with the update notice, and the counts still show 1. After: the row shows 1.7.0 with an "Updated!" notice, and the counts are cleared.
  6. Repeat from a plugin card's "More Details" on "Plugins > Add Plugin" and from "View version details" on "Dashboard > Updates". The update counts should drop after closing the modal.

The inline "update now" link on the Plugins screen works the same as before. I tested all of the above on single site and on multisite, using the matching Network Admin screens.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Tracing the cause, writing the patch, and scripted browser testing (Playwright) against a local wordpress-develop environment. I reviewed the code and the test results before submitting.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

…etails modal.

Since WordPress 6.5, updating a plugin from the "View details" modal runs the update inside the modal's iframe. The modal shows "Updated!", but the screen behind it never finds out. The Plugins list keeps showing the old version and the update notice, and the update counts in the admin menu, Toolbar, and "Update Available" filter stay the same until the page is reloaded.

The existing `updated-plugin` message sent to the parent window now includes the plugin file and the old and new versions. The parent uses it to update the plugin's row on the Plugins screen, the same way the inline "update now" link does, and to decrement the update counts on any screen.

This also removes the click handler for `#plugin_update_from_iframe`, which has not matched any element since 6.5.

See #62212.
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props dlocc.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

DevinWalker added a commit to DevinWalker/wordpress-develop that referenced this pull request Oct 15, 2026
@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant