upgrader_overwrote_package
Fires when the upgrader has successfully overwritten a currently installed plugin or theme with an uploaded zip package.
Usage
add_action( 'upgrader_overwrote_package', 'wp_kama_upgrader_overwrote_package_action', 10, 3 ); /** * Function for `upgrader_overwrote_package` action-hook. * * @param string $package The package file. * @param array $data The new plugin or theme data. * @param string $package_type The package type ('plugin' or 'theme'). * * @return void */ function wp_kama_upgrader_overwrote_package_action( $package, $data, $package_type ){ // action... }
- $package(string)
- The package file.
- $data(array)
- The new plugin or theme data.
- $package_type(string)
- The package type ('plugin' or 'theme').
Changelog
Since 5.5.0 | Introduced. |
Where the hook is called
upgrader_overwrote_package
upgrader_overwrote_package
wp-admin/includes/class-plugin-upgrader.php 169
do_action( 'upgrader_overwrote_package', $package, $this->new_plugin_data, 'plugin' );
wp-admin/includes/class-theme-upgrader.php 274
do_action( 'upgrader_overwrote_package', $package, $this->new_theme_data, 'theme' );