Merge pull request #22469 from woocommerce/fix/22453

notify script plugins that the cart was emptied
This commit is contained in:
Mike Jolley 2019-01-16 16:27:33 +00:00 committed by GitHub
commit 8c32574f30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -95,6 +95,9 @@ jQuery( function( $ ) {
if ( $notices.length > 0 ) {
show_notice( $notices );
}
// Notify plugins that the cart was emptied.
$( document.body ).trigger( 'wc_cart_emptied' );
} else {
// If the checkout is also displayed on this page, trigger update event.
if ( $( '.woocommerce-checkout' ).length ) {