Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer

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/

http://wordpress.org/extend/plugins/paypal-framework/

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

share|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
    
Thanks, I'll check it out! –  Mike George Jul 11 '12 at 17:18
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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