Skip to content

Commit fe163d5

Browse files
committed
Issue #3002248: Hide the expiration date for non-reusable payment methods
1 parent 6a98afc commit fe163d5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/payment/templates/commerce-payment-method--credit-card.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{{ payment_method.label }}
2424
<span class="payment-method-icon payment-method-icon--{{ payment_method_entity.card_type.value }}"></span>
2525
</div>
26-
{% if payment_method_entity.expiresTime %}
26+
{% if payment_method_entity.isReusable and payment_method_entity.expiresTime %}
2727
<div class="field field--name-expires">
2828
{{ 'Expires'|t }} {{ payment_method_entity.expiresTime|format_date('custom', 'n/Y') }}
2929
</div>

modules/payment/templates/commerce-payment-method.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<div class="field field--name-label">
2323
{{ payment_method.label }}
2424
</div>
25-
{% if payment_method_entity.expiresTime %}
25+
{% if payment_method_entity.isReusable and payment_method_entity.expiresTime %}
2626
<div class="field field--name-expires">
2727
{{ 'Expires'|t }} {{ payment_method_entity.expiresTime|format_date('custom', 'n/Y') }}
2828
</div>

0 commit comments

Comments
 (0)