Hey Mark,
You could hook into pmpro_added_order which runs immediately after an order has been created and check for the subscription transaction ID which is passed with the MemberOrder object. If there are other orders with the same subscription transaction id, that order should be a recurring payment. Does that make sense? If you need further help with this, please consider becoming a PMPro member for our member support forums.
BTW: Is it possible to test the recurring payment without sending real money?
You can test without actually paying real money by setting your Gateway Environment to Sandbox/Testing for any of the Payment Gateways in Memberships > Payment Settings. Depending on your payment gateway though, you may need to configure sandbox/developer accounts.
Does that clear things up?
Thanks,
Jess
Do you mean that everytime there’s a new order (even recurring payment from PayPal), it starts the hook pmpro_added_order and in case it already exists, then it is a recurring payment and hook probably does nothing then. Am I right? If yes, thanks.
As for sandbox testing, when I started it, I was expecting some emails which would notify me of a recurring payment, but after setting it live, only paypal sends emails so I guess I had it right. I was just unaware of it working due to no notification.
Thanks for the reply,
Mark
Sorry about the confusion – the correct hook to use would be pmpro_add_order here, so you can check for the previous order with the same subscription transaction ID.