From: Eileen McNaughton Date: Tue, 29 Aug 2023 02:02:24 +0000 (+1200) Subject: Remove always-true empty check X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=26222d74c807c39a1c4c808d37f8d2bd6877f7da;p=civicrm-core.git Remove always-true empty check Per https://github.com/civicrm/civicrm-core/pull/27192 hidden_CreditCard is always empty so the check is meaningless. The newer boolean token check is safer than the quoted string check --- diff --git a/xml/templates/message_templates/contribution_offline_receipt_html.tpl b/xml/templates/message_templates/contribution_offline_receipt_html.tpl index 654224447a..afd1b830a5 100644 --- a/xml/templates/message_templates/contribution_offline_receipt_html.tpl +++ b/xml/templates/message_templates/contribution_offline_receipt_html.tpl @@ -163,7 +163,7 @@ {/if} - {if '{contribution.payment_instrument_id}' and empty($formValues.hidden_CreditCard)} + {if {contribution.payment_instrument_id|boolean}} {ts}Paid By{/ts} diff --git a/xml/templates/message_templates/contribution_offline_receipt_text.tpl b/xml/templates/message_templates/contribution_offline_receipt_text.tpl index 7f5677af35..5a82f5707c 100644 --- a/xml/templates/message_templates/contribution_offline_receipt_text.tpl +++ b/xml/templates/message_templates/contribution_offline_receipt_text.tpl @@ -46,7 +46,7 @@ {if '{contribution.receipt_date}'} {ts}Receipt Date{/ts}: {contribution.receipt_date|crmDate:"shortdate"} {/if} -{if '{contribution.payment_instrument_id}' and empty($formValues.hidden_CreditCard)} +{if {contribution.payment_instrument_id|boolean}} {ts}Paid By{/ts}: {contribution.payment_instrument_id:label} {if '{contribution.check_number}'} {ts}Check Number{/ts}: {contribution.check_number}