From 6f26e25c5d1e50f5d5dabb2e619a1953b45a4b94 Mon Sep 17 00:00:00 2001 From: Ryan Berry Date: Fri, 7 Sep 2012 14:43:58 +0800 Subject: [PATCH] Prefixing jquery-plugins script enqueue Just spent 4 hours trying to find the cause of a javascript exception, turns out the woocommerce enqueue name was the same as mine and these weren't being enqueued. "jquery-plugins" can't be uncommon so a prefix should be used to save headaches. --- woocommerce.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/woocommerce.php b/woocommerce.php index 530e1e95f27..7a1055c20e6 100644 --- a/woocommerce.php +++ b/woocommerce.php @@ -1119,7 +1119,7 @@ class Woocommerce { // Register any scipts for later use, or used as dependencies wp_register_script( 'chosen', $this->plugin_url() . '/assets/js/chosen/chosen.jquery' . $suffix . '.js', array( 'jquery' ), $this->version, true ); wp_register_script( 'jquery-ui', $this->plugin_url() . '/assets/js/jquery-ui' . $suffix . '.js', array( 'jquery' ), $this->version, true ); - wp_register_script( 'jquery-plugins', $this->plugin_url() . '/assets/js/jquery-plugins' . $suffix . '.js', array( 'jquery' ), $this->version, true ); + wp_register_script( 'wc-jquery-plugins', $this->plugin_url() . '/assets/js/jquery-plugins' . $suffix . '.js', array( 'jquery' ), $this->version, true ); wp_register_script( 'wc-add-to-cart-variation', $frontend_script_path . 'add-to-cart-variation' . $suffix . '.js', array( 'jquery' ), $this->version, true ); wp_register_script( 'wc-single-product', $frontend_script_path . 'single-product' . $suffix . '.js', array( 'jquery' ), $this->version, true );