Skip to content

Commit

Permalink
Drop unnecessary call to getContactMembership
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwire committed Jul 23, 2018
1 parent a7b17b1 commit 00c6d4b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions CRM/Contribute/BAO/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -5465,18 +5465,14 @@ protected static function updateMembershipBasedOnCompletionOfContribution($contr
);

// Does the contact have a "current" membership (ie. not expired/pending etc).
$currentMembership = CRM_Member_BAO_Membership::getContactMembership($membershipParams['contact_id'],
$membershipParams['membership_type_id'],
$membershipParams['is_test'],
$membershipParams['id']
);
if ($currentMembership) {
if (!empty($membership['status_id.is_current_member'])) {
/*
* Fixed FOR CRM-4433
* In BAO/Membership.php(renewMembership function), we skip the extend membership date and status
* when Contribution mode is notify and membership is for renewal )
* FIXME: Is this still required?
*/
CRM_Member_BAO_Membership::fixMembershipStatusBeforeRenew($currentMembership, $changeDate);
CRM_Member_BAO_Membership::fixMembershipStatusBeforeRenew($membership, $changeDate);
}

// Tell the Membership BAO to calculate membership status.
Expand Down

0 comments on commit 00c6d4b

Please sign in to comment.