Actions & Filters
Action hooks
Section titled “Action hooks”Fire your own code when WPLM events happen.
| Action | When / Args |
|---|---|
wplm_license_created | After a license is created. (License $license) |
wplm_license_status_changed | After any status change. (License, int $old, int $new) |
wplm_license_revoked | After revoke. (License) |
wplm_license_terminated | After terminate. (License) |
wplm_machine_activated | After device activation. (Machine, License) |
wplm_machine_deactivated | After deactivation. (Machine, License) |
wplm_machine_revoked | After a device is revoked. (Machine) |
wplm_heartbeat_received | On each device ping. (Machine) |
wplm_zombie_culled | When cron deactivates a dead machine. (Machine) |
wplm_anomaly_detected | When an anomaly flag fires. (License, string $type, $detail) |
wplm_order_licenses_issued | After a WooCommerce order delivers keys. (int $order_id, License[]) |
wplm_subscription_created | After a subscription is created. (Subscription) |
wplm_subscription_status_changed | After a status change. (Subscription, string $old, string $new) |
wplm_subscription_renewed | After a successful renewal. (Subscription, Renewal) |
wplm_subscription_payment_failed | On a failed renewal attempt. (Subscription, int $attempt) |
wplm_subscription_payment_failed_final | After dunning exhausts retries. (Subscription) |
wplm_subscription_switched | After an upgrade/downgrade. (Subscription, $from, $to) |
wplm_subscription_cancelled | After cancellation. (Subscription) |
add_action( 'wplm_license_created', function ( $license ) { // sync to your CRM, etc.} );These same actions drive webhooks — registered endpoints receive a notification for each one.
Filter hooks
Section titled “Filter hooks”| Filter | Purpose |
|---|---|
wplm_generated_key_string | Modify a freshly generated key before save. |
wplm_validation_response | Modify the /validate response payload. |
wplm_rest_request_valid | Inject custom REST request validation (allow/deny). |
wplm_default_max_activations | Override the default seat count. |
wplm_heartbeat_interval | Override the heartbeat interval (seconds). |
wplm_zombie_window | Override the dead-machine cull window (seconds). |
wplm_resolve_geo | Provide IP→country resolution. |
wplm_list_table_columns | Add/modify license list-table columns. |
wplm_email_license_keys | Customise the key-delivery email body. |
wplm_subscription_next_payment | Override the computed next-payment date. |
wplm_dunning_retry_schedule | Customise failed-payment retry offsets (days). |
wplm_switch_proration | Customise proration math on a plan switch. |
wplm_subscription_email_content | Customise any subscription email body. |
wplm_webhook_payload | Modify a webhook payload before delivery. |