WordPress action hook

wp_update_plugins

Fired by 11 WordPress plugins, running on 820K+ sites between them.

How to use wp_update_plugins

It's an action: your callback runs at that point. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'wp_update_plugins', function() {
	// Your code runs here.
}, 10, 1 );

Argument names come from SiteGuard WP Plugin's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

11 plugins that fire wp_update_plugins

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. SiteGuard WP Plugin icon SiteGuard WP Plugin600,000+ installs do_action( 'wp_update_plugins' ) classes/siteguard-updates-notify.php:161
  2. CloudSecure WP Security icon CloudSecure WP Security200,000+ installs do_action( 'wp_update_plugins' ) modules/update-notice.php:287
  3. WP Updates Notifier icon WP Updates Notifier20,000+ installs do_action( 'wp_update_plugins' ) includes/class-update-checker.php:630
  4. WatchTowerHQ icon WatchTowerHQ100+ installs do_action( 'wp_update_plugins' ) src/Plugin.php:42
  5. Easy Update Notifier icon Easy Update Notifier60+ installs do_action( 'wp_update_plugins' ) update-tracker.php:151
  6. MySitesManager Updates Checker icon MySitesManager Updates Checker10+ installs do_action( 'wp_update_plugins' ) mysitesmanager-updates-checker.php:278
  7. Anexia Monitoring icon Anexia Monitoring10+ installs do_action( 'wp_update_plugins' ) modules/VersionMonitoring.php:64
  8. Presscheck icon Presscheck10+ installs do_action( 'wp_update_plugins' ) FQpresscheck.php:87
  9. WP Network Stats icon WP Network Stats10+ installs do_action( 'wp_update_plugins' ) includes/class-plugin-helper.php:635
  10. XML-RPC Update Check icon XML-RPC Update Check10+ installs do_action( 'wp_update_plugins' ) xmlrpc-update-check.php:24
  11. FreelanceBo Sentra Control icon FreelanceBo Sentra ControlFewer than 10 installs do_action( 'wp_update_plugins' ) includes/modules/class-sentra-auto-patcher.php:266

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.