How can we improve WHMCS?

Share, discuss and vote for what you would like to see added to WHMCS

Granular Hook Points

  • Michael Levine shared this idea 2 months ago
  • Developers
  • 2 Comments


Would it be possible to implement more granular hook points throughout the system? The existing hooks are helpful, but there are many cases where more precise triggers would provide much better control.

It seems like this would be one of the easier feature requests to implement, and it would go a long way in helping developers build better modules/addons without relying on hacky workarounds.

Thanks for considering it.

2 Comments

Login to post a comment.

Thank you for taking the time to review our request. To keep this brief:

WHMCS models already leverage the Eloquent ORM (save(), update(), delete()), which natively supports model events via Illuminate\Database\Eloquent\Model. These events include:

Creating / Created
Updating / Updated
Saving / Saved
Deleting / Deleted

Exposing these as hook points would provide developers with a much more granular and powerful integration layer. For example:

ModelSaving
ModelSaved
ModelUpdating
ModelUpdated
ModelDeleting
ModelDeleted

When triggered, each hook should provide the model instance, allowing inspection and (where appropriate) modification of its fillable attributes.

This would dramatically reduce the need for workarounds, while aligning WHMCS more closely with modern Eloquent best practices. It's a relatively low-effort enhancement that would unlock significant flexibility for addon and module developers.

There are certainly other areas where additional hook points would be valuable, but this would be a strong and practical starting point.
Hi Michael,
Thanks for taking the time to submit the idea.

Hook points are currently triggered at specific points in the systwm code path.

Can you provide further details on what changes you'd like to see that would make this more granular? Also an example of a problem you feel this could solve would be most helpful to help us understand the proposal.