$values = (array) $contribution;
$contributionStatus = CRM_Core_PseudoConstant::getName('CRM_Contribute_BAO_Contribution', 'contribution_status_id', $values['contribution_status_id']);
- if (!isset($this->get_template_vars()['hookDiscount'])) {
- $this->assign('hookDiscount', ['message' => '']);
- }
$this->addExpectedSmartyVariables([
+ 'hookDiscount',
'pricesetFieldsCount',
'pcp_id',
// currencySymbol maybe doesn't make sense but is probably old?
<div class="clear"></div>
</div>
-{if $hookDiscount.message}
+{if $hookDiscount && $hookDiscount.message}
<div class="crm-section hookDiscount-section">
<em>({$hookDiscount.message})</em>
</div>