Support

Home Forums Event Espresso Premium EE4 Change event start/end default times

EE4 Change event start/end default times

Posted: October 2, 2018 at 9:08 am


shion

October 2, 2018 at 9:08 am

Hello! Currently, when creating a new ticket, the times default from 8am to 5pm. Is there any way to change this to something like 830 am to 4:30 pm?

2.) Limits
On event datetimes, there’s a box called “Limit” Suppose this is set to 6. Is it still necessary to also limit the available tickets quantity to 6? Or would the first take priority so even if there were 100 tickets “available”, it would still cap at 6?

Thanks!


Josh

  • Support Staff

October 2, 2018 at 8:16 pm

Hi,

There is a filter hook that allows for changing many of the defaults by adding some PHP code to your site. For example, you could add this code to change the new event defaults for Event Start and Event End:

function ee_test_get_dtt_edit_row_args( 
    $template_args, 
    $dttrow, 
    $dtt, 
    $default, 
    $all_dtts, 
    $creating_event 
) {
    if ( $template_args['DTT_ID'] == 0 ) {
        $start = time() + MONTH_IN_SECONDS;
        $template_args['DTT_EVT_start'] = date('Y-m-d 08:30:00', $start);
        $end = $start + 8 * HOUR_IN_SECONDS;
        $template_args['DTT_EVT_end'] = date('Y-m-d 16:30:00', $end);
    }
    return $template_args;
}
add_filter( 
    'FHEE__espresso_events_Pricing_Hooks___get_dtt_edit_row__template_args', 
    'ee_test_get_dtt_edit_row_args', 
    10, 
    6 
);

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.

With regards to setting the datetime reg limit, if you set that field to 6, any and all of the attached tickets will automatically set their ticket quantity to 6.

The support post ‘EE4 Change event start/end default times’ 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