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

WordPress Trac noreply at wordpress.org
Mon Jul 7 17:59:40 UTC 2025


#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:  Future
                                                 |  Release
Component:  Upgrade/Install                      |     Version:  5.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-test-info has-unit-    |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by yashjawale):

 == Test Report
 === Description
 This report validates whether the indicated patch works as expected.
 Instructions followed from comment:23

 Patch tested: https://github.com/WordPress/wordpress-
 develop/pull/9104.diff

 === Environment
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.2.28
 - Server: nginx/1.27.5
 - Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
 - Browser: Firefox 140.0
 - OS: macOS
 - Theme: Twenty Twenty-One 2.5
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.0

 === Actual Results
 1.  ✅ Update/Downgrade actions are logged properly
 2.  ✅ Actions are logged once
 2.  ⚠️ {{{upgrader_process_complete}}} does not get triggered during first
 time install of plugin/theme (the action should get triggered even during
 install according to
 [https://developer.wordpress.org/reference/hooks/upgrader_process_complete/]
 )

 === Additional Notes
 - The plugin & theme were tested with version numbers {{{1.0.0}}} &
 {{{2.0.0}}}
 === Supplemental Artifacts
 Test Results:

 ==== Pre patch

 Theme install
 {{{
 Array
 (
     [type] => theme
     [action] => install
 )
 }}}

 Theme upgrade
 {{{
 Array
 (
     [type] => theme
     [action] => install
 )
 }}}

 Theme downgrade
 {{{
 Array
 (
     [type] => theme
     [action] => install
 )
 }}}

 Plugin install
 {{{
 Array
 (
     [type] => plugin
     [action] => install
 )
 }}}

 Plugin upgrade
 {{{
 Array
 (
     [type] => plugin
     [action] => install
 )
 }}}

 Plugin downgrade
 {{{
 Array
 (
     [type] => plugin
     [action] => install
 )
 }}}

 ==== Post patch

 Theme install
 {{{
 NO LOGS
 }}}

 Theme upgrade
 {{{
 Array
 (
     [type] => theme
     [action] => update
 )
 }}}

 Theme downgrade
 {{{
 Array
 (
     [type] => theme
     [action] => downgrade
 )
 }}}

 Plugin install
 {{{
 NO LOGS
 }}}

 Plugin upgrade
 {{{
 Array
 (
     [type] => plugin
     [action] => update
 )
 }}}

 Plugin downgrade
 {{{
 Array
 (
     [type] => plugin
     [action] => downgrade
 )
 }}}

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


More information about the wp-trac mailing list