Hi All,
I am having a problem with an AJAX call I have implemented on my WordPress website.
The AJAX request is calling a function in the wp-admin:
$.ajax({
type: "POST",
url: "/wp-admin/admin-ajax.php",
data: 'subscribe_action&'+str
});
The subscribe_action function uses 'curl' to get data from an other website.
When I look in firebug I see that the function is returning 0 almost all the time.
It took me a while but I discovered that it works when I login to wordpress admin in an other browser tab.
I have the impression that it has something to do with sessions and authentication.
The subscribe_action already has die(); implemented at the end.
I don't think it has something todo with the curl implementation as it is working perfectly when I am also logged in as admin.
I hope somebody can help me.
Thanks.