Skip to content
Gaurav TiwariDocs

Sell Plugins and Themes with License Keys

Updated October 17, 2026

Selling a plugin or theme through WooCommerce usually means a second licensing plugin: one more database, one more set of emails, one more thing to break when a buyer moves sites. Without it, there’s nothing stopping one purchase from running on fifty client sites.

Software Licensing creates a license key for every paid order of a licensed product, limits how many sites each key can activate, and serves updates from your own store. Keys follow refunds and subscriptions on their own, and customers manage their sites from My Account.

Turn On Licensing for a Product

Switch the module on under Stackless > Dashboard (it’s in the Access & licensing group). Then open the product, go to Product data > Licensing and tick License keys. The tab shows on simple and variable products, which includes Stackless subscription products.

The first group of fields controls the key itself:

  • Site limit: sites one key can activate. 0 means unlimited. The default is 1.
  • Validity: Lifetime, Follows subscription or Number of days.
  • Valid for (days): used with Number of days. The default is 365, and each paid renewal adds the same number of days.
  • Key prefix: optional, up to 20 characters. It’s upper-cased and joined to the key with a dash, so GTP gives GTP-ABCDE-....
  • Key format: every X becomes a random character. The default is XXXXX-XXXXX-XXXXX-XXXXX. A format needs at least 16 X characters and only letters, numbers and dashes, or the default is used.

Keys use an alphabet without 0, O, 1, I and L, so they survive being read aloud. Customers can type a key in any case, with or without dashes.

The second and third groups (Software slug, Current version, the changelog and the update package) are for automatic updates. Add Licensing and Automatic Updates to Your Plugin or Theme covers them.

Sell Tiers with Variations

For “1 site, 5 sites, unlimited” pricing, make one variable product. Once licensing is on and saved for the parent, each variation shows License site limit, License validity and License valid for (days). Leave a field empty to use the product setting. The software details stay on the parent, so every tier shares one slug and one release.

When Keys Are Created and Revoked

  • Keys are created when an order is paid (processing or completed), and the order gets a note like “1 license key created.”
  • Renewal orders never create new keys.
  • A refund or cancellation revokes the order’s keys.
  • A partial refund revokes only the refunded units’ keys, least-used keys first.
  • If an order was paid before you turned licensing on, open it and click Create missing keys in the License keys box.

Quantity above one is a setting under Stackless > Settings > Software Licensing:

  • One key per unit bought (default): a quantity of 3 gives three keys.
  • One key, activation limit multiplied by quantity: a quantity of 3 on a 1-site product gives one key for 3 sites.

Tie Keys to a Subscription

With Validity set to Follows subscription, the key expires at the subscription’s next payment date plus Subscription grace days (default 3, up to 60). That way a renewal that’s a little late doesn’t switch customers’ sites off.

  • A paid renewal moves the expiry to the new period end plus grace.
  • On-hold sets the key to inactive. Back to active or trial restores it.
  • Pending cancellation keeps the key active until the period ends, with no grace.
  • Cancelled or expired subscriptions expire the key straight away.
  • A plan switch moves the key to the new product and gives it that product’s site limit.

Without a subscription, Follows subscription acts as lifetime.

Manage Keys from the Licenses Screen

Stackless > Licenses lists every key with its product, customer, order, status, sites used against the limit and expiry. Development sites show separately, as “(+1 dev)”. Don’t mix it up with Stackless > License, which holds your own Stackless license.

Stackless licenses list with license keys, customers, orders, site activations against limits and expiry dates
  • Filter by All, Active, Inactive, Expired or Revoked.
  • Search keys, emails, order numbers and customer names.
  • Bulk actions: Set active, Set inactive, Revoke and Resend keys to customer.

Click a key to edit its status, Site limit and Expires date, or tick Never expires. Setting a future date on an expired key makes it active again. The Activated sites table lists each site with its activation date and last check, and a Deactivate button frees the slot.

The order edit screen has its own License keys box with Create missing keys, Resend keys to customer and Open in Licenses.

Emails

With Order emails on (the default), keys are added to the customer’s processing, completed, invoice and customer note emails. Resending uses a separate License keys email, which you can edit under WooCommerce > Settings > Emails. Its default subject is “Your license keys for order #{order_number}”.

What Customers See

Keys show on the order received page and on each order in My Account, with a Copy button and a link to manage licenses and sites.

Signed-in customers who own keys also get a Licenses tab in My Account, placed after Downloads. The address comes from the My Account endpoint setting (default licenses). Each license card shows:

  • the product, status and key, with a Copy key button
  • sites used against the limit, the expiry date and the order
  • a Download latest version button while the key is active and a package is set
  • each activated site, with development sites tagged “Development, not counted”
Customer My Account licenses tab with a license key, copy button, sites used, expiry and activated sites with deactivate buttons

With Customer site removal on (the default), customers can deactivate a site themselves to free the activation.

Good to Know

  • The Licenses tab only lists keys from orders placed while signed in. Guest purchases aren’t matched by email, so those keys stay with the order and its emails.
  • License keys and their sites are included in WordPress’s personal data export. Erasing a person’s data removes their site list and unlinks the key from them, but the key keeps working. Revoke it separately if you need to.
  • The module pauses while WooCommerce Software Add-on or License Manager for WooCommerce is active.
  • Expiry is checked live on every request. A daily background job also marks overdue keys as expired in the list.
Share

Was this helpful?

Still stuck? Open a support ticket