• Hi,

    I am having trouble using lmfwc_get_license, it seems to be returning false all the time.

    $license_key = “OPG4-XI7Y-R7DF”;
    var_dump(lmfwc_get_license($license_key));

    returns bool(false)

    Some License Keys were manually created, some were purchased, returns false on both. Even if I activated the License key with and Admin account through the User Interface when editing the License Key.

    License Manager 2.2.0
    WordPress 5.5.1
    Woocommerce 4.4.1

    Thank you,
    Lehel

    • This topic was modified 4 years, 6 months ago by Lehel Mátyus.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @lehelm

    thank you for your message and for using my plugin.

    Now that is odd, that function should most definitely return the license key if it exists in the database.

    Can you find that license key when searching for it in the “Licenses” page?

    Closed due to inactivity.

    Thread Starter Lehel Mátyus

    (@lehelm)

    Hi @drazenbebic

    Thanks for your reply.

    Yes, I can see the item in the list on the Licenses page.

    When I call the following in my themes functions.php: var_dump(lmfwc_get_license(‘8TT6-OXG1-TI1Y-P1DR’));
    returns false.

    —-
    When I do the following query
    $query = array(
    ‘licenseKey’ => “LBRY-S-8TS6-OXG1-7IAY-O1DR”,
    )
    var_dump(lmfwc_get_licenses($query));

    returns false

    —-

    However if I do the following
    $query = array(
    ‘id’ => 1,
    );
    var_dump(lmfwc_get_licenses($query));

    does return the object.

    but the it looks like this
    protected ‘licenseKey’ => string ‘def5040056366d8c6f41c0caf16e2f73824404d3d03….
    protected ‘hash’ => string ’18e631d70fc55…

    ——-
    The API seems to work fine
    /wp-json/lmfwc/v2/licenses/8TT6-OXG1-TI1Y-P1DR?consumer_key=…

    is successful and does return the correct object with
    ‘licenseKey’:8TT6-OXG1-TI1Y-P1DR

    What am I missing here?
    Thank you very much for your help.

    Lehel

    @lehelm

    I’m trying to make sense of it, but it doesn’t make any sense to me… Are you using the latest plugin version (2.2.1)?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘lmfwc_activate_license always returns false’ is closed to new replies.