Skip to content

Commit

Permalink
Updated - decrease license check interval
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiIgna committed Jul 26, 2019
1 parent 4b886fe commit 9e72920
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ public function getLicense() {

if (in_array(wp_remote_retrieve_response_code($response), [200, 400])) {
$licenseData = json_decode(wp_remote_retrieve_body($response), true);
set_transient($this->slug . '-license-data', $licenseData, 24 * HOUR_IN_SECONDS);
set_transient($this->slug . '-license-data', $licenseData, 24 * WEEK_IN_SECONDS);
} else {
$licenseData = [
'error_code' => 'license_invalid',
'error_message' => 'Could not verify the License Key'
];
set_transient($this->slug . '-license-data', $licenseData, HOUR_IN_SECONDS);
set_transient($this->slug . '-license-data', $licenseData, DAY_IN_SECONDS);
}
}

Expand Down

0 comments on commit 9e72920

Please sign in to comment.