Support » Plugin: Events Manager » Ticket availability date

  • Resolved magneticlab_ch



    Is the a way to show the “Available from” in the front office?

    Actually if you choose tickets from 01.01.2020 to 31.01.2020, the booking form is closed (like it should be). But can we show the message: Booking will be open at 01.01.2020?

    Thank you

Viewing 1 replies (of 1 total)
  • Patrick


    EM does not have a placeholder for the ticket dates, so you will need to create that yourself.

    function stonehenge_em_get_ticket_start_date( $replace, $EM_Event, $result ) {
    	global $EM_Event;
    	if( $result === "#_TICKETSTARTDATE" ) {
    		$EM_Tickets = $EM_Event->get_tickets();
    		foreach( $EM_Tickets as $EM_Ticket ) {
    			$start = $EM_Ticket->ticket_start; // (Y-d-m H:i:s)
    		$replace = date_i18n( get_option('dbem_date_format'), strtotime($start));
    	return $replace;
    add_filter('em_event_output_placeholder', 'stonehenge_em_get_ticket_start_date', 10, 3);

    Then in your Single event markup:
    {bookings_closed}Tickets sale will start on #_TICKETSTARTDATE.{/bookings_closed}

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.