How to disable WordPress plugin updates

Sometimes we make code changes in our installed plugins to fix problems, add new features or customize the plugin. Obviously, if we update any modified plugin to the latest version, we are going to lost all the changes we have made.

Maybe, we have another administrator user as webmaster of our website and he doesn’t know this plugin update problem.

To avoid this, we are going to disable a list of indicated plugins.

First, add a new function at the end of our active theme functions.php file, which it is located in ‘/wp-content/themes/template_name/functions.php‘.

function disable_plugin_updates( $value ) 
{
   unset( $value->response['advanced-access-manager/aam.php'] );
   unset( $value->response['css3_web_pricing_tables_grids/css3_web_pricing_tables_grids.php'] );
   unset( $value->response['google-sitemap-generator/sitemap.php'] );
   unset( $value->response['simple-share-buttons-adder/simple-share-buttons-adder.php'] );
   unset( $value->response['simply-exclude/simplyexclude.php'] );
   unset( $value->response['visual-form-builder/visual-form-builder.php'] );
   unset( $value->response['wordpress-seo/wp-seo.php'] );
   unset( $value->response['wp-memory-db-indicator/wp-memory-db-indicator.php'] );
   unset( $value->response['wp-migrate-db/wp-migrate-db.php'] );
   unset( $value->response['wp-rss-multi-importer/wp-rss-multi-importer.php'] );
   unset( $value->response['wp-super-cache/wp-cache.php'] );
   return $value;
}

Each line is a plugin to being disabled.
 
We must define the plugin path name ‘advanced-access-manager‘ and the main plugin file, in this case ‘aam.php‘.

unset( $value->response['advanced-access-manager/aam.php'] );

 
Then, after our function, we add the next code:

add_filter( 'site_transient_update_plugins', 'disable_plugin_updates' );

 
Save the file and the indicated plugins will not shown more update messages.
 

Alberto
A young developer from Madrid who loves programming and computing. Constantly testing with new technologies and thinking in new projects and challenges.