How To: Disable Specific Plugin Updates

I was looking for a way to disable updates for specific plugins, especially a plugin I bought for a year, not really keen to continue paying for it as the updates weren’t that important.

The Code to Disable Updates

Don’t use a plugin to do this, it doesn’t worth the performance cost it will have on your install. Simply use this code snippet! And yes… you can do that with my plugins as well. Nooo, don’t! ????

add_filter( 'site_transient_update_plugins', function( $value ) {
  $ignoredPlugins = [ 'affiliate-wp/affiliate-wp.php' ];
  if ( isset( $value ) && is_object( $value ) ) {
    foreach ( $ignoredPlugins as $plugin ) {
      if ( isset( $value->response[$plugin] ) ) {
        unset( $value->response[$plugin] );
      }
    }
  }
  return $value;
});

If you don’t know how to add custom code to WordPress, please check the artile about Add Custom PHP Code to WordPress.

Drawbacks of Disabling Updates

First and foremost, security is a big concern. Updating plugins is often done to fix security vulnerabilities and protect your website from hackers. If you disable updates, you might be leaving your website vulnerable to attack.

Another thing to consider is compatibility. Plugins are frequently updated to make sure they work well with the latest version of WordPress and other plugins. If you disable updates, you might run into issues with compatibility that can cause problems with your website’s functionality.

It’s also worth noting that plugin updates often include new features and improvements. By disabling updates, you’ll miss out on these enhancements and your website might not be able to take advantage of new technologies.

Lastly, it can be tough to manage your plugins if you disable updates. It can be time-consuming to manually update each one, especially if you have a lot of them. This can make it harder to keep track of which plugins need to be updated and make your workflow less efficient.

Overall, it’s usually a good idea to keep your WordPress plugins up to date to make sure your website is secure, functional, and able to take advantage of new features and improvements.