• Resolved deshmukh45

    (@deshmukh45)


    Hai, I Implemented the plugin and it’s working well, Thank You for that.
    The issue now I’m facing is, if I’m a customer and I bought the license key with the product and I need to check it still exits (expiration date) or not in the front end.

    Like there should be one text bar, if a customer enters the key in the field it should show if is valid or not.

    • This topic was modified 3 years, 8 months ago by deshmukh45.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @deshmukh45

    thank you for your message and for using my plugin.

    I’m not sure what you mean, because my plugin does not offer any interface for users to enter their license keys and check their status. It can be implemented via methods and/or the REST API, but this is definitely something a developer would have to take a swing at.

    Let me know if this answered your question.

    Thread Starter deshmukh45

    (@deshmukh45)

    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "{{host}}/wp-json/lmfwc/v2/licenses/<text box data>?consumer_key={{consumer_key}}&consumer_secret={{consumer_secret}}",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 0,
      CURLOPT_FOLLOWLOCATION => false,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    ?>

    in this code in eed this exact function should done where there will be a text box if i enterd that licence key and hit the submit, it should give the status of the key in JSON

    https://pasteboard.co/K65kOBf.png
    In this image if i add licence code in the txt box it will quirey through api.

    and i need this part to be present in my account page below the license button.

    can you please help me with this.

    @deshmukh45

    I’m sorry but I really don’t have the free time to do this for you. You might want to consider hiring a PHP/WooCommerce developer.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Verify the License Key’ is closed to new replies.