Plugin conflict due to bad global function name
-
Hi there, this plugin is conflicting with another plugin that we use (Product Video Gallery for Woocommerce) due to a global function name conflict in the JavaScript.
Both plugins create a function called
getParameterByName
, but with a different parameter order. This breaks the product video galleries because your plugin takes priority and overwrites their function.I’ve reported it to that plugin’s developer as well, but this is ideally something that should be fixed in both plugins. Global functions, especially ones with common names like
getParameterByName
, need to be either turned into class functions so that they don’t clash with other scripts or be given a prefix so that they look something likehafeGetParameterByName
.In your case, the function is defined in
admin/js/admin.min.js
- The topic ‘Plugin conflict due to bad global function name’ is closed to new replies.