Remove assignments for template that are not needed for updated template
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 20 Nov 2023 21:02:21 +0000 (10:02 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 20 Nov 2023 21:02:21 +0000 (10:02 +1300)
CRM/Contribute/Form/Contribution/Confirm.php

index c35b1d809b29ad693c796c0a9fd2f537adab7120..0266c9a7e2d9739b3bdeb512676090ffd0f12f76 100644 (file)
@@ -1557,21 +1557,8 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
           $this->_values['membership_id'] = $membership->id;
         }
       }
-      if ($this->_priceSetId && !empty($this->_useForMember) && !empty($this->_lineItem)) {
-        foreach ($this->_lineItem[$this->_priceSetId] as & $priceFieldOp) {
-          if (!empty($priceFieldOp['membership_type_id']) && $membership->membership_type_id == $priceFieldOp['membership_type_id']) {
-            $membershipOb = $membership;
-            $priceFieldOp['start_date'] = $membershipOb->start_date ? CRM_Utils_Date::formatDateOnlyLong($membershipOb->start_date) : '-';
-            $priceFieldOp['end_date'] = $membershipOb->end_date ? CRM_Utils_Date::formatDateOnlyLong($membershipOb->end_date) : '-';
-          }
-          else {
-            $priceFieldOp['start_date'] = $priceFieldOp['end_date'] = 'N/A';
-          }
-        }
-        $this->_values['lineItem'] = $this->_lineItem;
-        $this->assign('lineItem', $this->_lineItem);
-      }
     }
+    $this->assign('lineItem', $this->isQuickConfig() ? NULL : $this->getLineItems());
 
     if (!empty($errors)) {
       $message = $this->compileErrorMessage($errors);
@@ -2663,12 +2650,6 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
         $form->_params['source'] = $paymentParams['contribution_source'];
       }
 
-      // get the price set values for receipt.
-      if ($form->_priceSetId && $form->_lineItem) {
-        $form->_values['lineItem'] = $form->_lineItem;
-        $form->_values['priceSetID'] = $form->_priceSetId;
-      }
-
       $form->_values['contribution_id'] = $contribution->id;
       $form->_values['contribution_page_id'] = $contribution->contribution_page_id;