WordPress filter hook
auto_update_plugin
Fired by 19 WordPress plugins, running on 7.2M+ sites between them.
“This filter is documented in wp-admin/includes/class-wp-automatic-updater.php”
How to use auto_update_plugin
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'auto_update_plugin', function( $default, $item ) {
// Change $default here.
return $default;
}, 10, 2 );Argument names come from MonsterInsights's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
19 plugins that fire auto_update_plugin
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Rank Math SEO4+ million installs
apply_filters_ref_array( 'auto_update_plugin', [ true, (object) [] ] )includes/class-helper.php:381 -
MonsterInsights2+ million installs
apply_filters( 'auto_update_plugin', $default, $item )lite/includes/admin/wp-site-health.php:377 -
Limit Login Attempts Security1+ million installs
apply_filters( 'auto_update_plugin', true, 10, 2 )core/Helpers.php:163 -
ExactMetrics200,000+ installs
apply_filters( 'auto_update_plugin', $default, $item )lite/includes/admin/wp-site-health.php:377 -
Japanized for WooCommerce10,000+ installs
apply_filters( 'auto_update_plugin', $update, $item )includes/class-jp4wc-security-checks.php:592 -
OpenStation1,000+ installs
apply_filters( 'auto_update_plugin', null, $filter_payload )apps/plugins/parts/updates.php:326 -
Ecommerce Fabrick1,000+ installs
apply_filters( 'auto_update_plugin', $in_list, $item )inc/helper.php:396 -
SiteSuperCharger300+ installs
apply_filters( 'auto_update_plugin', $update, $item )classes/class.ssc_supercharger.php:20835 -
Bastora Security Audit60+ installs
apply_filters( 'auto_update_plugin', in_array( $datei, $liste, true ), $item )includes/class-scanner.php:1689 -
Health Monitor40+ installs
apply_filters( 'auto_update_plugin', false, null )includes/class-check-background-updates.php:102 -
Barcode Man for WooCommerce10+ installs
apply_filters( 'auto_update_plugin', $decision, $item )includes/class-bcm-auto-update-gate.php:252 -
UTS Sites Simple Update ManagerFewer than 10 installs
apply_filters( 'auto_update_plugin', null, $item )includes/class-settings.php:680 -
UpdateGuardFewer than 10 installs
apply_filters( 'auto_update_plugin', false, $item )admin/options.php:587 -
BadgerScanFewer than 10 installs
apply_filters( 'auto_update_plugin', $opted_in, $item )badgerscan.php:577 -
Baza HelperFewer than 10 installs
apply_filters( 'auto_update_plugin', true, (object) array( 'plugin' => $basename, 'slug' => 'baza-helper' ) )includes/admin/updates-guard.php:110 -
AiProfile InsideFewer than 10 installs
apply_filters( 'auto_update_plugin', null, $item )includes/admin.php:731 -
AudiScale ConnectorFewer than 10 installs
apply_filters( 'auto_update_plugin', $opted_in, audiscale_self_update_item() )includes/operations-self-update.php:79 -
Motqan ConnectorFewer than 10 installs
apply_filters( 'auto_update_plugin', $on, (object) ['plugin' => $file, 'slug' => 'motqan-connector'] )includes/rest.php:1738 -
Cartsnag Checkout Monitor for CulpritlyFewer than 10 installs
apply_filters( 'auto_update_plugin', $enabled, $item )includes/class-culpritly-snapshot.php:188
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.