upgrader_overwrote_package action-hook . WP 5.5.0
Fires when the upgrader has successfully overwritten a currently installed plugin or theme with an uploaded zip package.
Usage
add_action( 'upgrader_overwrote_package', 'action_function_name_4250', 10, 3 ); function action_function_name_4250( $package, $new_theme_data, $package_type ){ // action... }
- $package(string)
- The package file.
- $new_theme_data(array)
- The new 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-theme-upgrader.php 283
do_action( 'upgrader_overwrote_package', $package, $this->new_theme_data, 'theme' );
wp-admin/includes/class-plugin-upgrader.php 169
do_action( 'upgrader_overwrote_package', $package, $this->new_plugin_data, 'plugin' );