From ac6b9668d8bcb60e58896d33960fc0876f017629 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 27 Aug 2020 10:05:04 +1200 Subject: [PATCH] Use already detemined value for contributionRecurid --- CRM/Contribute/BAO/Contribution.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index d69c94fbac02..0e8ba3d61c1a 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -4545,8 +4545,8 @@ public static function completeOrder($input, $ids, $objects, $isPostPaymentCreat } // Add new soft credit against current $contribution. - if (!empty($objects['contributionRecur']) && $objects['contributionRecur']->id) { - CRM_Contribute_BAO_ContributionRecur::addrecurSoftCredit($objects['contributionRecur']->id, $contribution->id); + if ($recurringContributionID) { + CRM_Contribute_BAO_ContributionRecur::addrecurSoftCredit($recurringContributionID, $contribution->id); } $contribution->contribution_status_id = $contributionParams['contribution_status_id'];