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

[REF] Remove some variables not relevant to backoffice member form #19284

Merged
merged 1 commit into from
Jan 7, 2021
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
11 changes: 0 additions & 11 deletions CRM/Member/Form/Membership.php
Original file line number Diff line number Diff line change
Expand Up @@ -1303,9 +1303,7 @@ public function submit() {
'line_item' => $lineItem,
'is_test' => $isTest,
'campaign_id' => $paymentParams['campaign_id'] ?? NULL,
'contribution_page_id' => $formValues['contribution_page_id'] ?? NULL,
'source' => CRM_Utils_Array::value('source', $paymentParams, CRM_Utils_Array::value('description', $paymentParams)),
'thankyou_date' => $paymentParams['thankyou_date'] ?? NULL,
'payment_instrument_id' => $paymentInstrumentID,
],
$financialType
Expand All @@ -1321,7 +1319,6 @@ public function submit() {

$paymentParams['contactID'] = $this->_contactID;
$paymentParams['contributionID'] = $contribution->id;
$paymentParams['contributionPageID'] = $contribution->contribution_page_id;
$paymentParams['contributionRecurID'] = $contribution->contribution_recur_id;
$params['contribution_id'] = $paymentParams['contributionID'];
$params['contribution_recur_id'] = $paymentParams['contributionRecurID'];
Expand Down Expand Up @@ -1848,10 +1845,8 @@ protected function getSelectedMembershipLabels(): string {
* - line_item
* - is_test
* - campaign_id
* - contribution_page_id
* - source
* - payment_type_id
* - thankyou_date (not all forms will set this)
*
* @param CRM_Financial_DAO_FinancialType $financialType
*
Expand Down Expand Up @@ -1899,15 +1894,9 @@ protected function processContribution(
'financial_type_id' => $financialType->id,
'receive_date' => !empty($params['receive_date']) ? CRM_Utils_Date::processDate($params['receive_date']) : date('YmdHis'),
'tax_amount' => $params['tax_amount'] ?? NULL,
'amount_level' => $params['amount_level'] ?? NULL,
'invoice_id' => $params['invoiceID'],
'currency' => $params['currencyID'],
'is_pay_later' => $params['is_pay_later'] ?? 0,
//configure cancel reason, cancel date and thankyou date
//from 'contribution' type profile if included
'cancel_reason' => $params['cancel_reason'] ?? 0,
'cancel_date' => isset($params['cancel_date']) ? CRM_Utils_Date::format($params['cancel_date']) : NULL,
'thankyou_date' => isset($params['thankyou_date']) ? CRM_Utils_Date::format($params['thankyou_date']) : NULL,
//setting to make available to hook - although seems wrong to set on form for BAO hook availability
'skipLineItem' => $params['skipLineItem'] ?? 0,
], $contributionParams);
Expand Down