Posted: September 30, 2019 at 5:23 pm
I’ve been working off this thread https://eventespresso.com/topic/show-number-of-attendees-for-an-event/ which references this github item, the second file shows an easy way to get Registration counts .
We’re also running the Waitlist add on and the total of registrations is actually the wait list count + the Registration count from ($event_obj)
the $regcount does not seem to calculate anything that I can match up~ not worried about that (its not pending and doesn’t seem to reflect waitlist + registered)
Wondering if there is a way that I can show the actual Registration Count and separately the Wait List count?
have an example running on a staging site https://bitangels.io/events/bitangels-toronto-launch/
Update – So I think the $reg_count includes Incomplete registrations also…
so $reg_count with the above code is
So is there a way to refine the filter to remove those others, list them separately or only show Approved Registrations.
Showing the number on the Waitlist would be helpful too!
Ok, so, the answer to your question is yes, you can refine the search done above and you can also pull just the number of waitlist registrations and display that.
The code above pulls ALL registrations related to the event and this part:
Tells the model, not to pull registrations that have a status of cancelled, so you could duplicate that and add additional stati to that field to pull the values for each specific reg type, but…
There’s another way you can go about this that might be a little easier to follow:
You have the EE_Event object at this point:
So, inside the above conditional
That means you can do something like:
The above uses the EE_Event object to pull registrations that related to that object, and you set the STS_ID to be the status of the registrations you want.
That helps immensely.
In this same function, I’m trying to find the right place to insert the result.
I initially tried and after content scenario, then a before.
This resulted in displaying this information wherever we run the loop to display upcoming events. Not desirable. I can create filters to exclude that page by page, but trying to find a list of other places on an event post where I could hook in and display this, preferably within the content but before the description, worst case before the venue. I do not see an option in the standard EE themeing options where I can hook into make something new just for this.
Not finding anything other than hooks related to pricing in the documentation.
Maybe I’m missing it https://eventespresso.com/2014/02/epsresso-brewery-custom-post-types-event-espresso/ but this seems to be more of a sales page talking up the EE approach and not so much an actual document showing any list of hook/filter options.
I’ve been to http://developer.eventespresso.com/ and this gives a link to the code on github, but again no actual details that I can find in the links or menu there.
Just trying to get in the right ball park….
The way I would find a hook to use is using Debug Bar with the Actions and Filters Addon, see:
Then in the admin bar, you click Debug -> Action / Filter hooks and it lists them all.
You’ll find all of our hooks being with
The above should make that a little easier.
The support post ‘Wait List and Registration Counts?’ 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.