参考:https://wordpress.org/support/topic/whats-the-cause-of-this-cannot-redeclare-error/
I’d suggest you to check if the function exists. If it doesn’t, then define it.
E.g:
if (!function_exists(‘name_of_your_function’)){ function name_of_your_function(){ //your code } }