From f6a42e55ac939e3533befb84b427e5a5230085d0 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 23 Jun 2016 13:47:24 +0100 Subject: [PATCH] Remove all notices on fail --- assets/js/frontend/checkout.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/js/frontend/checkout.js b/assets/js/frontend/checkout.js index 061094191eb..f35a856c467 100644 --- a/assets/js/frontend/checkout.js +++ b/assets/js/frontend/checkout.js @@ -300,6 +300,9 @@ jQuery( function( $ ) { var $form = $( 'form.checkout' ); + // Remove notices from all sources + $( '.woocommerce-error, .woocommerce-message' ).remove(); + // Add new errors returned by this event if ( data.messages ) { $form.prepend( '
' + data.messages + '
' );