Home › Forums › WoodMart support forum › WoodMart 8.6.6 —Elementor errors involving getCartData and wc_variation_form

WoodMart 8.6.6 —Elementor errors involving getCartData and wc_variation_form

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

    balazs
    Participant

    Hello,

    I’m experiencing two JavaScript errors in Elementor editing mode on.

    The latest console screenshot shows:

    – WoodMart script version: **8.6.6**
    – Elementor script version: **4.3.5**

    **1. Cart-store initialization crashes**

    The error is:

    `text
    TypeError: o is undefined
    `

    It occurs when WoodMart calls:

    `javascript
    o.getCartData()
    `

    Inside:

    `text
    wp-content/themes/woodmart/js/scripts/combine.min.js
    `

    The code checks whether window.wp.data exists, but assumes that selecting wc/store/cart returns an available store. When it returns undefined, the initialization crashes.

    The subscription callback also assumes the cart store is available.

    A temporary correction added checks before accessing getCartData() in both locations. The earlier correction resolved this issue in my editor, but updating WoodMart overwrote the change and the error returned, including with browser caching disabled.

    The latest corrected copy passed syntax validation and nine focused local checks, including missing-store scenarios and existing cart-update behavior.

    An additional error:

    `text
    woodmartThemeModule.accordion is not a function
    `

    appears to follow the cart-store crash, potentially because execution stops before the accordion function is defined later in the bundle.

    **2. WooCommerce variation initialization still fails**

    The current screenshot confirms:

    `text
    Uncaught TypeError: e(…).wc_variation_form is not a function
    `

    The reported location is:

    `text
    combine.min.js:1:48587
    `

    This matches WoodMart’s Elementor callback for:

    `text
    frontend/element_ready/wd_single_product_add_to_cart.default
    `

    The callback calls:

    `javascript
    t.find(“.variations_form”).each(function () {
    e(this).wc_variation_form();
    });
    `

    At that moment, wc_variation_form is unavailable on the jQuery instance being used.

    This error remains unresolved. Please investigate whether the required WooCommerce variation script is missing, failing to execute, or loading after the widget initialization.

    Could you provide an official patch addressing both the cart-store availability checks and the variation-script dependency or initialization order in Elementor previews?

    Thank you.

    #731413

    Serg Sokhatskyi
    Keymaster
    Xtemos team

    Hi there,

    Thanks for the detailed report and for looking into it so closely.

    To investigate both errors, we first need to see them on your site. Please send us:

    – a link to the page where the errors appear, or
    – step-by-step instructions for reproducing them, e.g. which page or template you open in Elementor and which widgets it contains (such as the single product “Add to cart” widget on a variable product).

    If we need to open the Elementor editor to see the errors, please also include WordPress admin access in the Private Content field.

    Once we can reproduce the issue, we’ll look into it and let you know how to fix it.

    Kind regards,
    XTemos Studio

    #731415

    balazs
    Participant

    Hi there,
    It is in Elementor editor mode and is affecting the Products (grid or carousel) and Images gallery anywhere on pages, or layouts.
    You can open Single product layout (Backup), the screenshot it was taken on this layout.
    In private shared temporary login and screenshot also the modified combine.min.js by chatgpt which solved the issues.
    I recopied the woodmart theme 8.6.6 original combine.min.js file so to be easier to inspect the issue.
    Thank you!

    Attachments:
    You must be logged in to view attached files.
Viewing 3 posts - 1 through 3 (of 3 total)