Support » Plugin: License Manager for WooCommerce » Valid for & Expires at Values Can’t Use Both?

  • Resolved Marc Woodyard

    (@marcwoodyard)


    When a customer purchases a license key, one gets generated that’s valid for 365 days and expires 1 year from the purchase date. The valid for field is set to 365 and the expires at field is set to the date 1 year from the purchase date. But when I go in to edit the license key status, the valid for field gets reset and says that I can’t use both valid for and expires at fields at the same time. Is this normal?

    Also, would it be possible to implement a way for the user to view the status of the license key (active/inactive) and see the number of remaining activations?

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

    (@drazenbebic)

    Hello @marcwoodyard

    First question: Yes, that is normal. You can either set a period of time for which the license key is valid after purchase, or you can modify the expiration date directly, but not both.

    Second question: Yes, you could even implement that yourself. Simply override the template file which is used for the “myaccount” page. Here’s the link:

    https://plugins.trac.wordpress.org/browser/license-manager-for-woocommerce/trunk/templates/myaccount/lmfwc-view-license-keys.php

    Question 1:
    If the values are set when the license is generated, why would they be reset when the license is edited. In other words, why set both values if you can only use one.

    Question 2:
    What’s the difference between the status. Couldn’t it be simplified to just active and inactive?

    Active
    Inactive
    Sold
    Delivered

    Question 3:
    Is there a way to reset a license key’s activation (reset it to zero) in the admin dashboard without having to do it through the API?

    Plugin Author Drazen Bebic

    (@drazenbebic)

    Question 1:
    If the values are set when the license is generated, why would they be reset when the license is edited. In other words, why set both values if you can only use one.

    A license key can either have a “Valid for (number of days)” or “Expires at” defined, not both. This is because you either have a fixed expiration date for a license key, or you want them to expire after purchase after a certain period of time has passed.

    When adding/editing a license key, you can only define one of these fields. The “Valid for (number of days)” gets converted to the “Expires at” after purchase. Having both fields defined does do anything.

    Question 2:
    What’s the difference between the status. Couldn’t it be simplified to just active and inactive?

    Active
    Inactive
    Sold
    Delivered

    ACTIVE – License is available for sale.
    INACTIVE – License is not available for sale.
    SOLD – License has been sold, but not delivered.
    DELIVERED – License has been sold and delivered.

    Question 3:
    Is there a way to reset a license key’s activation (reset it to zero) in the admin dashboard without having to do it through the API?

    No, there isn’t. But this is an interesting feature idea, I will add it to the backlog.

    Let me know if I can help with anything else.

    Marc Woodyard

    (@marcwoodyard)

    Thanks for the help Drazen!

    Plugin Author Drazen Bebic

    (@drazenbebic)

    @marcwoodyard

    No problem, let me know if you need anything else 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.