05 Sep 2014 Updated WordPress, PayPal IPN no longer works
I recently updated a client’s WordPress to 3.9.2. There was a page on that WordPress that served as the PayPal notify_url and it had been working fine up until I updated. The page simply used a shortcode that I created in the functions.php file to process the incoming PayPal parameters.
After the update, what I noticed is that when I tested the page myself, the Apache log reported that 44810 bytes were being sent to the requester (me), which is the full rendered page. And the shortcode function was running properly. I added logging at the head of the function so that I could verify that it was being called.
But when PayPal requested the page, only 16620 bytes where being sent and the shortcode function was not being called. The only difference that I could see was that I was using HTTP 1.1 and PayPal was using HTTP 1.0.
I never did figure out why the difference in response bytes. And I ran out of ideas of what to test.
So what I did instead was to implement the notify_url as a standalone PHP script and that took care of the problem. It now works fine with PayPal.
It is clear to me that there was something subtle that I was missing now that WordPress was at 3.9.2. But what it is, I have no idea.