Support

Home Forums Event Espresso Premium Template Tags and WaitList add-on : espresso_event_reg_button()

Template Tags and WaitList add-on : espresso_event_reg_button()

Posted: June 17, 2024 at 1:03 am

Viewing 6 reply threads


KRNH

June 17, 2024 at 1:03 am

I am using espresso_event_reg_button('Register',false, get_the_id()) to output the register button on my archive page tiles.

I am also using WaitList add-on. I want the ‘Sold Out’ text to say ‘Join the Waitlist’ if the event is sold out AND has a wait list (not all events have a waitlist)

I see that espresso_event_reg_button() is a pluggable function so I can add my own logic to it, but I do not see any easy means of determining waitlist..

for example I cannot use EED_Wait_Lists::getWaitListMonitor()->eventHasOpenWaitList($event) because that function is private.

Am I missing something? Is there a means to achieve this?


Tony

  • Support Staff

June 17, 2024 at 7:55 am

Hi there,

Currently you’d need to duplicate that code…. but I don’t see any reason why that method can’t be public.

I’ll create a ticket to discuss this with our developers today and get back to you shortly.


KRNH

June 17, 2024 at 11:08 pm

Ok, thanks Tony.


Sam

  • Support Staff

June 18, 2024 at 1:32 am

Please feel free to let us know if you have any other questions.


Tony

  • Support Staff

June 18, 2024 at 2:08 am

Hi there,

for example I cannot use EED_Wait_Lists::getWaitListMonitor()->eventHasOpenWaitList($event) because that function is private.

You can safely set this method to be public within the waitlist add-on your site, it will be public in the next release so the change you apply here will be applied in the next update anyway (due out next week if no issues with the current testing).


KRNH

June 18, 2024 at 3:01 am

That’s fantastic – thanks Tony. Much appreciated.


Tony

  • Support Staff

June 18, 2024 at 4:54 am

You’re most welcome 🙂

Viewing 6 reply threads

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso