Remove always-true empty check
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 29 Aug 2023 02:02:24 +0000 (14:02 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 29 Aug 2023 02:02:24 +0000 (14:02 +1200)
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

xml/templates/message_templates/contribution_offline_receipt_html.tpl
xml/templates/message_templates/contribution_offline_receipt_text.tpl

index 654224447aa3576fddbcd5eb239c7532a75f8fbd..afd1b830a5b2eb7bcd8e2f51caecd22cb3baa7ee 100644 (file)
       </tr>
      {/if}
 
-     {if '{contribution.payment_instrument_id}' and empty($formValues.hidden_CreditCard)}
+     {if {contribution.payment_instrument_id|boolean}}
       <tr>
        <td {$labelStyle}>
         {ts}Paid By{/ts}
index 7f5677af3517e685fd6160ef59aab190127f8192..5a82f5707cf81ba56a12471d3a3bebd8989640b4 100644 (file)
@@ -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}