I would like to create a custom form that have a custom workflow for the registration of an event. Is there anyway I can add an attendee to an event by using the functions.php?
In theory yes. I haven’t looked at it in detail, bvut you could override the event_espresso_add_question_groups function (event-espresso\includes\functions\main.php) via the custom files addon, do an SQL search for the attendee you wanted, and then override the event_form_build function (event-espresso\includes\functions\form_build.php) as well.
It would be fairly complicated, but I think it would be possible.
I actually find another function in /includes/process-registration/add_attendees_to_db.php. For the event_espresso_add_attendees_to_db, do you think I can just run this function directly by overriding it and adding parameter?
event_espresso_add_attendees_to_db() is a pluggable function and as such can be overridden.
You could do this via the Custom Files Add-on using the custom_functions.php file.
However to note that function is an integral part of Event Espresso, depending on the modifications made this may result in unexpected results which unfortunately we can not support as we can only support the code as we release it.
Viewing 3 reply threads
The support post ‘Is there any exposed API function for this plugin?’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.