I'm currently writing a plugin that requires the PayPal IPN, since the IPN is not inside the main plugin file, I have no way to use $wpdb. If you know a way to do this that will work with all WordPress installations it would really help me!

Thanks in advance!


Use the ajax api: http://codex.wordpress.org/AJAX_in_Plugins

If you let all your ajax calls go through this you will have access to all WP functions.

Also take a look at these: http://www.james-vandyne.com/process-paypal-ipn-requests-through-wordpress/


Don't know if what you want is in there, but worth a look.

| improve this answer | |
  • Yeah, I could convert my ajax loads to use this method, I am using this method with other ajax calls but the main problem is the PayPal IPN, I have to get the results back from paypal, then post to the database. – Mike George Jul 11 '12 at 16:33
  • I see, I added 2 more links. Your question is much clearer now – janw Jul 11 '12 at 17:17
  • I believe I've read the article at james-vandyne.com the only problem I have with that is it requires url rewriting. – Mike George Jul 11 '12 at 17:20
  • 1
    The process can be much simplified by just using the INIT hook and checking for a $_GET variable. – Pippin Jul 11 '12 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.