WordPress at a glance
filter is not described

upgrader_pre_install filter-hook . WP 2.8.0

Filters the install response before the installation has started.

Returning a truthy value, or one that could be evaluated as a WP_Error will effectively short-circuit the installation, returning that value instead.

Usage

add_filter( 'upgrader_pre_install', 'filter_function_name_4730', 10, 2 );
function filter_function_name_4730( $response, $hook_extra ){
	// filter...

	return $response;
}
$response(true/false/WP_Error)
Response.
$hook_extra(array)
Extra arguments passed to hooked filters.

Where the hook is called

WP_Upgrader::install_package()
wp-admin/includes/class-wp-upgrader.php 469
$res = apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] );

Where the hook is used (in WP core)

wp-admin/includes/class-theme-upgrader.php 266
add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2);
wp-admin/includes/class-theme-upgrader.php 287
remove_filter('upgrader_pre_install', array($this, 'current_before'));
wp-admin/includes/class-theme-upgrader.php 327
add_filter('upgrader_pre_install', array($this, 'current_before'), 10, 2);
wp-admin/includes/class-theme-upgrader.php 409
remove_filter('upgrader_pre_install', array($this, 'current_before'));
wp-admin/includes/class-plugin-upgrader.php 166
add_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade'), 10, 2);
wp-admin/includes/class-plugin-upgrader.php 188
remove_filter('upgrader_pre_install', array($this, 'deactivate_plugin_before_upgrade'));