Set alternate card as default when default is deleted

Created on 5 August 2018, about 7 years ago
Updated 18 August 2025, about 1 month ago

I'm setting this as a feature request, but personally I consider it a bug.

When a card set as "default" is deleted, no alternate card takes its place. I've never seen a site that does this... whether it is a shopping site, or a site with recurring billing such as AWS, or even paying a utility bill, *something* gets set as default if there is more than one card on file.

This is also a problem in Drupal if the customer does not realize a card must be set as default to process a subscription payment. We should not be relying on a customer to know they are supposed to do this. They can certainly change which card is default, but allowing for no default to be an option is not viable when recurring payments are concerned.

The attached patch checks if the card being deleted is the default. If so, it checks to see if any other valid cards are on file, and if so, chooses the first one available to be set as default.

Please review, thanks.

✨ Feature request
Status

Closed: outdated

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ron_s

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024