Support

Home Forums Event Espresso Premium Change Default Registration Dates to empty

Change Default Registration Dates to empty

Posted: November 7, 2013 at 10:13 am

Viewing 1 reply thread


Josh Farkas

November 7, 2013 at 10:13 am

I am trying to add an event that does not have a a registration date, if I leave it blank and then click publish event, it will auto populate it with some random dates. How can I get it to just stay blank? If I go back in the event after initial publish I can delete the registration dates and they will stay blank but I would like the ability to leave them blank with the initial publish.


Sidney Harrell

November 7, 2013 at 11:11 am

The lines you want are in includes/event-management/insert_event.php lines 179 and 180:

$_REQUEST['registration_start']		= !empty($_REQUEST['registration_start']) ? sanitize_text_field($_REQUEST['registration_start']) : date('Y-m-d');
		$_REQUEST['registration_end']		= !empty($_REQUEST['registration_end']) ? sanitize_text_field($_REQUEST['registration_end']) : date('Y-m-d',time() + (60 * 60 * 24 * 29));

By deleting or commenting out those lines, the registration dates will remain blank. (There are two earlier lines for the registration times as well.) But it is not recommended that those dates remain blank. There are many checks throughout the plugin on those dates to determine if registration is still open for event listings, registration forms, etc, and you may get unexpected results. I would recommend just setting the registration start to sometime in the past, and the registration end to sometime after the event ends.

Viewing 1 reply thread

The support post ‘Change Default Registration Dates to empty’ 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