Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Why is wjecf-free-products.js needed on every page load?
Hi, Why is wjecf-free-products.js needed on every product page load? Shouldn’t this only be needed on the cart and checkout page?
I’m just debugging a case of too many scripts and too many ajax calls and wondering if I can suppress this script safely..
Yeah, I guess you can unload it for non-cart/checkout pages.
done as:
if ( (!is_cart()) && ( !is_checkout()) ){ wp_dequeue_style('wjecf-style'); wp_dequeue_script('wjecf-free-products'); }
though it would be more efficient to change the code to not enqueue them where not needed…