From 7dd2be207e3efcc847647f1cb082e9e8fa94161c Mon Sep 17 00:00:00 2001 From: roykho Date: Fri, 21 May 2021 08:08:33 -0700 Subject: [PATCH] Fix regression of using jQuery ON when bind should be used ref #28822 --- assets/js/frontend/cart-fragments.js | 2 +- assets/js/frontend/price-slider.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/frontend/cart-fragments.js b/assets/js/frontend/cart-fragments.js index e70ad4ad36c..c5eef7b4c72 100644 --- a/assets/js/frontend/cart-fragments.js +++ b/assets/js/frontend/cart-fragments.js @@ -180,7 +180,7 @@ jQuery( function( $ ) { wp.customize.widgetsPreview.WidgetPartial ); if ( hasSelectiveRefresh ) { - wp.customize.selectiveRefresh.on( 'partial-content-rendered', function() { + wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function() { refresh_cart_fragment(); } ); } diff --git a/assets/js/frontend/price-slider.js b/assets/js/frontend/price-slider.js index 1c456527d96..2097dbae270 100644 --- a/assets/js/frontend/price-slider.js +++ b/assets/js/frontend/price-slider.js @@ -76,7 +76,7 @@ jQuery( function( $ ) { wp.customize.widgetsPreview.WidgetPartial ); if ( hasSelectiveRefresh ) { - wp.customize.selectiveRefresh.on( 'partial-content-rendered', function() { + wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function() { init_price_filter(); } ); }