Prevent Plugin Update Notifications

While developing a site for a client project it was required that I hack up an existing plugin’s core files. Out of the box, the plugin was very powerful, but I needed to add some additional functionality for my client. If the plugin were updated in future, all of the additions and tweaks I made to the plugins core files would be over written and the plugin would then become un-useable for my client and potentially break their site.

Sometimes you just don’t want your clients to have TOO much control over their site. This can lead to some serious issues down the road, and tons of emails and phone calls back and forth trying to figure out what the client did and then spending the time to resolve the issue. One situation that I have found my self in is when a client updates a plugin only to find out that the new version causes php or javascript errors and takes their site down.

One solution that I decided to go with in this project was including a function and adding a filter to the plugins main .php file. The function below prevents the plugin from ‘phoning home’ and checking if there is a newer version of the plugin in the repository. Using this function and filter, I was able to successfully block future update notifications to my clients dashboard.

How To Use

Just copy and paste the code from above and include it in to a plugins main .php file. For example to prevent contact-form-7 from notifying you of updates you would need to open ‘/wp-content/plugins/contact-form-7/wp-contact-form-7.php’ and then scroll to the bottom and paste the code above in. Save the file, and you will no longer receive update notifications.

About the Author

Evan Herman

Evan is a full time WordPress developer at Yikes Inc. where he makes all sorts of cool things with WordPress. When he's not there you can find him developing awesome plugins, blogging about WordPress or hanging out with his three cats and amazing girlfriend in Philadelphia, PA.