• Resolved Mickael Maury

    (@mickaelmaury)


    Hello,

    I am reporting a JavaScript conflict related to Variation Swatches for WooCommerce (v2.2.3).Environment

    • WordPress: 6.9.1
    • WooCommerce: 10.5.2
    • PHP: 8.3
    • Theme: Salient 17.0.6
    • Browser affected: Google Chrome (latest version)
    • Not reproducible in: Safari / Firefox

    Issue Description

    When the plugin is active, selecting a product variation on variable products triggers the following JavaScript error in Chrome:

    Uncaught TypeError: Cannot read properties of undefined (reading 'template') at wp-util.js at VariationForm.onFoundVariation (add-to-cart-variation.js)

    The error occurs during the found_variation event triggered by WooCommerce’s native add-to-cart-variation.js.

    As a result:

    • The variation price and availability are not properly rendered.
    • WooCommerce fails to recognize the selected variation.
    • Customers see the message:
      “Please select product options before adding this product to your cart.”
    • The product cannot be added to cart.

    Important Observation

    If the plugin is disabled:

    • The error disappears immediately.
    • Variation selection works normally.
    • Add to cart works correctly in all browsers.

    This strongly indicates a JavaScript conflict introduced by the plugin when handling WooCommerce’s variation-template.

    It appears that the plugin may be overriding or interfering with WooCommerce’s internal wp.template('variation-template'), which becomes undefined in Chrome and stops script execution.Request

    Could you please:

    • Confirm compatibility with WooCommerce 10.5.2?
    • Verify handling of the found_variation event?
    • Check if the plugin correctly loads and preserves WooCommerce’s variation-template?

    Let me know if you need additional logs or a staging environment for testing.

    Thank you.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.