Skip to content

Commit

Permalink
Speed up display of cc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
roykho committed Jan 17, 2018
1 parent 8e0954b commit 4abafdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions assets/js/stripe.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ jQuery( function( $ ) {
$( errorContainer ).html( '<ul class="woocommerce_error woocommerce-error wc-stripe-error"><li>' + message + '</li></ul>' );
$( 'html, body' ).animate({
scrollTop: ( $( '.wc-stripe-error' ).offset().top - 200 )
}, 1000 );
}, 200 );
wc_stripe_form.unblock();
},

Expand Down Expand Up @@ -790,7 +790,7 @@ jQuery( function( $ ) {
wc_stripe_form.form.find( '.input-text, select, input:checkbox' ).blur();
$( 'html, body' ).animate({
scrollTop: ( $( 'form.checkout' ).offset().top - 100 )
}, 1000 );
}, 500 );
$( document.body ).trigger( 'checkout_error' );
wc_stripe_form.unblock();
}
Expand Down
Loading

0 comments on commit 4abafdf

Please sign in to comment.