Title: Recurring orders hook
Last modified: August 21, 2016

---

# Recurring orders hook

 *  Resolved [Marek Železný](https://wordpress.org/support/users/igreenie/)
 * (@igreenie)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/recurring-orders-hook/)
 * Hi,
 * I have created a new meta for users which give them ability to post a set number
   of posts per set time but I want (or need) to reset the value every month/day
   based on recurring payment (PayPal).
 * After little searching, I found this [Article](http://wordpress.org/support/topic/plugin-paid-memberships-pro-recurring-billing-hook?replies=8)
   but there’s no answer to that.
 * Can you please help me on this?
 * BTW: Is it possible to test the recurring payment without sending real money?
   I couldn’t achieve that after editing payment settings (or I wrongly edited them).
 * Thanks,
    Mark
 * [https://wordpress.org/plugins/paid-memberships-pro/](https://wordpress.org/plugins/paid-memberships-pro/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Jessica Oros](https://wordpress.org/support/users/jessica-o/)
 * (@jessica-o)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/recurring-orders-hook/#post-5091217)
 * Hey Mark,
 * You could [hook into `pmpro_added_order`](http://www.paidmembershipspro.com/hook/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](http://www.paidmembershipspro.com/pricing/) 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
 *  Thread Starter [Marek Železný](https://wordpress.org/support/users/igreenie/)
 * (@igreenie)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/recurring-orders-hook/#post-5091225)
 * 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
 *  [Jessica Oros](https://wordpress.org/support/users/jessica-o/)
 * (@jessica-o)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/recurring-orders-hook/#post-5091228)
 * 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.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Recurring orders hook’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/paid-memberships-pro_f1dacb.svg)
 * [Paid Memberships Pro - Content Restriction, User Registration, & Paid Subscriptions](https://wordpress.org/plugins/paid-memberships-pro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/paid-memberships-pro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/paid-memberships-pro/)
 * [Active Topics](https://wordpress.org/support/plugin/paid-memberships-pro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/paid-memberships-pro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/paid-memberships-pro/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Jessica Oros](https://wordpress.org/support/users/jessica-o/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/recurring-orders-hook/#post-5091228)
 * Status: resolved