I would like to know how can I trigger the auto promote of the waiting list if I change the status of the unpaid registrations to canceled with a external script (PHP)?
If you have another suggestion regarding the automation of the waiting list in what concerns the unpaid pending payment I would really appreciate your advise!
Short of doing this for you (which we can’t do on the forums) I’m not sure what we can help with.
Assuming you have access to the waitlist add-on you can view exactly how that add-on triggers auto promotion as it stands and work from there.
Currently, the add-on hooks into AHEE__EE_Event__perform_sold_out_status_check__end and performs the calculations to determine if any registrations should be promoted on the event from that.
What I would look into (and I’m not sure if it will work as I haven’t tested it) is hooking into AHEE__EE_Registration__set_status__after_update. That hook is passed the registration that was updated, the status it was just updated from, the status it was just updated too and the context to indicate where it was updated from. So check if a registration was updated from Approved/Pending Payment, to Cancelled and then call the same method that is hooking into AHEE__EE_Event__perform_sold_out_status_check__end to do it’s thing and update registrations if needed.
That may just work out the box, but you may need to dig into it further, I’m not sure without running through it all to test but as this is custom, thats up to you 🙂
Thank you very much for your help an insight. I’ll get into this and I’ll let you know how it came out in the end.
I it works just like this, great! If not – I’ll tell you what else was needed.
I believe this functionality reduces a lot of the backoffice work when it comes to manage a great number of concurrent events with a small number of available tickets.
The support post ‘Auto Promote Registrants – Cancel unpaid registrations after a few days’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.