1. Home
  2. Docs
  3. WooCommerce License Keys
  4. Subscriptions
  5. Via WooCommerce Subscriptions

Via WooCommerce Subscriptions

Only available with WooCommerce License Keys extended plugin.

You can opt to handle your license keys with subscriptions using the WooCommerce Subscriptions plugin. WooCommerce License Keys will integrate itself with the subscriptions plugin the moment both are activated.


How to configure a subscription?

WooCommerce Subscriptions will add a couple of new product types. WooCommerce License Keys only supports license keys on “Simple subscription”.

Check the “License Key” checkbox to enable license key functionality with the subscription and to show the “License Key” tab which will give you access the basic and extended properties.

WooCommerce Subscription licesen key settings

Notice that the “Expire” setting is not enabled for the subscription. This is because the expiration and most of the validity of the license key will be handled and set by WooCommerce Subscriptions.

For variable subscriptions, read this variable product’s article.


How will the API be affected?

Expiration will no longer be validated and handled by the API, instead, the will validate the status and the expiry of the subscription.

Validations and errors

Two new errors may be returned by the API in the response:

900: Subscription is not active.
Returned when no expiration date is found and the status of the subscription is not active.

901: Subscription has expired.
Returned when the subscription returns an expired expiration date.

Response data

Additional data will be returned in the response:

    "subscription_status": "pending-cancel",
    "Subscription_is_trial": false

subscription_status
string
The status slug obtained from the subscription.

subscription_is_trial
bool
Flag indicating if the subscription is trial.


Change on “My Account” pages?

Templates must be greater or equal to version 1.2.9 (regular version) and 1.4.0 (extended version).

License Keys page

The “Active” column will display the the subscription number and its status.

Single License Key page

The subscription details will be displayed.

Was this article helpful to you? Yes No