Support

Home Forums Event Espresso Premium Distinguish between expired and sold out event..?

Distinguish between expired and sold out event..?

Posted: December 10, 2016 at 11:12 am


Koen Linders

December 10, 2016 at 11:12 am

I have one sold out event and some have expired tickets.. I want to know the difference so I can place a label on the ones that are sold out.

But the code <?php echo $post->EE_Event->perform_sold_out_status_check(); ?> returns a 1 in case of both sold out and expired…

How can I distinguish between the two?


Josh

  • Support Staff

December 12, 2016 at 12:55 pm

Hi Koen,

$post->EE_Event->is_sold_out() will return true if the event’s tickets are sold out.


Koen Linders

December 13, 2016 at 11:46 am

Thanks, got it working.

The support post ‘Distinguish between expired and sold out event..?’ 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.

Event Espresso