Posted: November 26, 2017 at 1:43 am
Hi there, I left the code alone in my website for a while, but I have noticed the issue recurring where a course gets tagged as “sold out” and doesn’t open back up. I last left off going to test the solution in https://eventespresso.com/topic/ee4-reserving-spots-too-long/ but I now suspect that I don’t have the correct code in my “WordPress Site Plugin”. Although Tony at the time advised me to change the code to:
I have noticed that when I paste that exact same text into my plugin editor that WordPress will not allow the document to be saved, saying “Your PHP code changes were rolled back due to an error on line 70 of file wp-content/plugins/RGSLCustomCSSPlugin/RGSLCustomCSSPlugin-customizations.php. Please fix and try saving again. I apologize if this seems trivial but I really don’t know how to code very well and have been struggling. I pasted the code right at the bottom of my document. It looks like:
Are you able to offer any feedback to me? I do see some failed registrations. My partner has described having to “clear out” old registrations, but I’m not 100% sure if they were cleaning out the Failed ones. I do see about 10 “Failed” ones from the last few days or so, so I worry that sales are maybe being lost. Thanks kindly, |
|
My apologies, there seems to be some confusion here as I didn’t advise using that code, it won’t work as is for a couple of reasons. The reason you’re getting the above error is there is a missing semicolon at the end:
I added that code to provide some context on what was happening as it shows the default is However that’s using The correct function you had previously was:
But is has 45 * 1200 = 54000, meaning 15 hours. What this meant was your function was setting the session lifespan to be much longer than EE’s default when you wanted it shorter and that’s why it didn’t appear to work. You need this code:
Add that to your custom function above and it should change the session lifespan to 20 minutes. |
|
OK thanks. I have copied and pasted your code in place of what was there. Sorry for the confusion – I will watch the system and report back if it’s still doing the same thing (not releasing seats). Thanks again! |
|
You’re most welcome. Note if you are watching the event you don’t want to site with the event editor open. If the event switches to sold out and you have the event editor open it could trigger an autosave which will save the event as sold out. So if you’re watching the event, open up the event on the front end and refresh it, you’ll see if the event switches status there rather than in the event editor itself. |
|
The support post ‘EE4 Reserving Spots Too Long (2)’ 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.