Support » Plugin: WooCommerce » jQuery error – has not method simplePlaceholder

  • After updating to version 2.0.12 the javascript on the site stopped working.

    In the console I received and error stating there was no method simplePlaceholder.

    After taking a look at the code I found the issue is WooCommerece is using a handle for a script titled ‘jquery-placeholder’ which is a common jQuery plugin, but is actually using a modified version called ‘Simple Placeholder’.

    When another plugin or theme is using the ‘jQuery Placeholder’ plugin, they often will use the default handle ‘jquery-placeholder’ which will override the custom WooCommerce Version.

    I fixed the issue by adding the following code to the theme.

    add_action('wp_enqueue_scripts', 'wooBugsFix' );
    function wooBugsFix(){
            global $woocommerce;
            wp_enqueue_script( 'jquery-placeholder-woo', $woocommerce->plugin_url() . '/assets/js/jquery-placeholder/jquery.placeholder.js', array( 'jquery' ), $woocommerce->version, true );

    Please update the code to use a unique handle for the unique script.

    Hope this helps others with the same issue!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi Mat,

    Just as an FYI I submitted a pull request to fix this:

    Hopefully they’ll pull it in. 🙂


    Thanks BFTrick!

    Hi Matt

    Thanks for this big fix. One question though..

    “Please update the code to use a unique handle for the unique script.”

    Can you explain this a bit more? I added the function to my theme but it’s still not working. I have an ok understanding of php so just some direction would help. Thanks.

    Hi popgirl,

    That note is instructions for WooCommerce to fix the issue for everyone. By cueing up the script with a unique handle it will not override scripts being used by themes. (this would be done in core WooCommerce)

    They have released some updates since this request, so it is possible it has been fixed since then.

    At the time of starting this thread, I was able to fix the issue by adding the above code to my theme’s functions.php file.

    Hope this helps.

    Thanks for your fast reply.

    hmmm I did update woo just now, and I did add the function to my theme’s function.php file but still seeing same problem.

    Everything works fine except the ” Click here to enter your code” link. When I click it I get sent down the page a bit but there’s no place there to enter a number. Is that supposed to happen or should there be a window popup?

    FYI I copied and pasted the function code above but didn’t change anything. Should I have edited something?

    Thanks for your time. If this doesn’t work Ill have to submit a ticket with Woo.

    Hi popgirl,

    Where are you seeing the “Click here to enter your code” link?

    Do you have a link you could post, or is it on the backend?

    Hi popgirl,

    I am unable to find a “Click here to enter your code” link on that page, however I did check it out for script errors and it appears to be pretty clean.

    I’m not sure what the issue is, however it does not appear to be related to the Simple Placholder script.

    Sorry I couldn’t be more help.

    Its near the top of that page in the gray box with blue trim.

    Thats ok. Thanks for taking the time with me. I submitted a ticket with Woo so hopefully we can get it solved.

    Thanks Matt!

    Hi popgirl,

    I also have a same problem with “Click here to enter your code” link is not working. I read your problem. Please help me if you solve this problem in your theme.

    There is no js error in my browser console.

    Thanks in advance.

    Sorry hardeep123,

    I dont have an answer for you. I think we went another route on our project.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘jQuery error – has not method simplePlaceholder’ is closed to new replies.