fbpx
Want To Add Extra Images Per Product Variation? Download This Free Plugin

Woocomemrce swatches conflicts with Elementor side cart widget

Nawfel Oussedik

When swatches is enabled, removing items from side cart becomes impossible. Here is a screenshot:
https://snipboard.io/C5aBmd.jpg

The issue is consistent and happens on mobile only. I’ve tested with Chrome Dev Tool as well as IOS.

Hakik Zaman

Hi Nawfel,

Thanks for reaching out to us.

You seem to be experiencing the issue due to a conflict of multiple jQuery versions.

On your site, additional jQuery is being added – https://paste.pics/90f7375e9fd7fc62e2d9e2597c2ddb94

WordPress Core already offers jQuery by default so, you don’t need to enqueue it again from a CDN.

Please check your HTML code widgets of Elementor and make sure you don’t add additional jQuery CDN.

Here is a default list of JS libraries that WP offers:
https://developer.wordpress.org/reference/functions/wp_enqueue_script/#default-scripts-and-js-libraries-included-and-registered-by-wordpress

You can enqueue the built-in jQuery library like this:
wp_enqueue_script( ‘jquery’ );

Rather than:
wp_register_script( ‘jquery’, ‘https://code.jquery.com/jquery-3.6.0.js’);

Our plugin uses the built-in jQuery library of WordPress. Please remove the additional CDN for jQuery.

This should resolve the issue.

Thanks a lot