diff --git a/wp-includes/update.php b/wp-includes/update.php index bf5d9b24d8..d9ee34c971 100644 --- a/wp-includes/update.php +++ b/wp-includes/update.php @@ -337,12 +337,6 @@ function wp_update_plugins( $extra_stats = array() ) { $current = new stdClass(); } - $updates = new stdClass(); - $updates->last_checked = time(); - $updates->response = array(); - $updates->translations = array(); - $updates->no_update = array(); - $doing_cron = wp_doing_cron(); // Check for update on a different schedule, depending on the page. @@ -371,8 +365,6 @@ function wp_update_plugins( $extra_stats = array() ) { $plugin_changed = false; foreach ( $plugins as $file => $p ) { - $updates->checked[ $file ] = $p['Version']; - if ( ! isset( $current->checked[ $file ] ) || (string) $current->checked[ $file ] !== (string) $p['Version'] ) { $plugin_changed = true; } @@ -461,6 +453,15 @@ function wp_update_plugins( $extra_stats = array() ) { return; } + $updates = new stdClass(); + $updates->last_checked = time(); + $updates->response = array(); + $updates->translations = array(); + $updates->no_update = array(); + foreach ( $plugins as $file => $p ) { + $updates->checked[ $file ] = $p['Version']; + } + $response = json_decode( wp_remote_retrieve_body( $raw_response ), true ); if ( $response && is_array( $response ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index a0043a8738..6b87219d60 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59925'; +$wp_version = '6.8-alpha-59926'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.