yan-k
4/12/2017 - 8:25 AM

WooCommerce Optimization: Dequeue wc-cart-fragments on frontpage

WooCommerce Optimization: Dequeue wc-cart-fragments on frontpage

<?php

/**
 * Experimental WooCommerce Optimization
 */
add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_cart_fragments', 11);
function dequeue_woocommerce_cart_fragments() { if (is_front_page()) wp_dequeue_script('wc-cart-fragments'); }