[wp-trac] [WordPress Trac] #50849: Incorrect action passed to hooks when updating plugin/theme by uploading ZIP file

WordPress Trac noreply at wordpress.org
Tue Aug 4 20:03:55 UTC 2020


#50849: Incorrect action passed to hooks when updating plugin/theme by uploading
ZIP file
-----------------------------+---------------------
 Reporter:  desrosj          |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  5.5.1
Component:  Upgrade/Install  |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+---------------------
Changes (by desrosj):

 * milestone:  Awaiting Review => 5.5.1


Comment:

 It seems the `upgrader_process_complete` hook is run twice: once when the
 zip file is uploaded, and again when the actual overwrite takes place
 after clicking the proceed button.

 [attachment:"50849.diff"] is fixing the second but not the first. I think,
 ideally, the hook should not fire when uploading a file to update a plugin
 or theme as the process is no actually complete.

 If the decision is to continue firing it in both spots, then `$hook_extra`
 should pass along more information as to where the process is at.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50849#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list