# upgrader_process_complete

URL: https://chugunov.pro/api-wordpress/actions/upgrader_process_complete/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: хук-действие.
Появился в версии: 3.6.0.

## Сигнатура

```php
do_action( 'upgrader_process_complete', WP_Upgrader $upgrader, array $hook_extra )
```

## Описание

См. также 'upgrader_package_options'.

## Параметры

- `$upgrader` `WP_Upgrader` — обязательный. Экземпляр WP_Upgrader. В других контекстах это может быть экземпляр Theme_Upgrader, Plugin_Upgrader, Core_Upgrade или Language_Pack_Upgrader.
- `$hook_extra` `array` — обязательный. Array of bulk item update data.
  
  - `action` string Type of action. Default `'update'`.
  
  - `type` string Type of update process. Accepts `'plugin'`, `'theme'`, `'translation'`, or `'core'`.
  
  - `bulk` bool Whether the update process is a bulk update. Default true.
  
  - `plugins` array Array of the basename paths of the plugins’ main files.
  
  - `themes` array The theme slugs.
  
  - `translations` array Array of translations update data.
  
  - `language` string The locale the translation is for.
  
  - `type` string Type of translation. Accepts `'plugin'`, `'theme'`, or `'core'`.
  
  - `slug` string Text domain the translation is for. The slug of a theme/plugin or `'default'` for core translations.
  
  - `version` string The version of a theme, plugin, or core.
  
  [More Information](#more-information)
  The `upgrader_process_complete` action hook is run when the download process for a plugin install or update finishes.
  
  Use with caution: When you use the `upgrader_process_complete` action hook in your plugin and your plugin is the one which under upgrade, then this action will run the old version of your plugin.
  
  [Source](#source)
  
  ```
  do_action( 'upgrader_process_complete', $this, $options['hook_extra'] );
  ```
  
  [View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-wp-upgrader.php/) [View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/class-wp-upgrader.php#L988) [View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/class-wp-upgrader.php#L988-L988)
  
  [Related](#related) Used by | Description |
  [Core_Upgrader::upgrade()](https://developer.wordpress.org/reference/classes/core_upgrader/upgrade/)`wp-admin/includes/class-core-upgrader.php` | Upgrades WordPress core.
  |
  [Language_Pack_Upgrader::bulk_upgrade()](https://developer.wordpress.org/reference/classes/language_pack_upgrader/bulk_upgrade/)`wp-admin/includes/class-language-pack-upgrader.php` | Upgrades several language packs at once.
  |
  [Plugin_Upgrader::bulk_upgrade()](https://developer.wordpress.org/reference/classes/plugin_upgrader/bulk_upgrade/)`wp-admin/includes/class-plugin-upgrader.php` | Upgrades several plugins at once.
  |
  [Theme_Upgrader::bulk_upgrade()](https://developer.wordpress.org/reference/classes/theme_upgrader/bulk_upgrade/)`wp-admin/includes/class-theme-upgrader.php` | Upgrades several themes at once.
  |
  [WP_Upgrader::run()](https://developer.wordpress.org/reference/classes/wp_upgrader/run/)`wp-admin/includes/class-wp-upgrader.php` | Runs an upgrade/installation.
  |
  
  [Changelog](#changelog) Version | Description |
  [4.6.0](https://developer.wordpress.org/reference/since/4.6.0/) | `$translations` was added as a possible argument to `$hook_extra`. |
  [3.7.0](https://developer.wordpress.org/reference/since/3.7.0/) | Added to [WP_Upgrader::run()](https://developer.wordpress.org/reference/classes/wp_upgrader/run/). |
  [3.6.0](https://developer.wordpress.org/reference/since/3.6.0/) | Introduced. |
  
  [User Contributed Notes](#user-contributed-notes)
  -
  
  [Skip to note 5 content](#comment-content-4371)
  
  [Steven Lin](https://profiles.wordpress.org/stevenlinx/)
  [
  
  6 years ago
  ](https://developer.wordpress.org/reference/hooks/upgrader_process_complete/#comment-4371)
  
  [You must log in to vote on the helpfulness of this note ](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fupgrader_process_complete%2F%23comment-4371)Vote results for this note: 1 [You must log in to vote on the helpfulness of this note ](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fupgrader_process_complete%2F%23comment-4371)
  
  Example migrated from Codex:
  
  Do stuff if the current plug-in is being updated.
  
  ```
  add_action( 'upgrader_process_complete', 'my_upgrade_function',10, 2);
  
  function my_upgrade_function( $upgrader_object, $options ) {
  $current_plugin_path_name = plugin_basename( __FILE__ );
  
  if ($options['action'] == 'update' && $options['type'] == 'plugin' ) {
  foreach($options['plugins'] as $each_plugin) {
  if ($each_plugin==$current_plugin_path_name) {
  // .......................... YOUR CODES .............
  
  }
  }
  }
  }
  ```
  
  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fupgrader_process_complete%2F%3Freplytocom%3D4371%23feedback-editor-4371)
  
  -
  
  [Skip to note 6 content](#comment-content-4372)
  
  [Steven Lin](https://profiles.wordpress.org/stevenlinx/)
  [
  
  6 years ago
  ](https://developer.wordpress.org/reference/hooks/upgrader_process_complete/#comment-4372)
  
  [You must log in to vote on the helpfulness of this note ](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fupgrader_process_complete%2F%23comment-4372)Vote results for this note: 1 [You must log in to vote on the helpfulness of this note ](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fupgrader_process_complete%2F%23comment-4372)
  
  Example migrated from Codex:
  
  This short plugin demonstrates how to display a notice to the user when they update the plugin. It displays a different notice when they first install the plugin:
  
  ```

## Исходный код

Файл: `wp-admin/includes/class-wp-upgrader.php:988`

```php
do_action( 'upgrader_process_complete', $this, $options['hook_extra'] );
```

## История изменений

- 4.6.0 — $translations was added as a possible argument to $hook_extra.
- 3.7.0 — Added to WP_Upgrader::run().
- 3.6.0 — Introduced.

## Связанные

Используется в: `Core_Upgrader::upgrade`, `Language_Pack_Upgrader::bulk_upgrade`, `Plugin_Upgrader::bulk_upgrade`, `Theme_Upgrader::bulk_upgrade`, `WP_Upgrader::run`.

Оригинал в официальной документации: https://developer.wordpress.org/reference/hooks/upgrader_process_complete/
