- An order has many license keys (each license is a record in
{db_prefix}_software_licenses
table) - License key has many activations (each activation is a record in
{db_prefix}__software_activations
)
License key is generated when an order containing software product is completed. Buyer receives the license key in order-complete email.
Merchant can add license key of existing order via edit order screen by clicking Add License Key button. Merchant needs to resend completed order email action so the buyer knows about the new license key.
It can also generated programmatically via generate_key
request. The last option would be import CSV file.
GET http://example.com/?wc-api=software-api
With required parameters (passed as query string):
Field | Description |
---|---|
request | Valid value is activation |
Email in license property (not necessarily the same with email in the order) | |
license key | The license key |
product_id | Software Product ID associated with license |
Additional parameters:
Field | Description |
---|---|
instance | Pass it to activate existing activation. If empty, new activation record will be created. When empty, its value will be current timestamp. Please note instance is not guaranteed to be unique as the column doesn't have unique constraint. |
platform | Free. Up to the user |
secret_key | Not really used internally. Same value is sent back in the response. |
Same signature as activation request. But request
is deactivation. When instance
is not passed, it'll deactivate all "active" activations. Otherwise it only deactivate activations with passed instance
.