eo_user_has_bookings
since 1.0
Pro
eo_user_has_bookings( $user_id, $event_id, $occurrence_id, $status = 'any' )
Whether a user has previously made a booking. Optionally filter by event and occurrence and status.
By default includes pending bookings. By specifying an event ID this checks if the user has made any bookings
for this event (any occurrence / 'series' booking). By additionally specifying an occurrence ID you can check if
a booking was made for that particular occurrence.
Parameters
int
|
$user_id |
The user's ID
|
int
|
$event_id |
If checking bookings for a particular event, this is the event's ID
|
int
|
$occurrence_id |
If checking bookings for a particular occurrence of an event, this is the occurrence's ID
|
string
|
$status = 'any' |
Which status to include. Default 'any'
|
Return value
bool
|
Whether the user has made a booking
|
Changelog