I’m working on a fairly complex API Notifications integration. I was testing the Notifications API using a log file. This was working prior to updating to WordPress 4.7.1. Frankly, I thought I’d broken something, but I went back to basics today, using the test code found in the s2Member KB.
The only thing I changed was adding the code below (also found in the above KB article) to write to a log file:
file_put_contents(WP_CONTENT_DIR.'/plugins/s2member-logs/my.log', 'Payment Notification Received for User ID: '.$user_id."\n", FILE_APPEND);
I know the Notifications API is firing because I’m receiving the email notification. Unfortunately, that email does not send a log of the transaction but a preformatted email. I guess I’m going to have to look for that email template and change to send the log of the transaction if I can’t figure out why the log file isn’t working. I don’t need the log file, but I need to know that my parameters are being passed…
Has anyone seen a problem like this? I don’t what would have changed with WordPress 4.7.1 to cause this , but that’s the only thing that is different between this code working on the 12th of January and not working now. All of my other log files are being written to properly which makes this all the more confusing and frustrating.
I had actually made it to a fairly complex notification before it broke…