Forum in maintenance, we will back soon 🙂
Wpcode-snippet
Hi, I have this error below. Can someone help me.
Cannot redeclare setApiKey() (previously declared in /home/acce/rizmweb.com/wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-snippet-execute.php(287) : eval()'d code:3)
@john-joe Can you share the code that is giving this error in order to help you?
@husein I'm trying to add a Gemini API key to the YouTube Generator. However, whenever I click the active button, I encounter an error.
Snippet has not been activated due to an error.
Please click the back button in the browser to update the snippet.
Error message:
Cannot redeclare setApiKey() (previously declared in /home/acce/rizmweb.com/wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-snippet-execute.php(287) : eval()'d code:3)
I already have an active API key, which I named "Blog Title Generator." I want to add more tool generators to my website.
@john-joe so what is happening you're giving the name of a function in two different snippets and this isn't allowed. Rename the second function setGeminiApiKey() and then use it instead of the setApiKey in the rest of the code.
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack