Create License

Vew count: 306

you can create license under any action by calling method create_license under class class_license_manager_manage_license

 

$datetime = new DateTime();

$args['license_key'] = md5(time());
$args['license_status'] = 'active';
$args['domain_count'] = '10';
$args['domains_list'] = '';
$args['license_email'] = $user_email;
$args['user_id'] = $user_id;
$args['order_id'] = $order_id;
$args['product_id'] = $product_id;
$args['date_created'] = $datetime->format('Y-m-d');
$args['date_renewed'] = $datetime->format('Y-m-d');
$args['date_expiry'] = $datetime->format('Y-m-d');
$args['meta_data'] = array();
 
 
 
$create_license = $class_license_manager_manage_license->create_license($args);

Return:

On success:
array('status'=>'success', 'message'=>'License created.');

On Failed
array('status'=>'fail', 'message'=>'License create failed.');