notify script plugins that the cart was emptied

This commit is contained in:
Ron Rennick 2019-01-15 14:44:28 -04:00
parent 507f67cb38
commit 3fae170c14
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( 'updated_cart_emptied' );
} else {
// If the checkout is also displayed on this page, trigger update event.
if ( $( '.woocommerce-checkout' ).length ) {