• Hi I am trying to add this script using your plugin instead of functions.php

    /** Disable Ajax Call from WooCommerce on front page and posts*/
    add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_cart_fragments', 11);
    function dequeue_woocommerce_cart_fragments() {
    if (is_front_page() || is_single() ) wp_dequeue_script('wc-cart-fragments');
    }

    I get an error add_action is not defined

    Thanks for any help

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘add_action is not defined’ is closed to new replies.