Skip to content

Commit

Permalink
Merge pull request #23797 from eileenmcnaughton/remove_field_types
Browse files Browse the repository at this point in the history
[REF] Remove param that has a set value
  • Loading branch information
eileenmcnaughton authored Jun 15, 2022
2 parents 8149bb4 + 149b94f commit 39120a1
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions CRM/Contribute/Form/Contribution/Confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -1418,12 +1418,11 @@ public static function processPcp(&$page, $params): array {
* @param array $membershipParams
* @param int $contactID
* @param array $customFieldsFormatted
* @param array $fieldTypes
* @param array $premiumParams
* @param array $membershipLineItems
* Line items specifically relating to memberships.
*/
protected function processMembership($membershipParams, $contactID, $customFieldsFormatted, $fieldTypes, $premiumParams,
protected function processMembership($membershipParams, $contactID, $customFieldsFormatted, $premiumParams,
$membershipLineItems): void {

$membershipTypeIDs = (array) $membershipParams['selectMembership'];
Expand Down Expand Up @@ -1454,7 +1453,7 @@ protected function processMembership($membershipParams, $contactID, $customField
$membershipParams['contribution_source'] = $this->_params['membership_source'];
}

$this->postProcessMembership($membershipParams, $contactID, $premiumParams, $customFieldsFormatted, $fieldTypes, $membershipType, $membershipTypeIDs, $isPaidMembership, $this->_membershipId, $isProcessSeparateMembershipTransaction, $financialTypeID,
$this->postProcessMembership($membershipParams, $contactID, $premiumParams, $customFieldsFormatted, $membershipType, $membershipTypeIDs, $isPaidMembership, $this->_membershipId, $isProcessSeparateMembershipTransaction, $financialTypeID,
$membershipLineItems);

$this->assign('membership_assign', TRUE);
Expand All @@ -1471,7 +1470,6 @@ protected function processMembership($membershipParams, $contactID, $customField
*
* @param array $premiumParams
* @param null $customFieldsFormatted
* @param null $includeFieldTypes
*
* @param array $membershipDetails
*
Expand All @@ -1492,7 +1490,7 @@ protected function processMembership($membershipParams, $contactID, $customField
*/
protected function postProcessMembership(
$membershipParams, $contactID, $premiumParams,
$customFieldsFormatted, $includeFieldTypes, $membershipDetails, $membershipTypeIDs, $isPaidMembership, $membershipID,
$customFieldsFormatted, $membershipDetails, $membershipTypeIDs, $isPaidMembership, $membershipID,
$isProcessSeparateMembershipTransaction, $financialTypeID, $unprocessedLineItems) {
// Assign $this to $form while we eliminate it.
$form = $this;
Expand Down Expand Up @@ -1781,7 +1779,7 @@ protected function postProcessMembership(
CRM_Contribute_BAO_ContributionPage::sendMail($contactID,
$emailValues,
$isTest, FALSE,
$includeFieldTypes
['Contact', 'Organization', 'Membership']
);
}

Expand Down Expand Up @@ -2523,7 +2521,7 @@ protected function doMembershipProcessing($contactID, $membershipParams, $premiu
$this->_params['campaign_id'] = $membershipParams['onbehalf']['member_campaign_id'];
}

$customFieldsFormatted = $fieldTypes = [];
$customFieldsFormatted = [];
if (!empty($membershipParams['onbehalf']) &&
is_array($membershipParams['onbehalf'])
) {
Expand All @@ -2540,7 +2538,6 @@ protected function doMembershipProcessing($contactID, $membershipParams, $premiu
);
}
}
$fieldTypes = ['Contact', 'Organization', 'Membership'];
}

$membershipParams = $this->getMembershipParamsFromPriceSet($membershipParams);
Expand All @@ -2559,7 +2556,7 @@ protected function doMembershipProcessing($contactID, $membershipParams, $premiu
}
}
try {
$this->processMembership($membershipParams, $contactID, $customFieldsFormatted, $fieldTypes, $premiumParams, $membershipLineItems);
$this->processMembership($membershipParams, $contactID, $customFieldsFormatted, $premiumParams, $membershipLineItems);
}
catch (\Civi\Payment\Exception\PaymentProcessorException $e) {
CRM_Core_Session::singleton()->setStatus($e->getMessage());
Expand Down

0 comments on commit 39120a1

Please sign in to comment.