Support

Home Forums Event Espresso Premium Private events lose their private status when sold out!

Private events lose their private status when sold out!

Posted: February 27, 2018 at 2:48 pm


jacl

February 27, 2018 at 2:48 pm

Hi

My clients has some private events and also uses hidden private events to handle overspill.

We have an upcoming schedule table that shows events where post_status = published or sold_out as we still like to show the sold out events as those booked on to them can click to see location details etc.

We’ve just noticed that when the last ticket sells on a private event then EE changes the post_status from private to sold_out, causing our private events to show in our public website schedule.

I did some digging and found that EE stores the old post_status in the postmeta table with a key of “_previous_event_status” so I have now added an extra check to my php so when is iterates through the results it says

if($previous_event_status == “private” && $currentEventStatus == “sold_out”) {

//dont show table row } else {
//yes display this event
}

This seems to work for me but just wondering if I’m making extra work for myself and is there a simpler way to ignore/hide private events when pulling events from SQL

This feels like a bit of a bug that EE overrides the private status like this?

Thanks
JOnathan


Josh

  • Support Staff

February 27, 2018 at 2:52 pm

Hi Jonathan,

It may be. Would you be so kind to post an issue on Github so the dev team can review?

https://github.com/eventespresso/event-espresso-core/issues


jacl

February 27, 2018 at 2:59 pm

Thaknk Josh will do that now

The support post ‘Private events lose their private status when sold out!’ 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