Home Forums WoodMart support forum Accordion JavaScript Issue Causing Slow Website Loading

Accordion JavaScript Issue Causing Slow Website Loading

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #702085

    idoamrani
    Participant

    Hi,

    I’m experiencing a JavaScript issue that appears to originate from the Woodmart theme (or the child theme).
    This error is causing the website to load very slowly and blocks several scripts from running properly.
    Currently, orders cannot be placed using a specific shipping method. This prevents the window from being displayed.

    Below is the exact code snippet that is executed on my site:

    js
    jQuery(function() {
    jQuery(“#accordion .vc_column-inner > .wpb_wrapper”).accordion({
    heightStyle: “content”,
    animate: false
    });
    });

    The problem is that the .accordion() function is being called even though **jQuery UI Accordion is not loaded**, which results in the following console error:

    `
    TypeError: jQuery(…).accordion is not a function
    `

    This error stops additional JavaScript from running and significantly affects page performance.

    I have tried the following steps without success:

    * Enqueuing jquery-ui-accordion manually via the child theme.
    * Adding a fallback shim to prevent the error.
    * Clearing cache (WP Rocket + Cloudflare).
    * Checking for any WPBakery accordion elements (none found).

    It seems that the theme (or a JS file loaded by the theme) is injecting the accordion initialization code automatically, even when no accordion element exists on the page.

    I would greatly appreciate your assistance, as this issue impacts site performance and front-end functionality.

    Thank you in advance for your support!

    Best regards,
    Ido

    Attachments:
    You must be logged in to view attached files.
    #702089

    Artem Temos
    Keymaster

    Hello,

    We have checked this on your website and see that this script is not related to our theme. It is added either by the installed plugins or directly into the theme code. Check the screenshot https://gyazo.com/47f5c7834b678f525811efc6865d8781

    Kind Regards

    #702091

    idoamrani
    Participant

    I really appreciate the quick response, do you know which plugin this is coming from? Can you share from which file to take the code you sent?

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