Hide Update Notices for a Specific Plugin
Stops WordPress from offering updates for plugins you list, such as a customized plugin that must not be overwritten.
Opens WPIDE on
Code
add_filter( 'site_transient_update_plugins', function ( $value ) {
// Plugin basenames: folder/main-file.php.
$plugins = array( 'example-plugin/example-plugin.php' );
if ( is_object( $value ) && isset( $value->response ) && is_array( $value->response ) ) {
foreach ( $plugins as $plugin ) {
unset( $value->response[ $plugin ] );
}
}
return $value;
} );
Notes
You will not hear about security fixes for the listed plugins. Check them manually.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.