WordPress.org

Make WordPress Core

Opened 7 days ago

Last modified 4 days ago

#49686 assigned feature request

Add hook_extra parameter to upgrader_pre_download filter

Reported by: obliviousharmony Owned by: obliviousharmony
Milestone: Awaiting Review Priority: normal
Severity: minor Version: trunk
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!

Change History (2)

This ticket was mentioned in PR #198 on WordPress/wordpress-develop by ObliviousHarmony.


4 days ago

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 the plugin key to figure out which plugin is being updated.

Trac ticket: https://core.trac.wordpress.org/ticket/49686

#2 @obliviousharmony
4 days ago

  • Keywords has-patch added
  • Version set to trunk
Note: See TracTickets for help on using tickets.