Support

Home Forums Event Espresso Premium EE4 Reserving Spots Too Long

EE4 Reserving Spots Too Long

Posted: August 29, 2017 at 10:26 pm


Peter

August 29, 2017 at 10:26 pm

Hi there,

I have installed EE4 and everything now seems well except one recurring issue.

Each course can have a maximum of 12 students.

Sometimes students will be coming through the checkout, abandon it, and then the student spot will still be taken indefinite. We have to go in and manually trash the “incomplete” resignation to resolve this. This only happens with incomplete registrations. This does not occur with students who are “pending payment” methods appear to resolve themselves.

Today for example a course showed sold out when I didn’t see any receipts come through so I looked and the back end said of the 12 spots, 3 were actually students marked incomplete.

As well, on the advice of a past forum post, a while ago I had added this code to my custom site plugin to make the timeout shorter. It doesn’t seem to have worked:

add_filter( ‘FHEE__EE_Session__construct___lifespan’, ‘ee_change_reg_time_limit’ );

function ee_change_reg_time_limit() {
return 45 * 1200;
}

Do you have any advice? Thanks kindly.

Do you have any advice? Thanks kindly.


Tony

  • Support Staff

August 30, 2017 at 1:53 am

Hi there,

The filter you are using allows you to change the length of time the session should remain open in seconds, by default that’s 60 minutes and is done using this code:

apply_filters(
	'FHEE__EE_Session__construct___lifespan',
	60 * MINUTE_IN_SECONDS
)

So the default value is 60 * 60 = 3600 seconds = 1 hour.

Your code is 45 * 1200 = 54000 seconds = 15 hours.

So every registration has a session length of 15 hours if it’s not manually closed/finalized, meaning your code is actually doing the opposite of what you’re trying to do.

How long do you want the session to remain open? The minimum I would recommend is 15 mins as if a user takes more than that length of time to provide registration details, card details and finalize then they will see an error and need to start again.

If you want to use 15 mins then in your code you can use:

return 15 * MINUTE_IN_SECONDS;

Or maybe a little longer and use 30 mins:

return 30 * MINUTE_IN_SECONDS;


Peter

August 30, 2017 at 3:00 am

Thanks, I have changed the code to return 20 * MINUTE_IN_SECONDS; and will see how it turns out.

The support post ‘EE4 Reserving Spots Too Long’ 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