- This topic has 1 reply, 2 voices, and was last updated 4 years, 5 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- You must be logged in to reply to this topic.
Home › Forums › UM Switcher › JS conflicts with other plugins
Hello,
I noticed conflicts in the admin panel on the product editing page after installing UM Switcher. The subscription dropdowns in WooCommerce did not work properly. Having examined the problem a bit, I found the cause of conflict situations in your plugin.
1. An outdated version of jQuery. If you assume here that jQuery may not be loaded on the page, then you can always check if that library is loaded ( !wp_script_is( 'jquery', 'enqueued' )
) and then add it via the secure wp_enqueue_script function.
2. The “$” symbol at the beginning uses not only the jQuery library. Therefore, in order not to create conflicts in the future, in WordPress uses such compatibility mode to start the script at least – jQuery(function($) {...});
or (function($) {...})(jQuery);
In one of the screenshots I showed in which file I found the problem areas, but if I’m not mistaken, these issues are in other files as well.
After I fixed these obvious things – my page began to function correctly, without errors in the browser console. But since I made adjustments to the plugin files, they will be overwritten as soon as you release the updated version. So I would appreciate you to correct these issues by your side also.
Thanks!