Skip to content

Forum in maintenance, we will back soon 🙂

Notifications
Clear all

Wpcode-snippet

4 Posts
3 Users
2 Reactions
181 Views
(@john-joe)
Posts: 10
Eminent Member Customer
Topic starter
 

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)
 
Posted : 04/05/2024 5:47 am
(@husein)
Posts: 532
Member Moderator
 

@john-joe Can you share the code that is giving this error in order to help you?

 
Posted : 04/05/2024 7:38 am
(@john-joe)
Posts: 10
Eminent Member Customer
Topic starter
 

@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.

This post was modified 8 months ago by John Joe
 
Posted : 04/05/2024 4:46 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@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

 
Posted : 04/05/2024 9:31 pm
Share: