Hello, bear with me for a brief paragraph describing my situation. I promise there's a question after that.
I'm using Zapier, a service that let's you hook some actions in one application and trigger some reaction in others. For example, they have a "subscribe user to mailchimp list on successful paypal transaction" and it works great. They provide you with a url that you can use as your IPN listener... and there's the problem. I want EDD to process the IPNs for obvious reasons.
The only solution I found was to add a bit of extra code at the end of the
edd_process_paypal_ipn() function (the file is
paypal-standard.php. Down there, I still have access to
$encoded_data_array and can use it to form a custom
$remote_post_vars and send it to zapier's url. It works. EDD gets to process the IPN and zapier gets to have its own copy in case the transaction was successful.
Here's the thing, though. That's the only place I found to make the change, so after every update I have to go back and re-apply the change. It would be great if I can have my little bit of code separately (as a plugin or in functions.php) that hooks an action on a successful transaction.
Would this be possible? Or maybe it already is and I'm missing something?
BTW, this was the solution that first came to mind, but I accept opinions on whether there are better options that don't require this little modification.