I noticed there’s an ‘unexpected if’ in admin-ajax.php
The line which starts if(closedTime):
var closedTime = PWAforwpreadCookie("pwaforwp_prompt_close") if(closedTime){ var today = new Date(); ....
Is this due to a missing semi-colon; just before the if statement?
We have created a ticket for the problem you are facing. It will be solved in the next update.
here is link for the created ticket.
https://github.com/ahmedkaludi/pwa-for-wp/issues/663
Thank you @magazine3 for raising and resolving issue #663 – the latest update (v1.7.40) has resolved the error message regarding the ‘unexpected if’.
Unfortunately, I still cannot get this plugin working on my site. – I do not get the add to home banner appearing. Also the ‘Add To Home On Element Click’ (which is the main functionality that I want to get from this plugin) doesn’t work for me.
Lighthouse doesn’t give me too much to work with…I get the error messages:
Web app manifest or service worker do not meet the installability requirements
Does not register a service worker that controls page and start_url
I appreciate your help!
Can you please check it once by clearing all the caches and let me know the response once?
I’ve cleared all the caches but unfortunately still have the same problem.
I do not get the add to home banner appearing. Also the ‘Add To Home On Element Click’ (which is the main functionality that I want to get from this plugin) doesn’t work for me.
Lighthouse gives the error messages:
Web app manifest or service worker do not meet the installability requirements – No matching service worker detected
Does not register a service worker that controls page and start_url
Thanks
I’ve still not been able to get this working. Would love to be able to use this plugin. Any help would be much appreciated!
Update: Huarray, I’ve managed to get it working!
The issue was a conflict with OneSignal manual integration. – I was previously initiating the OneSignal Javascript manually (due to custom usage). If I stop doing this – i.e. comment out the code below, then this plugin works.
<script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" async=""></script>
The plugin does not conflict with the OneSignal plugin but only manual implementation of OneSignal.
Thanks!