feat: update version to 1.9.4 and enhance license validation handling
All checks were successful
Build & Release Plugin / release (push) Successful in 20s

This commit is contained in:
2026-02-01 03:55:36 +00:00
parent 4a789363c5
commit ec08c79aab
3 changed files with 63 additions and 10 deletions

View File

@@ -273,14 +273,26 @@ class SitiWebUpdater2 {
return new WP_Error( 'verification_failed', 'Onverwacht antwoord van licentieserver.' );
}
$has_license_payload = isset( $body['license'] ) || isset( $body['pluginVersion'] ) || isset( $body['version'] );
if ( 200 !== $code ) {
if ( $has_license_payload ) {
$this->store_license_data( $body );
} else {
$this->clear_cached_license_data();
}
$error_message = isset( $body['error'] ) ? $body['error'] : 'Licentie verificatie mislukt.';
$this->clear_cached_license_data();
return new WP_Error( 'verification_failed', $error_message );
}
if ( empty( $body['valid'] ) ) {
$this->clear_cached_license_data();
if ( $has_license_payload ) {
$this->store_license_data( $body );
} else {
$this->clear_cached_license_data();
}
return new WP_Error( 'invalid_license', 'Licentie is ongeldig.' );
}