• Resolved BERJAYAjstneti

    (@jstneti)


    When using WC 10.0.3 or higher and BookingWP, BeaverBuilder doesn’t work and it throws this error:

    jQuery.Deferred exception: DOMPurify is not defined ReferenceError: DOMPurify is not defined
    at HTMLSpanElement.<anonymous> (https://domain.com/wp-content/plugins/woocommerce/assets/js/jquery-tiptip/jquery.tipTip.min.js?ver=10.0.4:1:660)


    jquery.min.js?ver=3.7.1:2 Uncaught ReferenceError: DOMPurify is not defined
    at HTMLSpanElement.<anonymous> (jquery.tipTip.min.js?ver=10.0.4:1:660)

    Disabling BookingWP works. But keeping BookingWP enabled and using WC 10.0.2 also works.

    Curent hotfix is to enqueue the DOMPurify script:

    function fix_missing_dompurify_script() {
    wp_enqueue_script(
    'dompurify',
    'https://cdnjs.cloudflare.com/ajax/libs/dompurify/3.2.6/purify.min.js',
    [],
    '3.2.6',
    true
    );
    }
    add_action('admin_enqueue_scripts', 'fix_missing_dompurify_script', 5);
    add_action('wp_enqueue_scripts', 'fix_missing_dompurify_script', 5);

    WooCommerce 10.0.3 introduced DOMPurify for sanitizing tooltip content. However:

    • DOMPurify is not always enqueued when WooCommerce code that uses it is run.
    • When BookingWP triggers WC tooltip-related scripts (e.g., in admin booking/product UI),
    • And Beaver Builder uses or extends UI components via jQuery.Deferred,
    • DOMPurify is expected to exist on window, but hasn’t been defined yet — resulting in a fatal JS error.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support BERJAYAshahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thanks for sharing those details!

    To start, please update WooCommerce to the latest version (10.0.4) and check if the issue persists — as some improvements have been made that might help.

    Since the issue appears when BookingWP is active, we’d also recommend reaching out to the BookingWP plugin support team. You can ask if they’re aware of this conflict and whether they plan to release an update to ensure compatibility with the latest WooCommerce version.

    Additionally, I came across a related bug report involving DOMPurify, though it seems different from the one you’re experiencing. However, it might still be helpful to leave a comment in that GitHub thread so our developers can take a closer look or offer guidance:
    👉 https://github.com/woocommerce/woocommerce/issues/59804

    Let us know how it goes or if you hear anything back from the plugin support team!

    Plugin Support BERJAYAChris Moreira – a11n

    (@chrism245)

    I’m going to mark this as resolved, as we haven’t heard back from you in a while. Please open a new thread if you need further assistance.

    If you have a few minutes, we’d love if you could leave us a review: https://wordpress.org/support/plugin/woocommerce/reviews/

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WC 10.0.3 DOMPurify bug’ is closed to new replies.