Merge pull request #32953 from Pross/patch-1

Make sure variable is set in `system_status` endpoint.
This commit is contained in:
Jorge A. Torres 2022-05-19 17:43:56 +01:00 committed by GitHub
commit f64dc181fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -259,7 +259,7 @@ class WC_Admin_Status {
$update_theme_version = 0;
// Check .org for updates.
if ( is_object( $api ) && ! is_wp_error( $api ) ) {
if ( is_object( $api ) && ! is_wp_error( $api ) && isset( $api->version ) ) {
$update_theme_version = $api->version;
} elseif ( strstr( $theme->{'Author URI'}, 'woothemes' ) ) { // Check WooThemes Theme Version.
$theme_dir = substr( strtolower( str_replace( ' ', '', $theme->Name ) ), 0, 45 ); // @codingStandardsIgnoreLine.