30));
if(is_array($resp)){
$json = json_decode($resp['body'], true);
// print_r($json);
}else{
$spro_error['resp_invalid'] = __('The response was malformed
'.var_export($resp, true), 'softaculous-pro');
return softaculous_pro_license_T();
}
// Save the License
if(empty($json['license'])){
$spro_error['lic_invalid'] = __('The license key is invalid', 'softaculous-pro');
return softaculous_pro_license_T();
}else{
update_option('softaculous_pro_license', $json);
// Load license
softaculous_pro_load_license();
$GLOBALS['spl_saved'] = true;
}
}
softaculous_pro_license_T();
}
// The License Page
function softaculous_pro_license_T(){
global $softaculous_pro, $spro_error;
softaculous_pro_header(0);
// Saved ?
if(!empty($GLOBALS['spl_saved'])){
echo '
'. __('The license has been saved successfully', 'softaculous-pro'). '