Remove old noticed on classic checkout when applying coupon code (#43244)
* Remove old noticed on classic checkout when applying coupon code * Remove old noticed on classic checkout when applying coupon code * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
f528361ec2
commit
0cffd32875
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: fix
|
||||
|
||||
Remove old noticed on classic checkout when applying coupon code
|
|
@ -407,7 +407,7 @@ jQuery( function( $ ) {
|
|||
var $form = $( 'form.checkout' );
|
||||
|
||||
// Remove notices from all sources
|
||||
$( '.woocommerce-error, .woocommerce-message' ).remove();
|
||||
$( '.woocommerce-error, .woocommerce-message, .is-error, .is-success' ).remove();
|
||||
|
||||
// Add new errors returned by this event
|
||||
if ( data.messages ) {
|
||||
|
@ -572,7 +572,7 @@ jQuery( function( $ ) {
|
|||
return false;
|
||||
},
|
||||
submit_error: function( error_message ) {
|
||||
$( '.woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message' ).remove();
|
||||
$( '.woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message, .is-error, .is-success' ).remove();
|
||||
wc_checkout_form.$checkout_form.prepend( '<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">' + error_message + '</div>' ); // eslint-disable-line max-len
|
||||
wc_checkout_form.$checkout_form.removeClass( 'processing' ).unblock();
|
||||
wc_checkout_form.$checkout_form.find( '.input-text, select, input:checkbox' ).trigger( 'validate' ).trigger( 'blur' );
|
||||
|
@ -626,7 +626,7 @@ jQuery( function( $ ) {
|
|||
url: wc_checkout_params.wc_ajax_url.toString().replace( '%%endpoint%%', 'apply_coupon' ),
|
||||
data: data,
|
||||
success: function( code ) {
|
||||
$( '.woocommerce-error, .woocommerce-message' ).remove();
|
||||
$( '.woocommerce-error, .woocommerce-message, .is-error, .is-success' ).remove();
|
||||
$form.removeClass( 'processing' ).unblock();
|
||||
|
||||
if ( code ) {
|
||||
|
@ -666,7 +666,7 @@ jQuery( function( $ ) {
|
|||
url: wc_checkout_params.wc_ajax_url.toString().replace( '%%endpoint%%', 'remove_coupon' ),
|
||||
data: data,
|
||||
success: function( code ) {
|
||||
$( '.woocommerce-error, .woocommerce-message' ).remove();
|
||||
$( '.woocommerce-error, .woocommerce-message, .is-error, .is-success' ).remove();
|
||||
container.removeClass( 'processing' ).unblock();
|
||||
|
||||
if ( code ) {
|
||||
|
|
Loading…
Reference in New Issue