Include notice banner block in the notice selectors

This commit is contained in:
Gabriel Manussakis 2024-08-28 14:10:59 -03:00
parent 36b2031d90
commit f88d090396
No known key found for this signature in database
GPG Key ID: 947CCD7D22B2FD1B
1 changed files with 3 additions and 1 deletions

View File

@ -612,7 +612,9 @@ jQuery( function( $ ) {
wc_checkout_form.$checkout_form.removeClass( 'processing' ).unblock();
wc_checkout_form.$checkout_form.find( '.input-text, select, input:checkbox' ).trigger( 'validate' ).trigger( 'blur' );
wc_checkout_form.scroll_to_notices();
wc_checkout_form.$checkout_form.find( '.woocommerce-error[tabindex="-1"]' ).focus();
wc_checkout_form.$checkout_form.find(
'.woocommerce-error[tabindex="-1"], .wc-block-components-notice-banner.is-error[tabindex="-1"]' )
.focus();
$( document.body ).trigger( 'checkout_error' , [ error_message ] );
},
wrapMessagesInsideLink: function( $msgs ) {