From 7465a20d0d9b2a2d70738bab7f55fc095dd3b9d3 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 18 May 2023 17:59:07 +1200 Subject: [PATCH] Stop assigning variables removed from core templates in 2019 These were removed back in 2019. They were there to control whether billingName showed up - which would not be the worst thing for any sites that had not touched their templates in 4 years but I added a prompt to the 2 relevant templates if they ARE still there https://github.com/civicrm/civicrm-core/commit/c6c66ed70bdb125304c395a9655505801145ec3b --- CRM/Event/Form/Participant.php | 5 ----- CRM/Event/Form/ParticipantFeeSelection.php | 1 - CRM/Financial/BAO/Payment.php | 1 - CRM/Member/Form/MembershipRenewal.php | 3 +-- CRM/Utils/Token.php | 5 +++++ 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index a91a7e6cff..4c7df30bd2 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -2120,7 +2120,6 @@ INNER JOIN civicrm_price_field_value value ON ( value.id = lineItem.price_field_ $notSent = []; $this->assign('module', 'Event Registration'); $this->assignEventDetailsToTpl($params['event_id'], CRM_Utils_Array::value('role_id', $params), CRM_Utils_Array::value('receipt_text', $params), $this->_isPaidEvent); - $this->assign('isAmountzero', 1); if ($this->_isPaidEvent) { $paymentInstrument = CRM_Contribute_PseudoConstant::paymentInstrument(); @@ -2147,10 +2146,6 @@ INNER JOIN civicrm_price_field_value value ON ( value.id = lineItem.price_field_ $valuesForForm = CRM_Contribute_Form_AbstractEditPayment::formatCreditCardDetails($params); $this->assignVariables($valuesForForm, ['credit_card_exp_date', 'credit_card_type', 'credit_card_number']); - - // The concept of contributeMode is deprecated. - $this->assign('contributeMode', 'direct'); - $this->assign('isAmountzero', 0); $this->assign('is_pay_later', 0); $this->assign('isPrimary', 1); } diff --git a/CRM/Event/Form/ParticipantFeeSelection.php b/CRM/Event/Form/ParticipantFeeSelection.php index 18941b4911..98378855d7 100644 --- a/CRM/Event/Form/ParticipantFeeSelection.php +++ b/CRM/Event/Form/ParticipantFeeSelection.php @@ -307,7 +307,6 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form { $event['confirm_email_text'] = $params['receipt_text']; } - $this->assign('isAmountzero', 1); $this->assign('event', $event); $this->assign('isShowLocation', $event['is_show_location']); diff --git a/CRM/Financial/BAO/Payment.php b/CRM/Financial/BAO/Payment.php index 2611cba99e..267a308264 100644 --- a/CRM/Financial/BAO/Payment.php +++ b/CRM/Financial/BAO/Payment.php @@ -443,7 +443,6 @@ class CRM_Financial_BAO_Payment { 'isShowLocation', 'location', 'isRefund', - 'isAmountzero', 'refundAmount', 'totalPaid', 'paymentsComplete', diff --git a/CRM/Member/Form/MembershipRenewal.php b/CRM/Member/Form/MembershipRenewal.php index 234554193f..03d07796c9 100644 --- a/CRM/Member/Form/MembershipRenewal.php +++ b/CRM/Member/Form/MembershipRenewal.php @@ -684,8 +684,7 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form { $this->_params, $this->_bltID )); - $this->assign('contributeMode', 'direct'); - $this->assign('isAmountzero', 0); + $this->assign('is_pay_later', 0); $this->assign('isPrimary', 1); if ($this->_mode === 'test') { diff --git a/CRM/Utils/Token.php b/CRM/Utils/Token.php index f29df131b7..4101d9be3c 100644 --- a/CRM/Utils/Token.php +++ b/CRM/Utils/Token.php @@ -1766,6 +1766,11 @@ class CRM_Utils_Token { 'membership_offline_receipt' => [ // receipt_text_renewal appears to be long gone. 'receipt_text_renewal' => 'receipt_text', + '$isAmountZero' => 'no longer available / relevant', + ], + 'event_offline_receipt' => [ + '$contributeMode' => 'no longer available / relevant', + '$isAmountZero' => 'no longer available / relevant', ], 'pledge_acknowledgement' => [ '$domain' => 'no longer available / relevant', -- 2.25.1