WordPress.org

Make WordPress Core

Opened 2 months ago

Last modified 5 weeks ago

#49686 assigned feature request

Add hook_extra parameter to upgrader_pre_download filter

Reported by: obliviousharmony Owned by: obliviousharmony
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!

Change History (5)

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


2 months 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
2 months ago

  • Keywords has-patch added
  • Version set to trunk

#3 @SergeyBiryukov
2 months ago

  • Milestone changed from Awaiting Review to 5.5

This ticket was mentioned in Slack in #core by sergey. View the logs.


2 months ago

This ticket was mentioned in Slack in #core by obliviousharmony. View the logs.


5 weeks ago

Note: See TracTickets for help on using tickets.