Skip to content

Commit

Permalink
Fix - Likert data not exporting single and multiple
Browse files Browse the repository at this point in the history
  • Loading branch information
MILAN88888 committed Sep 13, 2024
1 parent 1fa3fef commit 64abf0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/export/class-evf-entry-csv-exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function get_default_column_names() {
case 'likert':
$field_id = $field['id'];
foreach ( $field['likert_rows'] as $key => $col_row ) {
$col_row_key = "$field_id-likeart-$key";
$col_row_key = "$field_id-likert-$key";
$columns[ $col_row_key ] = $col_row;
}
break;
Expand Down Expand Up @@ -283,7 +283,7 @@ protected function generate_row_data( $entry ) {
$fields = json_decode( $entry->fields, true );
foreach ( $columns as $column_id => $column_name ) {
$column_id = strstr( $column_id, ':' ) ? current( explode( ':', $column_id ) ) : $column_id;
$position = strpos( $column_id, '-likeart-' );
$position = strpos( $column_id, '-likert-' );

if ( $position !== false ) {

Check failure on line 288 in includes/export/class-evf-entry-csv-exporter.php

View workflow job for this annotation

GitHub Actions / Code sniff (PHP 7.4 , WP Latest)

Use Yoda Condition checks, you must.
$column_id = substr( $column_id, 0, $position );
Expand Down

0 comments on commit 64abf0c

Please sign in to comment.