Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22219

    in woocommerce.php file, line 505,

    add_action( ‘wp_print_scripts’, array( $this, ‘check_jquery’ ), 25 );

    comment out this line and jQuery is unhooked, but this is a little tiring for I have to do it after every plugin update.

    Any idea how to unhook jQuery with theme functions.php file? The code provided here http://wordpress.stackexchange.com/questions/44420/unhook-jquery-from-woocommerce-via-functions-php is not working.

    #114909

    Hi!

    Try to add following line to functions.php:

    remove_action( 'wp_print_scripts', array( $GLOBALS['woocommerce'], 'check_jquery' ), 25 );

    Best regards,

    Peter

    #114910

    sadly, not work…

    #114911

    Hey!

    Then it’s not possible without editing woocommerce.php because the $this variable refers to the class instance and theoretically other developers can create hundreds of new instances with hundreds of new hooks/actions…

    Regards,

    Peter

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘How to Unhook jQuery from WooCommerce via `functions.php`?’ is closed to new replies.