How to easily disable updates for modified plugins on WordPress.
Marc Wagner
April 21, 2021
As a rule, plugins that have been implemented in a WordPress-compliant manner can be customized as far as possible via hooks and by overwriting templates.
But there are also exceptions that do not offer these functionalities.
To adapt the plugin to your website, you have to change the core files. However, these will be overwritten during an update. However, the update function of a plugin can be disabled.
To do this, simply paste the following code into your theme’s Functions.php:
/**
* Disable updates for recent products
*/
function disable_modified_plugin_updates( $value ) {
unset( $value->response['plugin_folder/plugin_file.php'] );
return $value;
}
add_filter( 'site_transient_update_plugins', 'disableModifiedPluginUpdates' );
Ideally, you should rename the plugin afterwards via the respective PHP and README file so that you remember that it is a modified version.
Note: You should ideally try to convince the author of your change before this step, so that it will be integrated directly by him. This may help other users and allow the plugin to be updated in the future.
Artikel von:
Marc Wagner
Hi Marc here. I’m the founder of Forge12 Interactive and have been passionate about building websites, online stores, applications and SaaS solutions for businesses for over 20 years. Before founding the company, I already worked in publicly listed companies and acquired all kinds of knowledge. Now I want to pass this knowledge on to my customers.