WordPress filter hook · part of WordPress core

upgrader_pre_download

A WordPress core filter that 37 plugins also fire themselves, running on 9.6M+ sites between them.

“Filters whether to return the package.”

How to use upgrader_pre_download

It's a filter: your callback receives the value and 3 more arguments, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'upgrader_pre_download', function( $value, $package, $object, $hook_extra ) {
	// Change $value here.
	return $value;
}, 10, 4 );

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

This hook is fired by WordPress core too. Official reference on developer.wordpress.org →

37 plugins that fire upgrader_pre_download

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

  1. WPForms icon WPForms5+ million installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) src/Helpers/PluginSilentUpgrader.php:300
  2. MonsterInsights icon MonsterInsights2+ million installs apply_filters( 'upgrader_pre_download', false, $package, $this ) includes/admin/licensing/plugin-upgrader-legacy.php:297
  3. Smash Balloon Social Photo Feed icon Smash Balloon Social Photo Feed1+ million installs apply_filters( 'upgrader_pre_download', false, $package, $this ) inc/admin/PluginSilentUpgrader.php:264
  4. WP Mail Logging icon WP Mail Logging300,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) src/inc/Helpers/PluginSilentUpgrader.php:290
  5. ExactMetrics icon ExactMetrics200,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this ) includes/admin/licensing/plugin-upgrader-legacy.php:297
  6. UserFeedback icon UserFeedback200,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this ) includes/admin/licensing/plugin-upgrader.php:288
  7. Smash Balloon Social Post Feed icon Smash Balloon Social Post Feed100,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this ) inc/Helpers/PluginSilentUpgrader.php:296
  8. Custom Twitter Feeds icon Custom Twitter Feeds100,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this ) inc/Admin/PluginSilentUpgrader.php:291
  9. Feeds for YouTube (YouTube video, channel, and gallery plugin) icon Feeds for YouTube (YouTube video, channel, and gallery plugin)100,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this ) inc/PluginSilentUpgrader.php:291
  10. ProfilePress icon ProfilePress100,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) src/Classes/Installer/PluginSilentUpgrader.php:291
  11. Reviews Feed icon Reviews Feed100,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this ) class/Common/Helpers/PluginSilentUpgrader.php:296
  12. LoginWP (Formerly Peter’s Login Redirect) icon LoginWP (Formerly Peter’s Login Redirect)80,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) src/core/src/Admin/Installer/PluginSilentUpgrader.php:291
  13. kk Star Ratings icon kk Star Ratings70,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) lib/Installer/KKStar_PluginSilentUpgrader.php:285
  14. Feeds for TikTok (TikTok feed, video, and gallery plugin) icon Feeds for TikTok (TikTok feed, video, and gallery plugin)70,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this ) inc/Common/Helpers/PluginSilentUpgrader.php:303
  15. Easy Digital Downloads icon Easy Digital Downloads40,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) src/Admin/Installers/PluginSilentUpgrader.php:294
  16. Popup Box icon Popup Box40,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) includes/admin/class-ays-pb-upgrader.php:287
  17. Secure Copy Content Protection and Content Locking icon Secure Copy Content Protection and Content Locking20,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) includes/admin/class-secure-copy-content-protection-upgrader.php:287
  18. Uncanny Toolkit for LearnDash icon Uncanny Toolkit for LearnDash20,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) src/uncanny-one-click-installer/includes/PluginSilentUpgrader.php:280
  19. Quiz Maker by AYS icon Quiz Maker by AYS20,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) includes/admin/class-quiz-maker-upgrader.php:287
  20. Change Mail Sender icon Change Mail Sender20,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) src/Helpers/PluginSilentUpgrader.php:286
  21. FunnelKit Automations icon FunnelKit Automations20,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) includes/plugin_helpers/class-bwfan-plugin-silent-upgrader.php:286
  22. MailOptin icon MailOptin10,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) src/core/src/Admin/Installer/PluginSilentUpgrader.php:291
  23. PushEngage icon PushEngage8,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) app/Utils/PluginUpgraderSilent.php:313
  24. Registrations for the Events Calendar icon Registrations for the Events Calendar7,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) includes/helpers/PluginSilentUpgrader.php:293
  25. Poll Maker by AYS icon Poll Maker by AYS6,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) includes/admin/class-poll-maker-upgrader.php:287
  26. Chartify icon Chartify3,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) includes/admin/class-chart-builder-upgrader.php:287
  27. Admin Bar & Dashboard Access Control icon Admin Bar & Dashboard Access Control3,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) fuse/Installer/PluginSilentUpgrader.php:285
  28. Photo Gallery by Ays icon Photo Gallery by Ays1,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) includes/admin/class-gallery-photo-gallery-upgrader.php:287
  29. Pie Register icon Pie Register1,000+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) classes/admin/PieRegPluginSilentUpgrader.php:277
  30. AI ChatBot with ChatGPT and Content Generator by AYS icon AI ChatBot with ChatGPT and Content Generator by AYS300+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) includes/admin/class-chatgpt-assistant-upgrader.php:287
  31. Advanced Related Posts icon Advanced Related Posts300+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) includes/admin/class-advanced-related-posts-upgrader.php:287
  32. Easy Form icon Easy Form100+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) includes/admin/class-ays-form-maker-upgrader.php:293
  33. RewardsWP icon RewardsWP100+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) src/Pluggable/PluginSilentUpgrader.php:301
  34. FAQ Builder AYS icon FAQ Builder AYS100+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) includes/admin/class-faq-builder-upgrader.php:287
  35. Pie Forms icon Pie Forms80+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) includes/core/helper/plugin-silent-upgrader.php:277
  36. Personal Dictionary icon Personal Dictionary70+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) includes/admin/class-personal-dictionary-upgrader.php:287
  37. Fox LMS icon Fox LMS60+ installs apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ) includes/admin/class-fox-lms-upgrader.php:287

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.