Opened 3 months ago
Last modified 2 months ago
#49686 assigned feature request
Add hook_extra parameter to upgrader_pre_download filter
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 5.5 | Priority: | normal |
| Severity: | minor | Version: | 5.4 |
| Component: | Upgrade/Install | Keywords: | has-patch |
| Focuses: | Cc: |
Description
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!
This adds a parameter to the
upgrader_pre_downloadfilter that can be used to identify some information about the upgrade. The specific use-case this is being added for is so that we can use thepluginkey to figure out which plugin is being updated.Trac ticket: https://core.trac.wordpress.org/ticket/49686