Ameliabooking_Helpers::get_event_date( array $reservation = array() )

Method get_event_date.


Parameters Parameters

$reservation

(Optional) The reservation array from Amelia hook.

Default value: array()


Top ↑

Return Return

(string) The event date.


Source Source

File: src/integrations/ameliabooking/helpers/ameliabooking-helpers.php

	public function get_event_date( $reservation = array() ) {

		$reservation_periods = isset( $reservation['event']['periods'][0] ) ? $reservation['event']['periods'][0] : '';

		$period_end = isset( $reservation_periods['periodEnd'] ) ? $reservation_periods['periodEnd'] : '';

		$period_start = isset( $reservation_periods['periodStart'] ) ? $reservation_periods['periodStart'] : '';

		return $period_start . ' - ' . $period_end;

	}