WordPress at a glance
filter is not described

upgrader_package_options filter-hook . WP 4.3.0

Filters the package options before running an update.

See also 'upgrader_process_complete'.


add_filter( 'upgrader_package_options', 'filter_function_name_7684' );
function filter_function_name_7684( $options ){
	// filter...

	return $options;

Options used by the upgrader.

  • $package (string)
    Package for update.

  • $destination (string)
    Update location.

  • $clear_destination (true/false)
    Clear the destination resource.

  • $clear_working (true/false)
    Clear the working resource.

  • $abort_if_destination_exists (true/false)
    Abort if the Destination directory exists.

  • $is_multi (true/false)
    Whether the upgrader is running multiple times.

  • $hook_extra (array)
    Extra hook arguments.

    • $action (string)
      Type of action.
      Default: 'update'

    • $type (string)
      Type of update process. Accepts 'plugin', 'theme', or 'core'.

    • $bulk (true/false)
      Whether the update process is a bulk update.
      Default: true

    • $plugin (string)
      Path to the plugin file relative to the plugins directory.

    • $theme (string)
      The stylesheet or template name of the theme.

    • $language_update_type (string)
      The language pack update type. Accepts 'plugin', 'theme', or 'core'.

    • $language_update (object)
      The language pack update offer.


Since 4.3.0 Introduced.

Where the hook is called

wp-admin/includes/class-wp-upgrader.php 703
$options = apply_filters( 'upgrader_package_options', $options );

Where the hook is used (in WP core)

Usage not found!