Subscription events require DMSI Subscriptions Pro to be installed and active. If Subscriptions Pro is not detected at plugin initialization, subscription event hooks are not registered and these events will not fire.
Subscriptions Pro Detection #
The plugin checks function_exists('dmsi_subscriptions_pro') at init time. The check is performed on every request — it is not cached.
Events #
subscription.created #
Fired when: A new subscription record is created in DDLS Subscriptions Pro.
DDLS Hook: dmsi_subscription_created
Typical payload data fields:
| Field | Type | Description |
|---|---|---|
subscription_id | integer | Subscription record ID |
product_id | integer | Subscribed product |
customer | object | Customer info: {id, email} |
license_key | string | Associated license key |
billing_period | string | Billing cycle (e.g., monthly, yearly) |
next_billing_at | string | Next scheduled renewal (ISO 8601) |
created_at | string | Subscription creation timestamp (ISO 8601) |
—
subscription.renewed #
Fired when: A subscription renewal is successfully processed.
DDLS Hook: dmsi_subscription_renewed
Typical payload data fields:
| Field | Type | Description |
|---|---|---|
subscription_id | integer | Subscription record ID |
product_id | integer | Subscribed product |
license_key | string | Associated license key |
renewed_at | string | Date renewal was processed (ISO 8601) |
next_billing_at | string | Next scheduled renewal (ISO 8601) |
—
subscription.cancelled #
Fired when: A subscription is cancelled by the user or admin.
DDLS Hook: dmsi_subscription_cancelled
Typical payload data fields:
| Field | Type | Description |
|---|---|---|
subscription_id | integer | Subscription record ID |
product_id | integer | Subscribed product |
license_key | string | Associated license key |
cancelled_at | string | Date of cancellation (ISO 8601) |
reason | string | Cancellation reason (if provided) |
—
Use Cases #
- Provision or activate a service account when
subscription.createdfires - Extend access in an external system when
subscription.renewedfires - Revoke access or trigger offboarding when
subscription.cancelledfires
If Subscriptions Pro Is Not Active #
Subscription event types are not listed in the admin Events page and are not available for endpoint subscriptions. Installing and activating Subscriptions Pro adds them automatically on next page load (the 24-hour transient cache may need to be invalidated).
Related Topics #
- Event Types Overview
- License Events
- Payload Reference
