Javascript fetch on wordpress plugins not working
I’m using onesignal that sends notifications but the onesignal popup is not showing and it’s giving and error. After tracking the error a noticed that the fetch method that is using the api to get the image of the popup from onesignal.
const response = await fetch(url);
the response is coming as undefined from onesignal but if I try it on different site the api works good.
The error message is : 'There was an error showing the OneSignal Slidedown: TypeError: Cannot read properties of undefined (reading 'json')'
but i have the same error when i try to sync the yoast seo
if anyone can know what is blocking this api.
Leave an answer