• Resolved apedog

    (@apedog)


    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

    (@vupdraft)

    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

    (@apedog)

    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

    (@ronalfy)

    @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/

    Plugin Support vupdraft

    (@vupdraft)

    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

    (@apedog)

    @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
    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).

    Hi @apedog

    In the premium version of EUM, there’s a feature named 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

    (@apedog)

    @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.