Skip to content

Forum in maintenance, we will back soon 🙂

Hook generator trou...
 
Notifications
Clear all

Hook generator trouble...

3 Posts
3 Users
2 Reactions
148 Views
(@alfredo-gimbuta)
Posts: 12
Eminent Member Customer Registered
Topic starter
 

I followed all the step, in the video. Even I took your code. 

I verified my PHP function to connect to OpenAI and is working!!

 

But when I got to java script I GOT STUCK

I've added: "

// Add CORS headers
     header('Access-Control-Allow-Origin: *'); // Allows all origins
     header('Access-Control-Allow-Methods: GET, POST, OPTIONS'); // Specifies the allowed methods
     header('Access-Control-Allow-Headers: Content-Type, Authorization'); // Specifies the allowed headers 

"

"// Add CORS headers
header('Access-Control-Allow-Origin: *'); // Allows all origins
header('Access-Control-Allow-Methods: GET, POST, OPTIONS'); // Specifies the allowed methods
header('Access-Control-Allow-Headers: Content-Type, Authorization'); // Specifies the allowed headers "

 to my function in PHP code snippet and still not working...

 

My web page URL is: https://claudiuudroiu.ro/hook-generator/

 

I got headache...

 

please help HASAN!

 

THANK YOU!!

This topic was modified 6 months ago 2 times by Alfredo GIMBUTA
 
Posted : 04/05/2024 6:21 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

Your script.js file isn't being located in the file system. You should move it to the wp-includes/js/ directory.

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 04/05/2024 9:22 pm
Hasan Aboul Hasan
(@admin)
Posts: 1219
Member Admin
 

Did you add the JS Snippet with the HTML and CSS? 

and make sure to change the URL to your site in the snippet

 
Posted : 04/06/2024 8:37 am
Share: