Fix a regression in the Card Element Stripe Review pane JavaScript when Ajax refreshes regenerate button IDs

Created on 3 August 2023, 11 months ago
Updated 5 October 2023, 9 months ago

Problem/Motivation

The stripe review js requires a button id to be provided in the drupal settings. When a form is ajax updated all button ids are appended with a random string (like --ycLZStqFOTA) which means an exact id comparison fails.

This used to be supported, but was (probably accidentally) removed in Drupal 10 updates ( πŸ› Checkout form Issues Fixed )

Proposed resolution

Bring back the code to wildcard the button id with a "attribute starts with" selector (https://api.jquery.com/attribute-starts-with-selector/) as it was previously.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Card Element

Created by

πŸ‡¬πŸ‡§United Kingdom yanniboi

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

Comments & Activities

Production build 0.69.0 2024