Skip to content

Treat older plugin no-update versions as up to date#535

Merged
schlessera merged 1 commit into
mainfrom
fix/5320-ignore-older-no-update
Jul 23, 2026
Merged

Treat older plugin no-update versions as up to date#535
schlessera merged 1 commit into
mainfrom
fix/5320-ignore-older-no-update

Conversation

@schlessera

@schlessera schlessera commented Jul 23, 2026

Copy link
Copy Markdown
Member

Problem

WordPress separates plugin update data into response (an update is available) and no_update (the plugin was checked, but no update is available).

WP-CLI additionally compared the installed plugin version with new_version for entries in no_update. When the installed version was higher, it changed the status to version higher than expected. wp plugin update then treated the plugin as skipped and could return an error even though WordPress considered it up to date.

This is observable with third-party update providers. The latest report in wp-cli/wp-cli#5320 points to Kadence Blocks 3.7.6 and its Harbor-backed legacy license update flow. Harbor may place an older or empty catalog version in no_update; both values trigger WP-CLI's special case. The execution context cannot resolve this because the transient has already been populated.

Solution

Keep the normal none status for plugin entries in no_update when their upstream version is older or empty. This matches WordPress Core, which only considers entries in response updateable.

This does not restore the old false-positive "Updated" result: items with update: none are excluded before the upgrader runs. The existing handling for a newer version in no_update remains unchanged, as that represents an unavailable update due to requirements or missing package access.

Tests

  • Replace the previous warning-oriented scenario with a deterministic outline covering both an older and an empty new_version.
  • Assert that listing reports none, and both bulk and single-plugin updates return the normal "already updated" success.
  • Keep the mixed-update case to verify that another eligible plugin is still updated without a warning or skipped count.

Fixes wp-cli/wp-cli#5320

Summary by CodeRabbit

  • Bug Fixes
    • Improved plugin update handling when WordPress reports an older or empty available version.
    • Plugins are now correctly shown as up to date instead of displaying misleading version mismatch warnings.
    • Updating all plugins or an individual plugin now reports a successful “already updated” result without unnecessary error output.
    • Plugin updates with valid newer versions continue to be identified as unavailable when appropriate.

@schlessera schlessera added this to the 2.3.7 milestone Jul 23, 2026
@schlessera schlessera added bug command:plugin-update Related to 'plugin update' command command:plugin-list Related to 'plugin list' command labels Jul 23, 2026
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 32cc2c7d-d0fc-43cb-a5ef-e11c50dc94c1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/5320-ignore-older-no-update

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the scope:testing Related to testing label Jul 23, 2026
@schlessera
schlessera force-pushed the fix/5320-ignore-older-no-update branch from 55638a1 to 6af207a Compare July 23, 2026 09:01
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@schlessera
schlessera marked this pull request as ready for review July 23, 2026 09:44
@schlessera
schlessera requested a review from a team as a code owner July 23, 2026 09:44
@schlessera
schlessera merged commit 950603b into main Jul 23, 2026
63 checks passed
@schlessera
schlessera deleted the fix/5320-ignore-older-no-update branch July 23, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug command:plugin-list Related to 'plugin list' command command:plugin-update Related to 'plugin update' command scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

version higher than expected for paid plugins

2 participants