Hide Expired CC on Checkout Payment Screen
Non-Technical Summary
We updated the checkout page so that expired credit cards no longer appear as an option when a customer is paying. Previously, expired cards showed up greyed out with an "Expired" label. Now they're hidden completely on checkout, so customers only see cards they can actually use to pay.
On the separate payment methods page (where customers manage their saved cards), expired cards still show up as before, greyed out so customers can see and update or remove them. Nothing changed there.
This was a small, low-risk update. Only one file was changed, and it only affects how expired cards are displayed, not how any other part of checkout or payment works.
Technical Summary
Scope: Modified payment_token_manager.js to hide expired payment tokens on the checkout payment step, without affecting how tokens are displayed on the payment methods management page.
Change: In processTokens(), the expired-token branch no longer builds the greyed-out row with the Expired badge and Update/Remove CTAs. Instead it hides the row using li.style.setProperty('display', 'none', 'important'). The !important flag is required because the row carries Bootstrap's d-flex utility class, which is defined with !important and would otherwise override a plain inline style.
Scoping: No route or template-level filtering was needed. The token JSON (#z_payment_token_data) this script reads from is only injected via payment_token_checkout.xml on the website_sale.payment template (the checkout page), so the script has no data to act on anywhere else, including the payment methods management page.
No backend changes: payment_token_ext.py's z_is_expired compute logic was already correct and untouched.
Files changed: payment_token_manager.js only.