I created this code around summer time using Wix Code Resources. It worked perfectly, but now, it is only working in Preview mode and not on Live site. I have double checked the permissions. They should be fine. I feel like it has something to do with async functions.
When it works on preview,
When it doesn't work on live site,
The URL is the following,