EDD Licence expired

  //licence is expired start here

if ($response_body[‘license’] == ‘invalid’){
if(isset($response_body[‘error’])){
if($response_body[‘error’] == ‘expired’){
update_option( ‘WCGAAW_LICENSE_STATUS’,‘expired’);
return true;
}
if($response_body[‘error’] == ‘no_activations_left’){
$expiredDate = strtotime(date(‘d-m-Y’, strtotime($response_body[‘expires’])));
$todayDate = strtotime(date(‘d-m-Y’));
if($expiredDate < $todayDate){
update_option( ‘WCGAAW_LICENSE_STATUS’,‘expired’);
return true;
}
}
}
}

Leave a Comment

Your email address will not be published. Required fields are marked *