upgrader_process_complete WordPress Action Hook

The upgrader_process_complete hook is called when the upgrade process is complete. It is called after the upgrade is finished and before any post-upgrade cleanup is done.

do_action( 'upgrader_process_complete', WP_Upgrader $upgrader, array $hook_extra ) #

Fires when the upgrader process is complete.


Description

See also ‘upgrader_package_options’.


Top ↑

Parameters

$upgrader

(WP_Upgrader)WP_Upgrader instance. In other contexts this might be a Theme_Upgrader, Plugin_Upgrader, Core_Upgrade, or Language_Pack_Upgrader instance.

$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.


Top ↑

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.


Top ↑

Source

File: wp-admin/includes/class-wp-upgrader.php

View on Trac



Top ↑

Changelog

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

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.