#49686 closed feature request (fixed)
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 has-dev-note |
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!
Change History (19)
This ticket was mentioned in PR #198 on WordPress/wordpress-develop by ObliviousHarmony.
10 months ago
This ticket was mentioned in Slack in #core by sergey. View the logs.
10 months ago
This ticket was mentioned in Slack in #core by obliviousharmony. View the logs.
9 months ago
This ticket was mentioned in Slack in #core by david.baumwald. View the logs.
7 months ago
#7
@
7 months ago
@SergeyBiryukov IS this one still doable with Beta 1 landing in a few days? What else is needed to move this one forward?
#8
@
7 months ago
- Keywords needs-dev-note added
Since this changes the filter signature, marking this for a call out on the Misc Dev Note.
#9
@
6 months ago
- Owner changed from obliviousharmony to desrosj
- Status changed from assigned to reviewing
#10
@
6 months ago
- Keywords needs-refresh added
@obliviousharmony Thanks for this! I just reviewed the PR over on GitHub with some feedback.
#11
@
6 months ago
Thanks for the feedback! I've gone ahead and flattened the parameter. For future reference, when responding to a ticket after I've addressed feedback, would I want to remove the needs-refresh
keywork?
#12
@
6 months ago
ObliviousHarmony commented on PR #198:
Thanks for the feedback, I've flattened the array!
#13
@
6 months ago
- Keywords needs-refresh removed
Thanks! I'll take a look shortly and try to get this in for 5.5.
Ya, that works. There is currently no syncing for labels or anything between GitHub and Trac. I personally try to keep the Trac ticket updated to reflect the status of the ticket so there is less back and forth!
#16
@
6 months ago
ObliviousHarmony commented on PR #198:
Thanks for the feedback! I've gone ahead and flattened the parameter. No need to be so forward-looking :)
#17
@
6 months ago
ObliviousHarmony commented on PR #198:
Thanks for the feedback! I've gone ahead and flattened the parameter. No need to be so forward-looking :)
#19
@
6 months ago
- Keywords has-dev-note added; needs-dev-note removed
This received a call out in the Miscellaneous Developer Changes in 5.5 dev note: https://make.wordpress.org/core/2020/07/29/miscellaneous-developer-focused-changes-in-wordpress-5-5/.
This adds a parameter to the
upgrader_pre_download
filter 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 theplugin
key to figure out which plugin is being updated.Trac ticket: https://core.trac.wordpress.org/ticket/49686