linkedin

Frequently Asked Questions

⌘K
  1. Home
  2. /
  3. Docs
  4. /
  5. Frequently Asked Question...
  6. /
  7. Ticket Themes
  8. /
  9. How do I add support for ...

How do I add support for daily start and end times to my ticket themes?

As of version 1.5.5 of the FooEvents Multi-day plugin, you can select different start and end times for each day of a multi-day event.

Support for this feature has also been added to all FooEvents Ticket Themes.

Please follow these instructions to update an existing ticket theme. If you are using a customized ticket theme and are not able to replace the ticket theme with the updated version, please add the following code snippet to your ticket theme in order to add support for start and end times.

<!-- MULTI-DAY DETAILS -->
										
<?php if ( $ticket['WooCommerceEventsTicketDisplayMultiDay'] == 'on' ) : ?>
	<?php $x = 1; ?>
	<?php $y = 0; ?>    
	<?php foreach ( $ticket['WooCommerceEventsSelectDate'] as $date ) : ?>
			<strong><?php printf( __( '%1$s %2$d: ', 'woocommerce-events' ), $ticket['dayTerm'], $x ); ?></strong>
			<?php echo esc_attr( $date ); ?><br /> 
			<?php if ( ! empty( $ticket['WooCommerceEventsSelectDateHour'][ $y ] ) && ! empty( $ticket['WooCommerceEventsSelectDateMinutes'][ $y ] ) ) : ?>
				<?php echo $ticket['WooCommerceEventsSelectDateHour'][ $y ] . ':' . $ticket['WooCommerceEventsSelectDateMinutes'][ $y ]; ?><?php echo( isset( $ticket['WooCommerceEventsSelectDatePeriod'][ $y ] ) ) ? ' ' . $ticket['WooCommerceEventsSelectDatePeriod'][ $y ] : ''; ?>
			<?php endif; ?>
			<?php if ( ! empty( $ticket['WooCommerceEventsSelectDateHourEnd'][ $y ] ) && ! empty( $ticket['WooCommerceEventsSelectDateMinutesEnd'][ $y ] ) ) : ?>
				<?php echo ' - ' . $ticket['WooCommerceEventsSelectDateHourEnd'][ $y ] . ':' . $ticket['WooCommerceEventsSelectDateMinutesEnd'][ $y ]; ?><?php echo( isset( $ticket['WooCommerceEventsSelectDatePeriodEnd'][ $y ] ) ) ? ' ' . $ticket['WooCommerceEventsSelectDatePeriodEnd'][ $y ] : ''; ?>
			<?php endif; ?>	
		<br />										
		<?php $x++; ?>
		<?php $y++; ?>
	<?php endforeach; ?>
<?php endif; ?>
Tags , , , ,