Skip to content

Actions & Filters

Fire your own code when WPLM events happen.

ActionWhen / Args
wplm_license_createdAfter a license is created. (License $license)
wplm_license_status_changedAfter any status change. (License, int $old, int $new)
wplm_license_revokedAfter revoke. (License)
wplm_license_terminatedAfter terminate. (License)
wplm_machine_activatedAfter device activation. (Machine, License)
wplm_machine_deactivatedAfter deactivation. (Machine, License)
wplm_machine_revokedAfter a device is revoked. (Machine)
wplm_heartbeat_receivedOn each device ping. (Machine)
wplm_zombie_culledWhen cron deactivates a dead machine. (Machine)
wplm_anomaly_detectedWhen an anomaly flag fires. (License, string $type, $detail)
wplm_order_licenses_issuedAfter a WooCommerce order delivers keys. (int $order_id, License[])
wplm_subscription_createdAfter a subscription is created. (Subscription)
wplm_subscription_status_changedAfter a status change. (Subscription, string $old, string $new)
wplm_subscription_renewedAfter a successful renewal. (Subscription, Renewal)
wplm_subscription_payment_failedOn a failed renewal attempt. (Subscription, int $attempt)
wplm_subscription_payment_failed_finalAfter dunning exhausts retries. (Subscription)
wplm_subscription_switchedAfter an upgrade/downgrade. (Subscription, $from, $to)
wplm_subscription_cancelledAfter 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.

FilterPurpose
wplm_generated_key_stringModify a freshly generated key before save.
wplm_validation_responseModify the /validate response payload.
wplm_rest_request_validInject custom REST request validation (allow/deny).
wplm_default_max_activationsOverride the default seat count.
wplm_heartbeat_intervalOverride the heartbeat interval (seconds).
wplm_zombie_windowOverride the dead-machine cull window (seconds).
wplm_resolve_geoProvide IP→country resolution.
wplm_list_table_columnsAdd/modify license list-table columns.
wplm_email_license_keysCustomise the key-delivery email body.
wplm_subscription_next_paymentOverride the computed next-payment date.
wplm_dunning_retry_scheduleCustomise failed-payment retry offsets (days).
wplm_switch_prorationCustomise proration math on a plan switch.
wplm_subscription_email_contentCustomise any subscription email body.
wplm_webhook_payloadModify a webhook payload before delivery.