diff --git a/includes/SitiWebUpdater2.php b/includes/SitiWebUpdater2.php index b9cb708..d2b6f53 100644 --- a/includes/SitiWebUpdater2.php +++ b/includes/SitiWebUpdater2.php @@ -131,6 +131,8 @@ class SitiWebUpdater2 { $license_data['key'] = $this->get_license_key(); } + $license_data['licenseValid'] = ! empty( $body['valid'] ); + $version = null; if ( isset( $body['pluginVersion'] ) && $body['pluginVersion'] ) { $version = $body['pluginVersion']; @@ -303,7 +305,15 @@ class SitiWebUpdater2 { public function is_license_valid() { $data = $this->get_license_data(); - return ! empty( $data ) && ! empty( $data['key'] ); + if ( empty( $data ) || empty( $data['key'] ) ) { + return false; + } + + if ( isset( $data['licenseValid'] ) ) { + return (bool) $data['licenseValid']; + } + + return true; } public function get_latest_known_version() {