diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index 7a58a71eb2b1..694b6b346c16 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -280,16 +280,16 @@ public function preProcess() { $this->assignPremiumProduct($this->_id); $this->buildValuesAndAssignOnline_Note_Type($this->_id, $this->_values); } + if (!isset($this->_values['is_template'])) { + $this->_values['is_template'] = FALSE; + } + $this->assign('is_template', $this->_values['is_template']); // when custom data is included in this page if (!empty($_POST['hidden_custom'])) { $this->applyCustomData('Contribution', $this->getFinancialTypeID(), $this->_id); } - if (!empty($this->_values['is_template'])) { - $this->assign('is_template', TRUE); - } - $this->_lineItems = []; if ($this->_id) { if (!empty($this->_compId) && $this->_compContext === 'participant') {