@@ 230-244 (lines=15) @@ | ||
227 | ) |
|
228 | ); |
|
229 | $csv_data = array(); |
|
230 | foreach( $attendee_rows as $attendee_row ){ |
|
231 | $csv_row = array(); |
|
232 | foreach( EEM_Attendee::instance()->field_settings() as $field_name => $field_obj ){ |
|
233 | if( $field_name == 'STA_ID' ){ |
|
234 | $state_name_field = EEM_State::instance()->field_settings_for( 'STA_name' ); |
|
235 | $csv_row[ __( 'State', 'event_espresso' ) ] = $attendee_row[ $state_name_field->get_qualified_column() ]; |
|
236 | }elseif( $field_name == 'CNT_ISO' ){ |
|
237 | $country_name_field = EEM_Country::instance()->field_settings_for( 'CNT_name' ); |
|
238 | $csv_row[ __( 'Country', 'event_espresso' ) ] = $attendee_row[ $country_name_field->get_qualified_column() ]; |
|
239 | }else{ |
|
240 | $csv_row[ $field_obj->get_nicename() ] = $attendee_row[ $field_obj->get_qualified_column() ]; |
|
241 | } |
|
242 | } |
|
243 | $csv_data[] = $csv_row; |
|
244 | } |
|
245 | ||
246 | $filename = $this->generate_filename ( 'contact-list-report' ); |
|
247 |
@@ 99-113 (lines=15) @@ | ||
96 | ) |
|
97 | ); |
|
98 | $csv_data = array(); |
|
99 | foreach( $attendee_rows as $attendee_row ){ |
|
100 | $csv_row = array(); |
|
101 | foreach( \EEM_Attendee::instance()->field_settings() as $field_name => $field_obj ){ |
|
102 | if( $field_name == 'STA_ID' ){ |
|
103 | $state_name_field = \EEM_State::instance()->field_settings_for( 'STA_name' ); |
|
104 | $csv_row[ __( 'State', 'event_espresso' ) ] = $attendee_row[ $state_name_field->get_qualified_column() ]; |
|
105 | }elseif( $field_name == 'CNT_ISO' ){ |
|
106 | $country_name_field = \EEM_Country::instance()->field_settings_for( 'CNT_name' ); |
|
107 | $csv_row[ __( 'Country', 'event_espresso' ) ] = $attendee_row[ $country_name_field->get_qualified_column() ]; |
|
108 | }else{ |
|
109 | $csv_row[ $field_obj->get_nicename() ] = $attendee_row[ $field_obj->get_qualified_column() ]; |
|
110 | } |
|
111 | } |
|
112 | $csv_data[] = $csv_row; |
|
113 | } |
|
114 | return $csv_data; |
|
115 | } |
|
116 |