You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WHMCS-compatible hook system. Register callbacks against named hook points;
core code fires them at the right moments. A throwing callback is logged and
skipped — a broken hook can never break billing or provisioning.
password change succeeded, VPS root password included
AfterModuleChangePackage
service, newProduct
package change succeeded
ModuleActionFailed
service, action, error
any module action failed (queued for retry)
Services (post-provisioning domain events)
Hook
Params
When
ServiceActivated
service
service became active
ServiceSuspended
service, reason
service suspended
ServiceUnsuspended
service
suspension lifted (on a server, or locally for a service with none)
ServiceTerminated
service
service terminated
InvoiceCancelled
invoice
an invoice was cancelled (admin, bulk action or API)
ClientEdit
client, userid, changes, olddata
a client's own details changed (not the balance)
ClientDelete
client, userid
a client is about to be deleted
EmailPreSend
to, subject, message
a mail is about to leave; return ['abortsend' => true] to stop it
ShoppingCartValidateCheckout
cart, clientId, paymentMethod
the customer submits checkout; return a message (or a list) to refuse the order with it
DailyCronJob
—
once a day (00:10, scheduler)
DownloadRequested
download, clientId, user
a customer asks for a download, after the access check; return ['abort' => 'reason'] to refuse (403) or ['path' => '/absolute/file', 'name' => 'file.zip'] to hand over that file instead
the registrar accepted a transfer request (it completes days later at the registry)
DomainExpired
domain, status
the daily domain sync moved a domain past its expiry date to grace, redemption or expired
Clients & Support
Hook
Params
When
ClientCreated / ClientAdd
client
new client registered
TicketOpened / TicketOpen
ticket, isAdmin
ticket opened (isAdmin: opened by staff)
TicketReplied
ticket, replyMessage, isStaffReply
ticket reply added
System
Hook
Params
When
AfterDatabaseBackup
file, size
the database backup was written
CurrencyRatesUpdated
base, updated, missing
the daily exchange-rate update ran
Debugging
app(\App\Services\HookManager::class)->registered(); // point => callback countapp(\App\Services\HookManager::class)->firedLog(); // fired this request
Output hooks
A callback returns an HTML string, which is printed as it is; anything else is ignored. As in WHMCS.
Hook
Vars
Printed
ClientAreaHeadOutput
user
before </head> on the client area, the sign-in and sign-up pages, the home page and the legal pages
ClientAreaFooterOutput
user
before </body> on the same pages
ClientAreaProductDetailsOutput
service
in a panel on the client's service page
AdminAreaHeadOutput
admin
before </head> in the admin area
AdminAreaFooterOutput
admin
before </body> in the admin area
A theme that replaces one of these layouts should call hook_output() at the same places, so addons keep working with it.