diff --git a/CRM/Event/BAO/ParticipantPayment.php b/CRM/Event/BAO/ParticipantPayment.php index 0051038aaa3a..f84e6b15ace4 100644 --- a/CRM/Event/BAO/ParticipantPayment.php +++ b/CRM/Event/BAO/ParticipantPayment.php @@ -71,10 +71,10 @@ public static function create(&$params, $ids = []) { $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