diff --git a/docs/hooks/hook_civicrm_post.md b/docs/hooks/hook_civicrm_post.md index 29d947745392a3919bccf2f0760215c90b4b1ea4..a6a4be163262bb5df8707f46094f5916bd4c0048 100644 --- a/docs/hooks/hook_civicrm_post.md +++ b/docs/hooks/hook_civicrm_post.md @@ -14,7 +14,9 @@ deleted first). !!! note These hooks use database transactions. Don't execute code that updates the same data in the database without using a callback. Eg. if triggering on a `Membership` entity, don't try and update that membership entity within the hook. Use CRM_Core_Transaction::addCallback() instead. - + +!!! tip + Some of the more esoteric entities may not fire this hook when they're saved. If you happen to find such an entity, please make a PR to core which adds this hook. As an example, you can refer to `CRM_Core_BAO_Dashboard::create()` to find succinct syntax that appropriately calls both `CRM_Utils_Hook::pre()` and `CRM_Utils_Hook::post()`. ## Definition diff --git a/docs/hooks/hook_civicrm_pre.md b/docs/hooks/hook_civicrm_pre.md index c2bb9d71bef64b69c661e00534cc76f67efae6bc..62f715d67492587419d91f9c363ada6030620abb 100644 --- a/docs/hooks/hook_civicrm_pre.md +++ b/docs/hooks/hook_civicrm_pre.md @@ -15,6 +15,9 @@ constraints etc (when deleting an object, the child objects have to be deleted first). Another good use for the pre hook is to see what is changing between the old and new data. +!!! tip + Some of the more esoteric entities may not fire this hook when they're saved. If you happen to find such an entity, please make a PR to core which adds this hook. As an example, you can refer to `CRM_Core_BAO_Dashboard::create()` to find succinct syntax that appropriately calls both `CRM_Utils_Hook::pre()` and `CRM_Utils_Hook::post()`. + ## Definition hook_civicrm_pre($op, $objectName, $id, &$params)