Tribe__Tickets_Plus__Meta__Export::populate_columns( string $existing, array $item, string $column )
Handle the actual population of attendee meta fields.
Contents
Parameters
- $existing
-
(string) (Required)
- $item
-
(array) (Required)
- $column
-
(string) (Required)
Return
(string)
Source
File: src/Tribe/Meta/Export.php
public function populate_columns( $existing, $item, $column ) {
$meta_data = get_post_meta( $item['attendee_id'], Tribe__Tickets_Plus__Meta::META_KEY, true );
if ( isset( $meta_data[ $column ] ) ) {
return $meta_data[ $column ];
}
/**
* Allow plugins to remove support for checkbox field values being displayed or override the text shown.
*
* @since 4.10.4
*
* @param string|false $checkbox_label Label value of checkbox that is checked, return false to turn off label support.
*/
$checkbox_label = apply_filters( 'tribe_events_tickets_plus_attendees_list_checkbox_label', __( 'Checked', 'event-tickets-plus' ) );
if ( false === $checkbox_label ) {
return $existing;
}
// Checkbox support
$checkbox_parts = explode( '_', $column );
if ( 2 !== count( $checkbox_parts ) ) {
return $existing;
}
$key = $checkbox_parts[0] . '_' . md5( $checkbox_parts[1] );
if ( isset( $meta_data[ $key ] ) ) {
return $checkbox_label;
}
return $existing;
}