Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('em_booking_output_placeholder','my_em_mod_attendee',1,3);
- function my_em_mod_attendee($replace, $EM_Booking, $full_result){
- if( empty($replace) || $replace == $full_result ){
- $test = $replace;
- $replace = "";
- $EM_Tickets_Bookings = $EM_Booking->get_tickets_bookings();
- $attendee_datas = EM_Attendees_Form::get_booking_attendees($EM_Booking);
- foreach( $EM_Tickets_Bookings->tickets_bookings as $EM_Ticket_Booking ){
- if( !empty($attendee_datas[$EM_Ticket_Booking->ticket_id]) ){
- foreach( $attendee_datas[$EM_Ticket_Booking->ticket_id] as $attendee_title => $attendee_data ){
- foreach( $attendee_data as $field_label => $field_value){
- $search = str_replace(' ','_',$field_label);
- if ( $full_result == '#_BOOKINGFORMCUSTOM{'.strtolower($search).'}' ){
- $replace .= $field_value.'</br>';
- }
- }
- }
- }
- }
- }
- return $replace;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement