New credit card icons cause error in existing site

Created on 2 December 2021, almost 4 years ago
Updated 18 August 2025, 18 days ago

After applying the latest version with the new card icons (which are very nice), I got the following error in checkout:

Notice: Undefined index: enable_credit_card_icons in commerce_stripe_form_commerce_checkout_form_alter() (line 2004 of /.../sites/all/modules/commerce_stripe/commerce_stripe.module).

This appears to be related to this recently closed issue. https://www.drupal.org/project/commerce_stripe/issues/2373361 β†’

All I had to do was visit the stripe payment method config and save it and the error went away. I assume we need to be either setting that setting a value for that variable with a database update or just checking to make sure it exists and not just that it is empty in commerce_stripe.module line 2004 (currently)

 if (!$form['commerce_payment']['payment_methods']['#value'][$key]['settings']['enable_credit_card_icons']) {
   continue;
 }
πŸ› Bug report
Status

Closed: outdated

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States maddentim

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