The following action hooks are fired by DMSI Advanced API at key points in the business lifecycle. These hooks are the trigger points for webhook delivery — when the plugin dispatches a webhook, it does so by listening to these same hooks via its internal Dispatcher class.
| Hook Name | Parameters | Fired When |
|---|---|---|
dmsi_aapi_customer_created | $customer_data (array) | A new customer is created via the REST API |
dmsi_aapi_customer_updated | $customer_data (array) | A customer record is updated via the REST API |
dmsi_aapi_license_created | $license_data (array) | A new license is created via the REST API |
dmsi_aapi_license_expired | $license_data (array) | A license expiry is detected (by cron or API request) |
dmsi_aapi_activation_created | $activation_data (array) | A license is activated for a new site or device |
dmsi_aapi_activation_deactivated | $activation_data (array) | A license activation is removed |
dmsi_aapi_subscription_created | $subscription_data (array) | A new subscription is created via the REST API |
dmsi_aapi_subscription_renewed | $subscription_data (array) | A subscription is renewed |
dmsi_aapi_subscription_canceled | $subscription_data (array) | A subscription is canceled |
dmsi_aapi_subscription_expired | $subscription_data (array) | A subscription expiry is detected |
dmsi_aapi_download_served | $download_data (array) | A download token is validated and a download is served to a customer |
Usage Example #
add_action('dmsi_aapi_license_created', function(array $license_data): void {
// $license_data contains the full license record array
$license_key = $license_data['license_key'] ?? '';
$customer_id = $license_data['customer_id'] ?? 0;
// Example: send a custom notification
wp_mail(
get_option('admin_email'),
'New License Created',
sprintf('License %s created for customer ID %d.', $license_key, $customer_id)
);
});
