• Hi all!
    I’m using javascript http request in my plugin, which sends requests to some php files that are part of the plugin files.
    The problem is, when accessing those files this way, session is visible but all global wordpress functions and variables are not.
    I think the reason is that request is sent directly to the files and not by the wordpress itself.
    Someone tried to use javascript http requests in his plugins?
    How can I do it the way that the request will act like the wordpress itself is sending it and that all the variables and globals will be seen?

    Example: ABSPATH gets the path of the wordpress root in normal way, but
    gets value “ABSPATH” when try to read it when dealing with http request action.

    Thanks ahead for help!

  • The topic ‘using javascript httpRequest method post in plugin’ is closed to new replies.