Email Templates
LicenceForge ships with 6 transactional email templates that fire automatically at key points in the license lifecycle. Each template has a configurable subject line and HTML body, and supports variable substitution to inject dynamic data.
Template Storage
Each template is stored as a WordPress option using the naming convention:
wplf_email_template_{slug}
For example, the license-created template is stored in the option wplf_email_template_license_created. Each option contains both the subject and body for that template.
license_created
Sent to the customer immediately after a license is created through a purchase. This is triggered by a completed Stripe checkout session or a WooCommerce order reaching the completed or processing status.
Trigger
Purchase via Stripe Checkout or WooCommerce order completion.
Available variables
| Variable | Description |
|---|---|
{customer_name} |
The customer's full name |
{product_name} |
The name of the purchased product |
{license_key} |
The generated license key |
{activation_limit} |
Maximum number of allowed activations |
{expiry_date} |
The license expiration date |
{site_name} |
The WordPress site name |
Example subject
Your {product_name} license key
trial_created
Sent when a customer requests a trial license. Delivers the trial key along with the trial duration so the customer knows exactly when the trial expires.
Trigger
Trial license requested (via API or admin action).
Available variables
| Variable | Description |
|---|---|
{customer_name} |
The customer's full name |
{product_name} |
The name of the product being trialled |
{license_key} |
The generated trial license key |
{trial_days} |
Number of days in the trial period |
{expiry_date} |
The trial expiration date |
{site_name} |
The WordPress site name |
Example subject
Your {trial_days}-day trial of {product_name}
license_expiring
A warning email sent 7 days before a license expires. This is triggered by the check_expiring_licenses daily cron job, which scans for licenses approaching their expiry date and sends a notification with a renewal link.
Trigger
Daily cron (check_expiring_licenses), 7 days before expiry.
Available variables
| Variable | Description |
|---|---|
{customer_name} |
The customer's full name |
{product_name} |
The name of the licensed product |
{expiry_date} |
The license expiration date |
{renewal_link} |
URL where the customer can renew the license |
{site_name} |
The WordPress site name |
Example subject
Your {product_name} license expires on {expiry_date}
The expiry warning depends on WordPress cron running reliably. If your site has low traffic, consider setting up a system-level cron job to hit wp-cron.php on a regular schedule. See Email Configuration for details.
license_renewed
Sent when a license is renewed, confirming the renewal and providing the updated expiry date. This fires for both manual renewals and automatic subscription renewals through Stripe or WooCommerce.
Trigger
License renewal (manual or subscription-based).
Available variables
| Variable | Description |
|---|---|
{customer_name} |
The customer's full name |
{product_name} |
The name of the licensed product |
{expiry_date} |
The new expiration date after renewal |
{site_name} |
The WordPress site name |
Example subject
Your {product_name} license has been renewed
license_key_rotated
Sent when a license key is rotated (replaced with a new key). This ensures the customer receives their new key promptly. The old key is invalidated immediately upon rotation.
Trigger
License key rotation (admin action or API call).
Available variables
| Variable | Description |
|---|---|
{customer_name} |
The customer's full name |
{product_name} |
The name of the licensed product |
{license_key} |
The new license key |
{site_name} |
The WordPress site name |
Example subject
Your {product_name} license key has been updated
license_suspended
Sent when a license is suspended. This can occur due to a refund, a failed payment, a dispute, or a manual admin action. The email includes the reason for suspension so the customer can take appropriate action.
Trigger
License suspension (refund, dispute, failed payment, or admin action).
Available variables
| Variable | Description |
|---|---|
{customer_name} |
The customer's full name |
{product_name} |
The name of the licensed product |
{suspend_reason} |
The reason the license was suspended |
{site_name} |
The WordPress site name |
Example subject
Your {product_name} license has been suspended
Global Variables
The following variables are available in every template, in addition to the template-specific variables listed above:
| Variable | Description | Source |
|---|---|---|
{site_name} |
The WordPress site name | get_bloginfo('name') |
{site_url} |
The WordPress site URL | get_bloginfo('url') |
{brand_name} |
The configured brand name | wplf_brand_name option |
{support_url} |
Link to your support page | wplf_support_url option |
Use global variables in your email footer to include consistent branding and support links across all templates. For example: <p>Need help? Visit <a href="{support_url}">{brand_name} Support</a>.</p>
Quick Reference
The table below summarises all templates, their triggers, and template-specific variables at a glance.
| Template Slug | Trigger | Template-Specific Variables |
|---|---|---|
license_created |
Purchase (Stripe / WooCommerce) | {customer_name}, {product_name}, {license_key}, {activation_limit}, {expiry_date} |
trial_created |
Trial requested | {customer_name}, {product_name}, {license_key}, {trial_days}, {expiry_date} |
license_expiring |
Daily cron (7 days before) | {customer_name}, {product_name}, {expiry_date}, {renewal_link} |
license_renewed |
Renewal | {customer_name}, {product_name}, {expiry_date} |
license_key_rotated |
Key rotation | {customer_name}, {product_name}, {license_key} |
license_suspended |
Suspension | {customer_name}, {product_name}, {suspend_reason} |
All templates also include the global variables: {site_name}, {site_url}, {brand_name}, and {support_url}.