Hello. I am having a Wordpress admin panel crash over what appears to be a plugin function naming conflict.
Background: We have two very similar Wordpress installs (both version 3.8.1) that use WooCommerce Customer/Order XML Export Suite plugin. On one of them, everything works just fine … we have no issues which is why I know these plugins can play well together. That’s the only reason I mention the first install …
The other install is where we have some issues. We lose the admin panel as soon as the XML Export Suite is activated on this one, so I’m pretty sure we just have a conflict here … not between the two sites themselves, but just on this second install between it’s own plugins. Here’s the error log from our host:
[error] [client 66.162.212.19] PHP Fatal error: Cannot redeclare woocommerce_admin_fields() in /nas/wp/www/cluster-1279/courses2/wp-content/plugins/woocommerce/includes/admin/wc-admin-functions.php on line 101.
I’m no PHP pro, but doesn’t this refer to function naming conflicts? That would certainly cause something like this to happen …
How does someone with limited PHP exposure manually edit the functions.php file to alleviate this? This theme (Tyrion) doesn’t have anything in the functions.php file except an include for function-core.php …
You are correct in the function naming conflicts- however; it might be an easy fix if they function does the same thing. You could just remove the function from the plugin file- but of course, only if the function is exactly the same as the naming conflict function. The other alternative is to rename the function and change every occurrence of it being called inside the plugin- which is difficult if you’re not sure what the function is used for.
My guess is that they are not the same functions because the conflict is most likely coming from another vendors plugin, so that would really be a coincidence …
Let’s assume I have to rename all of these by hand. I know there is the core functions file that came with the plugin where I would need to wrap the functions in a class. But then I would also need to edit these function names where they are called as well. How do I locate all the calls to the functions page? Having never done this before I’m a little lost on where to begin.