From 1d76102395cbc5cef745a47ed1a21c494d4e38ad Mon Sep 17 00:00:00 2001 From: Florian Ludwig Date: Tue, 14 Aug 2018 12:25:29 +0200 Subject: [PATCH] Adds error event trigger for erroneous fragment retrieval (timeout or server error) --- assets/js/frontend/cart-fragments.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/js/frontend/cart-fragments.js b/assets/js/frontend/cart-fragments.js index eb0dd258b76..865f353049a 100644 --- a/assets/js/frontend/cart-fragments.js +++ b/assets/js/frontend/cart-fragments.js @@ -57,6 +57,9 @@ jQuery( function( $ ) { $( document.body ).trigger( 'wc_fragments_refreshed' ); } + }, + error: function() { + $( document.body ).trigger( 'wc_fragments_ajax_error' ); } };