Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 1 of 2 remaining places where relatedObjects is called in completeOrder #18257

Merged
merged 1 commit into from
Aug 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions CRM/Contribute/BAO/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -4545,12 +4545,6 @@ public static function completeOrder($input, &$ids, $objects, $isPostPaymentCrea
CRM_Contribute_BAO_ContributionRecur::addrecurSoftCredit($objects['contributionRecur']->id, $contribution->id);
}

if (empty($contribution->_relatedObjects['participant']) && !empty($contribution->_relatedObjects['membership'])) {
// @fixme Can we remove this if altogether? - we removed the participant if / else and left relatedObjects['participant'] to ensure behaviour didn't change but it is probably not required.
// @todo - use getRelatedMemberships instead
$contribution->trxn_id = $input['trxn_id'] ?? NULL;
$contribution->receive_date = CRM_Utils_Date::isoToMysql($contribution->receive_date);
}
$contribution->contribution_status_id = $contributionParams['contribution_status_id'];

CRM_Core_Error::debug_log_message('Contribution record updated successfully');
Expand Down