diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index 848c8ecd990f..963dada1ce9e 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -327,23 +327,6 @@ public function setDefaultValues() { $scTypes = CRM_Core_OptionGroup::values("soft_credit_type"); $defaults['soft_credit_type_id'] = CRM_Utils_Array::value(ts('Gift'), array_flip($scTypes)); - if (!empty($defaults['record_contribution']) && !$this->_mode) { - $contributionParams = ['id' => $defaults['record_contribution']]; - $contributionIds = []; - - //keep main object campaign in hand. - $memberCampaignId = CRM_Utils_Array::value('campaign_id', $defaults); - - CRM_Contribute_BAO_Contribution::getValues($contributionParams, $defaults, $contributionIds); - - //get back original object campaign id. - $defaults['campaign_id'] = $memberCampaignId; - - // Contribution::getValues() over-writes the membership record's source field value - so we need to restore it. - if (!empty($defaults['membership_source'])) { - $defaults['source'] = $defaults['membership_source']; - } - } //CRM-13420 if (empty($defaults['payment_instrument_id'])) { $defaults['payment_instrument_id'] = key(CRM_Core_OptionGroup::values('payment_instrument', FALSE, FALSE, FALSE, 'AND is_default = 1'));