[wp-trac] [WordPress Trac] #49686: Add hook_extra parameter to upgrader_pre_download filter

WordPress Trac noreply at wordpress.org
Mon Mar 23 23:08:15 UTC 2020


#49686: Add hook_extra parameter to upgrader_pre_download filter
------------------------------+------------------------------
 Reporter:  obliviousharmony  |      Owner:  obliviousharmony
     Type:  feature request   |     Status:  assigned
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Upgrade/Install   |    Version:
 Severity:  minor             |   Keywords:
  Focuses:                    |
------------------------------+------------------------------
 Hello,

 In trying to customize the `no_package` error for a plugin update, I came
 across the `upgrade_pre_download` filter as a really good fit. The only
 problem with this filter is that it does not contain any information
 except the path to the package (which is useless in my case as its an
 empty string) and the upgrader instance. It looks like most of the filters
 in the `WC_Upgrader` class are passed the `hook_extra` argument. I propose
 we add the parameter to the `upgrader_pre_download` filter, which does
 include a `plugin` key during upgrades!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49686>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list