Disable the update of a WordPress plugin

One of my WordPress plugins had often bad functioning updates (Organize Series). With this updates I had to recover the corrupted database by hand. A lot of work. It is possible to ignore the updates, but you make easily the mistake to update it with the others. To protect you to this, it is possible to disable the update with a couple of simple rows of code.

You have to be careful, sometime a plugin needs to be updated for the safety aspect. In that case you can do the update by hand or just remove these rows of code until the plugin is updated.

Copy the following rows into the main php file in the plugin directory. In this file is also the plugin data stored. The name of the file is mostly also the name of the plugin and/or the name of the name of the plugin directory:

/*AW!!! Disable plugin update */
add_filter('site_transient_update_plugins', 'my_remove_update_msg');
function my_remove_update_msg($value) {
 unset($value->response[ plugin_basename(__FILE__) ]);
 return $value;