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
</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}
{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}