woocommerce / theme-customisations

313 stars 112 forks source link

can't activate 2 copies of this plugin at the same time #16

Closed siutz closed 7 years ago

siutz commented 7 years ago

Hi can anyone help please? I have two copies of this plugin. I have one of these plugins active (with part of my custom css). I want to activate the second plugin with the rest of my custom css (trying to separate my theme css from my woocommerce css), but I get this fatal error:

Fatal error: Cannot redeclare theme_customisations_main() (previously declared in /home/content/33/8318333/html/wp-content/plugins/GALLERIA-customisations-master/theme-customisations.php:111) in /home/content/33/8318333/html/wp-content/plugins/WOOCOMMERCE-MY-customisations-master/theme-customisations.php on line 112

I'm guessing this is a simple fix? - do I need to change a line or add a word to make these plugins render as different plugins? Please help. :)

jameskoster commented 7 years ago

That error is caused because you're declaring the same function in both of the plugins. Just make sure all your functions names are unique and you should be good :)

siutz commented 7 years ago

Hi James thankyou for getting back to me. Sorry to bother you again but I'm not great with PHP. Can you give me the line to change & what to rename it. I can get into php no worries but need to know what to put there. Kind regards Garry

Sent from my iPhone

On 13 Feb 2017, at 22:31, James Koster notifications@github.com wrote:

That error is caused because you're declaring the same function in both of the plugins. Just make sure all your functions names are unique and you should be good :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

jameskoster commented 7 years ago

Hey,

If you read the error it actually tells you what line to look at :)