• Skip to primary navigation
  • Skip to main content
OsomCode

OsomCode

Awesome code tutorials for WordPress and Genesis

  • Subscribe
  • My account
    • Edit profile
    • Favorites
    • Update credit card
  • Login

Prevent automatic update of a specific WordPress plugin

Find out in this tutorial how to hide the WordPress automatic updates option for a given plugin.

WordPress 5.5 introduced quite a few new features, among them, the option to indicate that plugins should be automatically updated.

activate-option-update-automatically-plugin-WordPress

This is useful, but if you are managing client sites you may want to hide plugin activation/deactivation from their view as you learned in this tutorial.

Do you need more options?

You can also hide the automatic updates option granularly for a particular plugin and have it display a message instead:

prevent-show-option-update-automatically-plugin-WordPress

This is intended for plugin creators who want to endow them with this behavior.

But you can also use it in any plugin you are interested in to prevent your client from touching it “unintentionally”.

Is this your case? Here’s how to do it:

Snippet to prevent the update of a plugin in WordPress

Add the following code snippet to your functionality plugin:

To see this and another 839 code snippets of this website, login or subscribe here.

In this case, I have used Easy Digital Downloads as an example, but you can replace its slug (easy-digital-downloads) by the one of the plugin you are interested in.

You can also modify the message displayed in the plugins screen.

Remember, if you are not using it as the plugin creator, this does not prevent updates from being done automatically (if enabled), but simply displays a message instead of the option to modify it from the plugin page.

Conclusions

Do you want to prevent a particular plugin from displaying the option to auto-update in WordPress? Now you know how to do it with a simple code snippet.

If you have any question, please leave it in the comments. And if you want to give me a suggestion for future snippets, please send it through the contact form.

Benefits of being a subscriber. 🙂

Admin area PHP Plugins WordPress

To leave read and make questions about this code, you can login or register.

  • About OsomCode
  • FAQ
  • Contact

Legal Notice · Privacy Policy · Cookie Policy · Terms and conditions
Copyright © 2023

Lost your password?