Skip to content

Using WooCommerce custom fields

Use the WooCommerce Orders section and then Edit order to manage activations of a given order:

When the customer activates the compiled workbook EXE, the web application modifies the relevant WooCommerce order by adding a custom field named xlspadlock_activations:

The value of the xlspadlock_activations custom field contains a list of system IDs. These unique system IDs represent the computers on which the customer has activated the compiled workbook EXE. The system IDs are separated by the | character.

For instance, “CD78-4563-3F2B|HC78-1243-EF74” indicates that the compiled workbook EXE was activated on two different computers. If you configured the web application to allow 2 activations only, next time an error will be triggered (no more activations left).

You can manually clear existing activations by removing the corresponding system ID. But it is better to offer deactivation to your customers so that you do not have to deal with clearing system IDs yourself when customers want to transfer their license to new computers.

Custom Fields for License Expiration and Usage Management

Section titled “Custom Fields for License Expiration and Usage Management”

The server can manage expiration and usage limits to avoid local piracy. Here are the fields and how they work:

  • Server-Side Expiration Control: If `use_server_expiration` is enabled in config.ini, the server will automatically control license expiration to prevent local modification.
    • Maximum Days Expiration (`xlspadlock_expiration_{productId}_{systid}`): This custom field is created when there is a defined maximum duration (`variationMaxDays`) for license validity from the activation date. The expiration date is set based on this duration and is checked against the current date each time an activation is requested.
      • If the expiration date has passed, the server will block activation and display an error: “Your license for this activation has expired. Cannot activate.”
      • Example: `xlspadlock_expiration_1234_CD78-4563-3F2B`
    • Fixed Expiration Date (`variationExpireDate`): If a fixed expiration date is set, it is stored in this field. Each activation request will check if the current date is beyond this expiration date.
      • If expired, the activation attempt is denied with the error: “Your license has expired. Cannot activate.”
    • Maximum Runs Limit (`xlspadlock_runs_{productId}_{systid}`): For licenses that expire after a limited number of uses, this field tracks the remaining activations.
      • Initially set to the total allowed number of runs (`variationMaxRuns`), this counter decreases each time the customer activates the workbook.
      • If the number of remaining runs reaches zero, the activation is denied, displaying the message: “You have reached the maximum number of allowed runs. Cannot activate.”
      • Example: `xlspadlock_runs_1234_CD78-4563-3F2B`

Note: each time the customer activates the compiled workbook EXE file, a note is added to the WooCommerce order, as you can see here: