From 1c98b2d65490bf29bf2e7dffa7fa4671e3ffe983 Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Tue, 4 Aug 2015 22:50:17 +1200 Subject: [PATCH] CRM-16523 remove last hook by-pass --- CRM/Contribute/BAO/Contribution.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index f59cbe4794..6b6edcdb1f 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -4015,7 +4015,7 @@ WHERE con.id = {$contributionId} 'check_number', 'payment_instrument_id', 'is_test', - 'campaign_id' + 'campaign_id', ); $contributionParams = array_merge(array( @@ -4181,14 +4181,11 @@ LIMIT 1;"; $contributionParams['receipt_date'] = $changeDate; $values['is_email_receipt'] = 1; } + $participantParams['id'] = $participant->id; if (empty($input['IAmAHorribleNastyBeyondExcusableHackInTheCRMEventFORMTaskClassThatNeedsToBERemoved'])) { - $participantStatuses = CRM_Core_PseudoConstant::get('CRM_Event_DAO_Participant', 'status_id', array( - 'labelColumn' => 'name', - 'flip' => 1, - )); - $participant->status_id = $participantStatuses['Registered']; + $participantParams['status_id'] = 'Registered'; } - $participant->save(); + civicrm_api3('Participant', 'create', $participantParams); } $contributionParams['id'] = $contribution->id; -- 2.25.1