/ /website-builder/ /leased-bundle/ /extensions/ /module-integration/ /order-form/

# Custom Hooks

This section lists the custom hooks supported by the Lagom WHMCS Smart Order Form module.

These hooks allow you to customize how the order form behaves without modifying core files.

  • LagomOrderFormProductsList – allows you to modify the list of products displayed to the customer.

Example:

add_hook('LagomOrderFormProductsList', 1, function($productList) {
    return $productList;
});
  • ShoppingCartValidateProductUpdate – allows you to add custom validation and return error messages when a product in the shopping cart is updated.

Example:

add_hook('ShoppingCartValidateProductUpdate', 1, function($vars) {
    return [
        'Error message feedback error 1',
        'Error message feedback error 2',
    ];
});