From 97dda7c05cfc99ca336975fdc661953449f8e345 Mon Sep 17 00:00:00 2001 From: eileen Date: Sun, 27 Sep 2020 14:14:25 +1300 Subject: [PATCH] Fix regression or back-office membership renewal by credit card Looking at the code I realised a mistake was made in https://github.com/civicrm/civicrm-core/pull/17398 whereby the actual membership id would not be passed through correctly --- CRM/Member/Form.php | 6 +++--- CRM/Member/Form/MembershipRenewal.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Member/Form.php b/CRM/Member/Form.php index 73f7cb46a9..3ae6973ef5 100644 --- a/CRM/Member/Form.php +++ b/CRM/Member/Form.php @@ -358,19 +358,19 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment { * * @param array $contributionRecurParams * - * @param int $membershipID + * @param int $membershipTypeID * * @return array * @throws \CiviCRM_API3_Exception */ - protected function processRecurringContribution($contributionRecurParams, $membershipID) { + protected function processRecurringContribution($contributionRecurParams, $membershipTypeID) { $mapping = [ 'frequency_interval' => 'duration_interval', 'frequency_unit' => 'duration_unit', ]; $membershipType = civicrm_api3('MembershipType', 'getsingle', [ - 'id' => $membershipID, + 'id' => $membershipTypeID, 'return' => $mapping, ]); diff --git a/CRM/Member/Form/MembershipRenewal.php b/CRM/Member/Form/MembershipRenewal.php index 162ca1cc61..908e51adc9 100644 --- a/CRM/Member/Form/MembershipRenewal.php +++ b/CRM/Member/Form/MembershipRenewal.php @@ -553,7 +553,7 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form { 'is_email_receipt' => !empty($this->_params['send_receipt']), 'payment_instrument_id' => $this->_params['payment_instrument_id'], 'invoice_id' => $this->_params['invoice_id'], - ], $membershipID = $paymentParams['membership_type_id'][1]); + ], $paymentParams['membership_type_id'][1]); $contributionRecurID = $contributionRecurParams['contributionRecurID']; $paymentParams = array_merge($paymentParams, $contributionRecurParams); -- 2.25.1