Prevent WordPress plugins from requesting updates

January 4, 2016

Ever need to “lock” a plugin into a specific version and do not want it showing in the updates list and getting accidentally updated?

This quick snippet allows you to specify a plugin(s) that should not appear in the update list. This will effectively block them from updating through WordPress itself. Manual updates/changes to the plugin(s) is still possible however.

[php]
add_filter( ‘site_transient_update_plugins’, array( ‘no_updates_for_you’ ) );

function no_updates_for_you( $value ) {
$plugin = ‘[plugin_folder]/[plugin_file].php’;
if ( empty( $value ) || empty( $value->response[$plugin] ) ) {
return $value;
}
unset( $value->response[$plugin] );
return $value;
}
[/php]

Be sure to change [plugin_folder]/[plugin_file].php to the plugin you want to prevent updating.

One thought on “Prevent WordPress plugins from requesting updates

  1. Debra (November 1, 2018)

    I have 10 gallon and have black algae what can i do i have 4 Cat Cora’s and 5 tetra is it because i have to many fish or what please help me

Leave a Reply

Your email address will not be published. Required fields are marked *