Remove notices once only

Closes #12182
This commit is contained in:
Mike Jolley 2016-10-26 17:24:35 +01:00
parent 0c1e531091
commit 11689b244c
2 changed files with 3 additions and 2 deletions

View File

@ -140,7 +140,6 @@ jQuery( function( $ ) {
if ( ! $target ) {
$target = $( '.shop_table.cart' ).closest( 'form' );
}
$( '.woocommerce-error, .woocommerce-message, .woocommerce-info' ).remove();
$target.before( html_element );
};
@ -443,6 +442,7 @@ jQuery( function( $ ) {
data: data,
dataType: 'html',
success: function( response ) {
$( '.woocommerce-error, .woocommerce-message, .woocommerce-info' ).remove();
show_notice( response );
$( document.body ).trigger( 'applied_coupon' );
},
@ -479,6 +479,7 @@ jQuery( function( $ ) {
data: data,
dataType: 'html',
success: function( response ) {
$( '.woocommerce-error, .woocommerce-message, .woocommerce-info' ).remove();
show_notice( response );
$( document.body ).trigger( 'removed_coupon' );
unblock( $tr.parents( 'table' ) );

File diff suppressed because one or more lines are too long