Question
Answer
Add the following code to functions.php in your WordPress theme files.
/**
* Debug Pending Updates
*
* Debugging method that will show all pending plugin
* and theme updates for admin level users when ?debug_updates is
* added to a /wp-admin/ URL.
* Created by Kevin Leary at https://www.kevinleary.net/
*/
function debug_pending_updates() {
// Rough safety nets
if ( ! is_user_logged_in() || ! current_user_can( 'manage_options' ) ) return;
if ( ! isset( $_GET['debug_updates'] ) ) return;
$output = "";
// Check plugins
$plugin_updates = get_site_transient( 'update_plugins' );
if ( $plugin_updates && ! empty( $plugin_updates->response ) ) {
foreach ( $plugin_updates->response as $plugin => $details ) {
$output .= "Plugin $plugin is reporting an available update.
";
}
}
// Check themes
wp_update_themes();
$theme_updates = get_site_transient( 'update_themes' );
if ( $theme_updates && ! empty( $theme_updates->response ) ) {
foreach ( $theme_updates->response as $theme => $details ) {
$output .= "Theme $theme is reporting an available update.
";
}
}
if ( empty( $output ) ) $output = "No pending updates found in the database.";
wp_die( $output );
}
add_action( 'init', 'debug_pending_updates' );
Visit a page with ?debug_updates added to the URL.
For example: yourdomain.example/wp-admin/?debug_updates.
This will show you any theme(s) or plugin(s) causing the issue.
I know a lot about WordPress, but I don't know everything. I had to do a search for the answer to this question, and I found it on Stack Overflow.
All the credit for the solution goes to Boston-based Kevin Leary, who is also a WordPress Developer who shared the solution for free on Stack Overflow.
Thanks, Kevin!
In the case of the person asking the question, they allowed me access to their site, and it turns out that the update notification was for a plugin that had been discontinued by the developer and the functionality of the extension rolled into the base plugin.
I didn't see this until after I ran Kevin's code in functions.php. I removed the discontinued plugin and the notification went away.