Fix the invocation of post hook for ParticipantPayment ensuring that an id is passed...
authorSeamus Lee <seamuslee001@gmail.com>
Fri, 1 Mar 2019 02:46:22 +0000 (13:46 +1100)
committerSeamus Lee <seamuslee001@gmail.com>
Fri, 1 Mar 2019 02:46:22 +0000 (13:46 +1100)
CRM/Event/BAO/ParticipantPayment.php

index 0051038aaa3a3f7960d60d5a5a451b89e1b4c87e..f84e6b15ace48fa8bdbcd0d6449a1d200850dbac 100644 (file)
@@ -71,10 +71,10 @@ class CRM_Event_BAO_ParticipantPayment extends CRM_Event_DAO_ParticipantPayment
       $participantPayment->find(TRUE);
     }
     if ($id) {
-      CRM_Utils_Hook::post('edit', 'ParticipantPayment', $id, $participantPayment);
+      CRM_Utils_Hook::post('edit', 'ParticipantPayment', $participantPayment->id, $participantPayment);
     }
     else {
-      CRM_Utils_Hook::post('create', 'ParticipantPayment', NULL, $participantPayment);
+      CRM_Utils_Hook::post('create', 'ParticipantPayment', $participantPayment->id, $participantPayment);
     }
 
     //generally if people are creating participant_payments via the api they won't be setting the line item correctly - we can't help them if they are doing complex transactions