My ajax function in wordpress php file:
jQuery.ajax({
url: 'https://example.com/something/dothis.php',
dataType: 'json',
method: 'POST',
data: {...},
complete: function(data) {
// doing stuffs
}
});
The url is for some reason converted to http://example.com/something/dothis.php when ajax tries to do the POST request, and obviosuly it's blocked since the site is using https. I can't find anything on Google about this issue.
What on earth could be causing this?