Hooking into PayPal-IPN processing
-
Hello all – I need to be able to automatically take some actions when a successful IPN has been received. Looking into the paypal-ipn code in this plugin I had thought it would be a simple matter to hook to ‘post_updated’ and grab the info I needed. Unfortunately, the data I need i.e. the actual paypal response is included as a string (the output of a print_r(). Ugh. So then I tried hooking ‘updated_meta’ to watch for the keys when called in paypal-ipn.php. But my add_action is not firing. Any suggestions on how to hook to the order completion process? I just can’t manually check the Order page.
The working add_action code looks like this:
function hmm_grab_update_hook($post_id,$after,$before) { // do stuff } add_action('post_updated','hmm_grab_update_hook',12,3);
but $after->post_content is a string rather than an object or even json so other than manually parsing… Not attractive.
The non-working code looks like:
function hmm_update_meta_hook($meta_id,$post_id,$meta_key,$meta_value){ // do stuff (if I ever got called!) } add_action('updated_post_meta','hmm_update_meta_hook',10,4);
Could really use some help here!
Thanks!
Andy
- The topic ‘Hooking into PayPal-IPN processing’ is closed to new replies.