Skip to content

Commit

Permalink
Use class identifier to get selected payment method element.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulkirspuu committed Dec 5, 2023
1 parent 58e2f12 commit 3fd3b86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/stripe.js
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ jQuery( function( $ ) {
*/
onError: function( e, result ) {
var message = result.error.message;
var selectedMethodElement = wc_stripe_form.getSelectedPaymentElement().closest( 'li' );
var selectedMethodElement = wc_stripe_form.getSelectedPaymentElement().closest( '.wc_payment_method' );
var savedTokens = selectedMethodElement.find( '.woocommerce-SavedPaymentMethods-tokenInput' );
var errorContainer;

Expand Down

0 comments on commit 3fd3b86

Please sign in to comment.