Support

Home Forums Event Espresso Premium Add filter to sold and reserved.

Add filter to sold and reserved.

Posted: August 11, 2021 at 9:26 am

Viewing 3 reply threads


Erik

August 11, 2021 at 9:26 am

We need to modify the EE_Datetime class’s sold_and_reserved method. If a filter hook could be added to that method’s result, and pass the current EE_Datetime object as an argument, it would allow us to modify the value without overwriting EE core code on every update.


Tony

  • Support Staff

August 11, 2021 at 10:40 am

Hi Erik,

I’m not sure a filter for that method is a good idea, if we filter that value and people start returning unexpected counts for the datetimes it could very easily cause overselling.

May I ask what the use case for this is?


Erik

August 11, 2021 at 12:56 pm

We need to add pending registrations to the sold_and_reserved value to prevent overselling. We are using the invoice method as a way of taking a seat for an event. This creates a registration that is pending, and will be directly invoiced to the customer. They will not pay via credit card on the site, but their registration needs to be reflected in sold_and_reserved so the event does not end up overbooked.


Tony

  • Support Staff

August 11, 2021 at 2:46 pm

Ok so the way to do that within Event Espresso right now is to set the ‘Default Registration Status’ option on the event to be ‘Approved’.

That means that any registration that selects a payment method and finalizes will be switched to ‘Approved’, any registration that has a status of Approved counts towards the sold values of the ticket/datetime.

In effect it tells EE to ignore the payment status and set the registration to Approved (sold), the admin can then sort it from there which is similar to what you have now only you using ‘Pending Payment’ registrations in a way they aren’t expected to be used (counting them towards sold values).

Viewing 3 reply threads

The support post ‘Add filter to sold and reserved.’ 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