Skip to content

Hooks Changelog

This page lists hooks added, removed, deprecated or modified with each new release of CiviCRM.

For API changes, see APIv4 Changelog and APIv3 Changelog.

CiviCRM 5.x

5.69 No hook change but form property _lineItem on contribution pages Main, Confirm, ThankYou no longer used. However there is a magic property which will assist extensions accessing this property in most cases.

https://github.com/civicrm/civicrm-core/pull/28276

5.67 queueActive hook added.

5.67 type hints added to selectWhere functions

5.67 notePrivacy hook deprecated

5.66 Form objects passed to hooks have a function getAuthenticatedContactID() that is supported to be called from extensions & will return the contact ID of the contact authenticated by checksum or, failing that the contact ID of the logged in user.

5.61 hook_importAlterMappedRow added for contribution imports

5.47: hook_civicrm_pre - no longer called twice in some flows for relationship create (ie creating an employer relationship and importing contacts with a relationship)

5.43: hool_civicrm_alterMailParams - parameter workflow added, valueName deprecated, removal of old deprecated groupName commenced

5.41: hook_invalidateChecksum added.

5.39: hook_searchKitTasks added.

5.31: deprecated hook_civicrm_tabs finally removed

https://github.com/civicrm/civicrm-core/pull/18503

5.25: hook_civicrm_postCommit added

hook_civicrm_postCommit is a variant of hook_civicrm_post which is deferred until the relevant data is fully committed to the database.

5.11: hook_civicrm_pageRun invocation removed from CRM_Core_Page_Inline_Help

CRM_Core_Page_Inline_Help is the class that fetches inline documentation from .hlp templates to be shown in help baloons. hook_civicrm_pageRun normally does not run when fetching help, except in the (very rare) case that a site has been customized with an .extra.hlp file, which potentially causes problems because the class CRM_Core_Page_Inline_Help does not extend CRM_Core_Page. The inconsistent hook invocation has been removed.

CiviCRM 4.7

4.7.14: hook_civicrm_pre & hook_civicrm_post supports CustomField

Pre and post hooks now fire when adding, updating or deleting custom fields.

4.7.0: New hook_civicrm_selectWhereclause

This hook can be used to impose access limits on most entities fetched via the api by adding conditions to the where clause.

4.7.0 hook_civicrm_tabs deprecated

This hook is deprecated in 4.7. Use hook_civicrm_tabset instead.

4.7.0 hook_civicrm_validate removed

This hook was deprecated since v4.2 in favor of hook_civicrm_validateForm.

CiviCRM 4.5

4.5.0: hook_civicrm_enableDisable removed

The deprecated enableDisablehook was not reliably invoked every time an entity was enabled or disabled.It was removed in 4.5. Use the standard pre and post hooks instead.

4.5.0: hook_civicrm_referenceCounts

The new API call "getrefcount" allows one to ask about references to a given record. Using hook_civicrm_referenceCounts, a third-party developer can modify the reference-count.

CiviCRM 4.4

4.4.0: Add hooks for profile forms

Added hooks for

See also: CRM-12865

4.4.0: hook_civicrm_searchColumns: Change of $values in profile-listings

When displaying a profile-based listing (such as "civicrm/profile?gid=XXX"), the $values represents a row/column matrix by providing an array of rows. Each row contains several cells keyed numerically, but one cell was inconsistently keyed by the string sort_name instead of its numeric position. The sort_name cell appeared early and affected the numbering of all subsequent cells. For greater consistency, the sort_name will now be identified numerically, and other cells will be renumbered accordingly.

4.4.0: hook_civicrm_buildUFGroupsForModule: Change to $ufGroups

$ufGroups provides an array of UFGroup records. In previous releases, this array always contained the same fields for each record (id, title, is_reserved, etc). In 4.4, the fields are usually the same, but they may vary depending on the context. See patches to CRM-13388