1/** 2 * Keep the free-shipping progress banner in sync with the cart. 3 * 4 * On the cart page the banner sits outside WooCommerce's AJAX-updated totals, 5 * so when the cart changes (add / remove / quantity, on the cart page or the 6 * mini-cart) we ask WooCommerce for fresh cart fragments. That re-renders the 7 * `.thm-fsb-fragment` and `.woocommerce-mini-cart__free-shipping-message` 8 * fragments the plugin registers. Checkout refreshes itself via the order-review 9 * update, so it is intentionally not handled here. 10 */ 11( function ( $ ) { 12 if ( ! $ ) { 13 return; 14 } 15 16 $( document.body ).on( 'updated_cart_totals updated_wc_div', function () { 17 $( document.body ).trigger( 'wc_fragment_refresh' ); 18 } ); 19}( window.jQuery ) );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.