Search

jQuery.cookie.js/jQuery.cookie.min.js scripts fail to load

This issue is a hosting one. It comes from an out dated MOD_SECURITY core ruleset, more information here

The BEST option is to get your host to update the rule set. Contact your hosting provider for assistance with this.

Please change the following filenames:


wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery.cookie.js
wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery.cookie.min.js

TO


wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery_cookie.js
wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery_cookie.min.js

And add the following to your theme functions.php file


add_action( 'wp_enqueue_scripts', 'custom_frontend_scripts' );

function custom_frontend_scripts() {

global $post, $woocommerce;

$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
wp_deregister_script( 'jquery-cookie' );
wp_register_script( 'jquery-cookie', $woocommerce->plugin_url() . '/assets/js/jquery-cookie/jquery_cookie' . $suffix . '.js', array( 'jquery' ), '1.3.1', true );

}

If you can not do that then you will need to use the plugin below.

Download
Back to the top