summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/3rd-party/woocommerce.php')
-rw-r--r--plugins/jetpack/3rd-party/woocommerce.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/jetpack/3rd-party/woocommerce.php b/plugins/jetpack/3rd-party/woocommerce.php
index 5245e906..78a307b6 100644
--- a/plugins/jetpack/3rd-party/woocommerce.php
+++ b/plugins/jetpack/3rd-party/woocommerce.php
@@ -93,3 +93,13 @@ function jetpack_woocommerce_infinite_scroll_style() {
}";
wp_add_inline_style( 'woocommerce-layout', $custom_css );
}
+
+function jetpack_woocommerce_lazy_images_compat() {
+ wp_add_inline_script( 'wc-cart-fragments', "
+ jQuery( 'body' ).bind( 'wc_fragments_refreshed', function() {
+ jQuery( 'body' ).trigger( 'jetpack-lazy-images-load' );
+ } );
+ " );
+}
+
+add_action( 'wp_enqueue_scripts', 'jetpack_woocommerce_lazy_images_compat', 11 );