Check if a user has made any bookings using get_bookings();
-
Hi there, I want to show some conditional content within a template, depending on whether the user has a booking with a specific event.
I found another support thread, which referenced using the code on the my-bookings.php template
<?php global $wpdb, $current_user, $EM_Notices, $EM_Person; $EM_Person = new EM_Person( get_current_user_id() ); $EM_Bookings = $EM_Person->get_bookings(); $bookings_count = count($EM_Bookings->bookings); if($bookings_count > 0) { // do something } ?>
I would like to know if there are any args I can pass to get_bookings(); (or other) to get specific events, e.g. by event ID, category, etc. I couldn’t find any documentation on the advanced usage of the EM functions.
Any advice you can offer would be appreciated!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Check if a user has made any bookings using get_bookings();’ is closed to new replies.