I ran my website on Google Developer tools using the mobile view and have the same problem.
Here is the error it returns: gallery:1 XMLHttpRequest cannot load https://jamiruebelphotography.000webhostapp.com/wp-admin/admin-ajax.php?gallery_id=1&image_id=1570540968315145180_5605738709. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://jamiruebelphotography.000webhostapp.com’ is therefore not allowed access.
I was able to resolve this myself luckily. For those of you who have similar issues here was my solution:
in my .htaccess I added
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
And in my functions.php I have
//Used for mobile application login
function wo_cors_check_and_response(){
if ($_SERVER['REQUEST_METHOD'] == "OPTIONS") {
header('Access-Control-Allow-Methods: POST, GET');
header('Access-Control-Allow-Headers: Authorization');
header('Access-Control-Max-Age: 1'); //1728000
header("Content-Length: 0");
header("Content-Type: text/plain charset=UTF-8");
exit(0);
}
}
add_action('wo_before_api', 'wo_cors_check_and_response');
Hello, @thelaakgroup!
Thank you for your time posting about this problem and sharing the solution! We appreciate your contribution to the plugin and WordPress community.
I have forwarded your notes to our development team. In case it will be necessary to modify the plugin to prevent the issue, they will release an update with a fix.
Thanks again! Have a wonderful day!