3 require_once 'contributioncancelactions.civix.php';
5 use CRM_Contributioncancelactions_ExtensionUtil
as E
;
9 * Implements hook_civicrm_preProcess().
11 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_post
13 function contributioncancelactions_civicrm_post($op, $objectName, $objectId, $objectRef) {
14 if ($op === 'edit' && $objectName === 'Contribution') {
15 if ($objectRef->contribution_status_id
=== CRM_Core_PseudoConstant
::getKey('CRM_Contribute_BAO_Contribution', 'contribution_status_id', 'Cancelled')) {