There’s two thing that relates to this concern.
- The
upgrader_process_complete
action doesn’t fire when the updater is running in bulk mode, aka multiple plugin updates.
ref: https://core.trac.wordpress.org/browser/tags/6.0/src/wp-admin/includes/class-wp-upgrader.php#L826
// @see https://core.trac.wordpress.org/browser/tags/6.0/src/wp-admin/includes/class-wp-upgrader.php#L826
// @line 826 - 841.
if ( ! $options['is_multi'] ) {
do_action( 'upgrader_process_complete', $this, $options['hook_extra'] );
}
- The
wp_ajax_update_plugin
function, which is responsible for handing the ajax request performs the each plugin upgrade in bulk mode.
ref: https://core.trac.wordpress.org/browser/tags/6.0/src/wp-admin/includes/ajax-actions.php#L4547
// @see https://core.trac.wordpress.org/browser/tags/6.0/src/wp-admin/includes/ajax-actions.php#L4547
// Line 4545 - 4547.
$skin = new WP_Ajax_Upgrader_Skin();
$upgrader = new Plugin_Upgrader( $skin );
$result = $upgrader->bulk_upgrade( array( $plugin ) );