From: Eileen McNaughton Date: Wed, 5 Jul 2023 01:39:42 +0000 (+1200) Subject: Update related contribution trxn_id before sending email X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c5bab3a0fd1fc3bd206a8abb0ee0ced43d87a9b6;p=civicrm-core.git Update related contribution trxn_id before sending email This will allow https://github.com/civicrm/civicrm-core/pull/26659 to pass & merge --- diff --git a/CRM/Financial/BAO/Payment.php b/CRM/Financial/BAO/Payment.php index 97795f7cac..d7e7a5f7c0 100644 --- a/CRM/Financial/BAO/Payment.php +++ b/CRM/Financial/BAO/Payment.php @@ -169,7 +169,7 @@ class CRM_Financial_BAO_Payment { } } } - + self::updateRelatedContribution($params, $params['contribution_id']); if ($isPaymentCompletesContribution) { if ($contributionStatus === 'Pending refund') { // Ideally we could still call completetransaction as non-payment related actions should @@ -213,7 +213,6 @@ class CRM_Financial_BAO_Payment { // change status to refunded. self::updateContributionStatus($contribution['id'], 'Refunded'); } - self::updateRelatedContribution($params, $params['contribution_id']); CRM_Contribute_BAO_Contribution::recordPaymentActivity($params['contribution_id'], CRM_Utils_Array::value('participant_id', $params), $params['total_amount'], $trxn->currency, $trxn->trxn_date); return $trxn; }