Merge pull request #28101 from dominic-ks/add-data-to-checkout_error

add error messages to checkout_error event
This commit is contained in:
Néstor Soriano 2020-10-29 16:24:23 +01:00 committed by GitHub
commit 6cebaa6f68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -563,7 +563,7 @@ jQuery( function( $ ) {
wc_checkout_form.$checkout_form.removeClass( 'processing' ).unblock();
wc_checkout_form.$checkout_form.find( '.input-text, select, input:checkbox' ).trigger( 'validate' ).blur();
wc_checkout_form.scroll_to_notices();
$( document.body ).trigger( 'checkout_error' );
$( document.body ).trigger( 'checkout_error' , [ error_message ] );
},
scroll_to_notices: function() {
var scrollElement = $( '.woocommerce-NoticeGroup-updateOrderReview, .woocommerce-NoticeGroup-checkout' );