Offline Licensing with WooCommerce

Offline licensing allows your customers to activate and use your software on a device without an internet connection. The license file is generated through your WooCommerce store and loaded into your application locally.

This guide covers the full flow — from your store settings to the end user’s experience.

How It Works

  1. Your application displays the device’s Host ID to the user
  2. The user purchases a license from your WooCommerce store
  3. On the order downloads page, the user enters their Host ID
  4. The store generates an encrypted license file for that specific device
  5. The user downloads the file and loads it into your application
  6. Your application validates the license file locally — no internet needed

Configure Your WooCommerce Store

In the KEYZY WooCommerce plugin settings, enable two options:

  1. Go to WooCommerce > Settings > KEYZY (or the KeyzyWc settings page)
  2. Enable “Show Download Link” — this lets the user download the encrypted license file
  3. Enable “Show HostID Input Field” — this adds an input where the user can paste their Host ID

Without these options enabled, the user won’t see the fields needed for offline activation.

Display the Host ID in Your Application

Your application needs to show the user their device’s unique Host ID. Use the getHostIdHash() function from the KEYZY C++ Client Library:

std::string hostId = pValidator->getHostIdHash();

// Display this to the user — e.g. in a dialog, or copy it to the clipboard

The Host ID is a hash that uniquely identifies the device. The user copies this value and enters it in your WooCommerce store when downloading the license file.

Important: The Host ID must be copied exactly. An incorrect Host ID will produce a license file that won’t work on the device.

The User’s Experience

After purchasing a license from your store:

  1. The user goes to their order’s downloads page
  2. They paste the Host ID from your application into the input field
  3. They click download — the store generates an encrypted license file tied to that device
  4. The user saves the file and provides it to your application (e.g. via a file browser dialog)

Activate the License File

Once the user has the license file, your application needs to load and validate it. See the Offline Activation tutorial for the full implementation — covering activation, validation, offline license life, and deactivation.

Tips