remove_action( 'upgrader_process_complete', 'wp_update_plugins'
);
remove_action( 'upgrader_process_complete', 'wp_update_themes'
);
// Next, plugins.
wp_update_plugins(); // Check for plugin updates.
$plugin_updates =
get_site_transient( 'update_plugins'
);
if ( $plugin_updates && !
empty( $plugin_updates->response
) ) { foreach ( $plugin_updates->response
as $plugin ) { $this->
update( 'plugin',
$plugin );
} // Force refresh of plugin update information.
wp_clean_plugins_cache();
} // Next, those themes we all love.
wp_update_themes(); // Check for theme updates.
$theme_updates =
get_site_transient( 'update_themes'
);
if ( $theme_updates && !
empty( $theme_updates->response
) ) { foreach ( $theme_updates->response
as $theme ) { $this->
update( 'theme',
(object) $theme );
} // Force refresh of theme update information.
wp_clean_themes_cache();
}