Support » Plugin: License Manager for WooCommerce » Possibility for user to activate license

  • Resolved supermotard45

    (@supermotard45)


    Hi, I need the user to be able to activate the license after purchase and so that the license expire period starts after user activation, not just when the product is purchased.
    Is it possibile?
    Thankyou

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Drazen Bebic

    (@drazenbebic)

    Hello @supermotard45,

    thank you for your message and for using my plugin.

    It is possible to activate the license key (after purchase of course). However, the “Expires at” field is set after the PURCHASE, not the ACTIVATION.

    The thought behind this is, that the license key cannot be activated after it has expired.

    However, what you’re describing is a license validity period, i.e. a set amount of time for which the license key is valid after activation, am I right?

    supermotard45

    (@supermotard45)

    My aim is to allow the user to decide when activate the license and start the validity time period.

    This because in my shop I sell physical products (not software) to my dealers with a warranty/registration code (license) and I want that they can activate the code only when they re-sell products to their customers.

    If you add this feature to your plugin you can promote it also as a warranty registration plugin not only for licenses.

    Plugin Author Drazen Bebic

    (@drazenbebic)

    @supermotard45

    Aha, I understand now!

    Well it makes a lot of sense, I just need to figure out how to best implement this into the plugin. I’ll add it to the backlog as a feature request. When the feature will be available I really cannot say.

    supermotard45

    (@supermotard45)

    I’m trying to customize the plugin myaccount-orders woocommerce integration files

    What can be a way to allow user to click on a button “activate license” in orders page?

    Plugin Author Drazen Bebic

    (@drazenbebic)

    @supermotard45

    You’d have to override the template which displays the license keys inside the “My account” page, then add a button there which triggers a specific function. You could make a form element and make use of the form:

    https://codex.wordpress.org/Plugin_API/Action_Reference/admin_post_(action)

    To actually activate the license key you can take a look at how I did it in the REST API controller:

    https://plugins.trac.wordpress.org/browser/license-manager-for-woocommerce/trunk/includes/api/v2/Licenses.php#L513

    I plan to add support for this feature natively, however it’s still in development and I have no idea when exactly it will be available.

    Let me know if you need further help with this.

    supermotard45

    (@supermotard45)

    Thankyou Drazen for your support

    I have already edited the plugin in order to allow user license activation in a similar way to what you suggested.

    I think it’s a cool feature for next plugin releases. Contact me when you will add it if you want some ideas I will appreciate.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Possibility for user to activate license’ is closed to new replies.