Title: Programatically block plugin updates
Last modified: May 23, 2022

---

# Programatically block plugin updates

 *  Resolved [apedog](https://wordpress.org/support/users/apedog/)
 * (@apedog)
 * [4 years ago](https://wordpress.org/support/topic/programatically-block-plugin-updates/)
 * Is there a hook/filter that allows blocking a specific plugin updating?
    Also,
   are there hooks/filters for enabling/disabling auto-updates per plugin?

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Support [vupdraft](https://wordpress.org/support/users/vupdraft/)
 * (@vupdraft)
 * [4 years ago](https://wordpress.org/support/topic/programatically-block-plugin-updates/#post-15673785)
 * The plugin is designed so that you should not need to add hooks/filters.
    You
   can do both of these actions through the EUM interface.
 *  Thread Starter [apedog](https://wordpress.org/support/users/apedog/)
 * (@apedog)
 * [4 years ago](https://wordpress.org/support/topic/programatically-block-plugin-updates/#post-15673824)
 * I think I understand the idea that EUM is essentially a dashboard interface only–
   and not a programming API. My use case: EUM offers complete update blocking, 
   that I need to “lock” for specific plugins on a client’s site (that uses EUM).
   Can this be achieved programmatically?
 *  Plugin Contributor [Ronald Huereca](https://wordpress.org/support/users/ronalfy/)
 * (@ronalfy)
 * [4 years ago](https://wordpress.org/support/topic/programatically-block-plugin-updates/#post-15674579)
 * [@apedog](https://wordpress.org/support/users/apedog/)
 * This is a long article, but I have a few examples of programmatically preventing
   automatic updates for a plugin.
 *  [https://mediaron.com/wordpress-automatic-updates-what-they-are-what-they-do/](https://mediaron.com/wordpress-automatic-updates-what-they-are-what-they-do/)
 *  Plugin Support [vupdraft](https://wordpress.org/support/users/vupdraft/)
 * (@vupdraft)
 * [4 years ago](https://wordpress.org/support/topic/programatically-block-plugin-updates/#post-15676489)
 * If you download and unpack the plugin and look in the Includes file,
    you should
   see the MPSUM_Disable_Updates_Plugins.php file. The filter used to disable plugin
   updates is auto_update_plugin. To disable the plugin updates use: add_filter(‘
   auto_update_plugin’, ‘__return_false’);
 *  Thread Starter [apedog](https://wordpress.org/support/users/apedog/)
 * (@apedog)
 * [4 years ago](https://wordpress.org/support/topic/programatically-block-plugin-updates/#post-15679283)
 * [@ronalfy](https://wordpress.org/support/users/ronalfy/)
    Thank you for that 
   link. Very comprehensive. I sort of knew the general idea of it, but it’s nice
   to have all the hooks explained in one spot. And in such depth. It was a good
   read. I didn’t know EUM does not use core’s auto-updates. I thought EUM would
   delegate a lot of the functionality to WP core, once auto-updates were introduced
   to core.
 * [@vupdraft](https://wordpress.org/support/users/vupdraft/)
    Thank you for the
   reply. The hook `auto_update_plugin` blocks auto-updates. I’m actually wanting
   to manipulate the “Block” option. The option that completely prevents updates–
   manual updates as well. As far as I can tell, this option is not available through
   WP core’s auto-updates – only through EUM plugin. I started using EUM before 
   auto-updates were introduced to WordPress. And I like the email notifications
   and logging of EUM better than what core provides so I’m not looking to switch
   to core. I only wish to disable manual “block/unblock” on select plugins (to 
   prevent any admin accidentally ublocking-and-then-manually-updating through the
   dashboard UI).
 *  [Anthonius Alfred Andreas](https://wordpress.org/support/users/anthoniusalfred/)
 * (@anthoniusalfred)
 * [4 years ago](https://wordpress.org/support/topic/programatically-block-plugin-updates/#post-15684210)
 * Hi [@apedog](https://wordpress.org/support/users/apedog/)
 * In the premium version of EUM, there’s a feature named `Exclude Users` ([https://easyupdatesmanager.com/knowledge-base/exclude-users/](https://easyupdatesmanager.com/knowledge-base/exclude-users/)).
   With that feature you can prevent any other admins from accessing EUM on WP dashboard
   and doing something to the EUM settings. It’s very useful if you’d like to disable
   all kind of updates via the EUM settings page but don’t want other admins to 
   accidentally revert them back. You may notice that when you `Enable auto updates`
   to all updates settings on EUM, the manual update can still be performed by any
   users through the WP dashboard (Updates page, Plugins page and Themes page) as
   long as they have capabilities. This can’t be prevented by using the `Exclude
   Users` feature unless you combine the feature with a plugin that allows you to
   change the default user roles and capabilities, but that means it’s going to 
   prevent some users from manually updating all plugins not just plugins they’re
   not allowed to do.
 * Thanks
    Anthon
 *  Thread Starter [apedog](https://wordpress.org/support/users/apedog/)
 * (@apedog)
 * [4 years ago](https://wordpress.org/support/topic/programatically-block-plugin-updates/#post-15685310)
 * [@anthoniusalfred](https://wordpress.org/support/users/anthoniusalfred/)
 * > the manual update can still be performed by any users through the WP dashboard(
   > Updates page, Plugins page and Themes page) as long as they have capabilities.
 * This is specifically what I use EUM for – to block the manual update option. 
   Not per user, but per plugin. But I do understand that EUM is mainly a dashboard/
   UI. So maybe a programmatic solution is outside of this.
 * Thanks all for the info and time.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Programatically block plugin updates’ is closed to new replies.

 * ![](https://ps.w.org/stops-core-theme-and-plugin-updates/assets/icon-256x256.
   png?rev=1896941)
 * [Easy Updates Manager](https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/stops-core-theme-and-plugin-updates/)
 * [Active Topics](https://wordpress.org/support/plugin/stops-core-theme-and-plugin-updates/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/stops-core-theme-and-plugin-updates/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/stops-core-theme-and-plugin-updates/reviews/)

 * 7 replies
 * 4 participants
 * Last reply from: [apedog](https://wordpress.org/support/users/apedog/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/programatically-block-plugin-updates/#post-15685310)
 * Status: resolved