Support » Plugin: Software License Manager » Small feature request. LIcence Status via API

  • Resolved vovarpd

    (@vovarpd)


    Hi.
    Thanks for this great plugin.

    My request is very simple.

    I see lic_status is hard-coded to “pending” in includes/slm_api_listener.php.
    I propose add ability to set lic_status via API.

    Code change (slm_api_listener.php, line 46) like this:

                //$fields['lic_status'] = 'pending';
    	    $fields['lic_status'] = isset( $_REQUEST['lic_status'] ) ? wp_unslash( strip_tags( $_REQUEST['lic_status'] ) ) : 'pending';
    

    So, we can pass it with api_params like this:

    
    	$api_params = [
    		'slm_action'          => 'slm_create_new',
    		'secret_key'          => '',
    		'first_name'          => '',
    		'last_name'           => '',
    		'email'               => '',
    		'company_name'        => '',
    		'txn_id'              => '',
    		'max_allowed_domains' => '1',
    		'lic_status'      => 'active',
    		'date_created'        => date( 'Y-m-d' ),
    		'product_ref'	      =>'',
    	];
    

    Thanks.

    • This topic was modified 2 years, 4 months ago by vovarpd.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Small feature request. LIcence Status via API’ is closed to new replies.