Advanced Order Export For WooCommerce - Version 3.2.2

Version Description

  • 2021-12-14 =
  • Fixed bug - PHP8 compatibility issues (deprecation warnings for XLS format)
  • Fixed bug - blank row was added after every 1000 rows (XLS format)
  • Fixed bug - money cells were empty if value
Download this release

Release Info

Developer algol.plus
Plugin Icon 128x128 Advanced Order Export For WooCommerce
Version 3.2.2
Comparing to
See all releases

Code changes from version 3.2.1 to 3.2.2

classes/PHPExcel/ReferenceHelper.php CHANGED
@@ -482,7 +482,7 @@ class PHPExcel_ReferenceHelper
482
  foreach ($conditionalStyles as $conditionalStyle) {
483
  $cloned[] = clone $conditionalStyle;
484
  }
485
- $pSheet->setConditionalStyles(PHPExcel_Cell::stringFromColumnIndex($j) . $i, $cloned);
486
  }
487
  }
488
  }
@@ -505,7 +505,7 @@ class PHPExcel_ReferenceHelper
505
  foreach ($conditionalStyles as $conditionalStyle) {
506
  $cloned[] = clone $conditionalStyle;
507
  }
508
- $pSheet->setConditionalStyles(PHPExcel_Cell::stringFromColumnIndex($i) . $j, $cloned);
509
  }
510
  }
511
  }
482
  foreach ($conditionalStyles as $conditionalStyle) {
483
  $cloned[] = clone $conditionalStyle;
484
  }
485
+ $pSheet->setConditionalStyles($cloned, PHPExcel_Cell::stringFromColumnIndex($j) . $i);
486
  }
487
  }
488
  }
505
  foreach ($conditionalStyles as $conditionalStyle) {
506
  $cloned[] = clone $conditionalStyle;
507
  }
508
+ $pSheet->setConditionalStyles($cloned, PHPExcel_Cell::stringFromColumnIndex($i) . $j);
509
  }
510
  }
511
  }
classes/PHPExcel/Shared/Drawing.php CHANGED
@@ -70,7 +70,7 @@ class PHPExcel_Shared_Drawing
70
  * @param PHPExcel_Style_Font $pDefaultFont Default font of the workbook
71
  * @return int Value in cell dimension
72
  */
73
- public static function pixelsToCellDimension($pValue = 0, PHPExcel_Style_Font $pDefaultFont)
74
  {
75
  // Font name and size
76
  $name = $pDefaultFont->getName();
@@ -95,7 +95,7 @@ class PHPExcel_Shared_Drawing
95
  * @param PHPExcel_Style_Font $pDefaultFont Default font of the workbook
96
  * @return int Value in pixels
97
  */
98
- public static function cellDimensionToPixels($pValue = 0, PHPExcel_Style_Font $pDefaultFont)
99
  {
100
  // Font name and size
101
  $name = $pDefaultFont->getName();
70
  * @param PHPExcel_Style_Font $pDefaultFont Default font of the workbook
71
  * @return int Value in cell dimension
72
  */
73
+ public static function pixelsToCellDimension(PHPExcel_Style_Font $pDefaultFont, $pValue = 0)
74
  {
75
  // Font name and size
76
  $name = $pDefaultFont->getName();
95
  * @param PHPExcel_Style_Font $pDefaultFont Default font of the workbook
96
  * @return int Value in pixels
97
  */
98
+ public static function cellDimensionToPixels(PHPExcel_Style_Font $pDefaultFont, $pValue = 0)
99
  {
100
  // Font name and size
101
  $name = $pDefaultFont->getName();
classes/PHPExcel/Shared/Excel5.php CHANGED
@@ -48,12 +48,12 @@ class PHPExcel_Shared_Excel5
48
  // then we have column dimension with explicit width
49
  $columnDimension = $columnDimensions[$col];
50
  $width = $columnDimension->getWidth();
51
- $pixelWidth = PHPExcel_Shared_Drawing::cellDimensionToPixels($width, $font);
52
  } elseif ($sheet->getDefaultColumnDimension()->getWidth() != -1) {
53
  // then we have default column dimension with explicit width
54
  $defaultColumnDimension = $sheet->getDefaultColumnDimension();
55
  $width = $defaultColumnDimension->getWidth();
56
- $pixelWidth = PHPExcel_Shared_Drawing::cellDimensionToPixels($width, $font);
57
  } else {
58
  // we don't even have any default column dimension. Width depends on default font
59
  $pixelWidth = PHPExcel_Shared_Font::getDefaultColumnWidthByFont($font, true);
48
  // then we have column dimension with explicit width
49
  $columnDimension = $columnDimensions[$col];
50
  $width = $columnDimension->getWidth();
51
+ $pixelWidth = PHPExcel_Shared_Drawing::cellDimensionToPixels($font, $width);
52
  } elseif ($sheet->getDefaultColumnDimension()->getWidth() != -1) {
53
  // then we have default column dimension with explicit width
54
  $defaultColumnDimension = $sheet->getDefaultColumnDimension();
55
  $width = $defaultColumnDimension->getWidth();
56
+ $pixelWidth = PHPExcel_Shared_Drawing::cellDimensionToPixels($font, $width);
57
  } else {
58
  // we don't even have any default column dimension. Width depends on default font
59
  $pixelWidth = PHPExcel_Shared_Font::getDefaultColumnWidthByFont($font, true);
classes/PHPExcel/Shared/Font.php CHANGED
@@ -287,7 +287,7 @@ class PHPExcel_Shared_Font
287
  }
288
 
289
  // Convert from pixel width to column width
290
- $columnWidth = PHPExcel_Shared_Drawing::pixelsToCellDimension($columnWidth, $defaultFont);
291
 
292
  // Return
293
  return round($columnWidth, 6);
287
  }
288
 
289
  // Convert from pixel width to column width
290
+ $columnWidth = PHPExcel_Shared_Drawing::pixelsToCellDimension($defaultFont, $columnWidth);
291
 
292
  // Return
293
  return round($columnWidth, 6);
classes/PHPExcel/Style.php CHANGED
@@ -550,7 +550,7 @@ class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComp
550
  public function setConditionalStyles($pValue = null)
551
  {
552
  if (is_array($pValue)) {
553
- $this->getActiveSheet()->setConditionalStyles($this->getSelectedCells(), $pValue);
554
  }
555
  return $this;
556
  }
550
  public function setConditionalStyles($pValue = null)
551
  {
552
  if (is_array($pValue)) {
553
+ $this->getActiveSheet()->setConditionalStyles($pValue, $this->getSelectedCells());
554
  }
555
  return $this;
556
  }
classes/PHPExcel/Worksheet.php CHANGED
@@ -1474,7 +1474,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
1474
  * @param $pValue PHPExcel_Style_Conditional[]
1475
  * @return PHPExcel_Worksheet
1476
  */
1477
- public function setConditionalStyles($pCoordinate = 'A1', $pValue)
1478
  {
1479
  $this->conditionalStylesCollection[strtoupper($pCoordinate)] = $pValue;
1480
  return $this;
@@ -1593,7 +1593,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
1593
  // Loop through cells and apply styles
1594
  for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) {
1595
  for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) {
1596
- $this->setConditionalStyles(PHPExcel_Cell::stringFromColumnIndex($col - 1) . $row, $pCellStyle);
1597
  }
1598
  }
1599
 
1474
  * @param $pValue PHPExcel_Style_Conditional[]
1475
  * @return PHPExcel_Worksheet
1476
  */
1477
+ public function setConditionalStyles($pValue, $pCoordinate = 'A1')
1478
  {
1479
  $this->conditionalStylesCollection[strtoupper($pCoordinate)] = $pValue;
1480
  return $this;
1593
  // Loop through cells and apply styles
1594
  for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) {
1595
  for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) {
1596
+ $this->setConditionalStyles($pCellStyle, PHPExcel_Cell::stringFromColumnIndex($col - 1) . $row);
1597
  }
1598
  }
1599
 
classes/PHPExcel/Writer/Excel2007/Chart.php CHANGED
@@ -1183,7 +1183,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
1183
  $objWriter->startElement('c:cat');
1184
  }
1185
 
1186
- $this->writePlotSeriesValues($plotSeriesCategory, $objWriter, $groupType, 'str', $pSheet);
1187
  $objWriter->endElement();
1188
  }
1189
 
@@ -1197,7 +1197,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
1197
  $objWriter->startElement('c:val');
1198
  }
1199
 
1200
- $this->writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, 'num', $pSheet);
1201
  $objWriter->endElement();
1202
  }
1203
 
@@ -1257,7 +1257,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
1257
  *
1258
  * @throws PHPExcel_Writer_Exception
1259
  */
1260
- private function writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, $dataType = 'str', PHPExcel_Worksheet $pSheet)
1261
  {
1262
  if (is_null($plotSeriesValues)) {
1263
  return;
1183
  $objWriter->startElement('c:cat');
1184
  }
1185
 
1186
+ $this->writePlotSeriesValues($plotSeriesCategory, $objWriter, $groupType, $pSheet, 'str');
1187
  $objWriter->endElement();
1188
  }
1189
 
1197
  $objWriter->startElement('c:val');
1198
  }
1199
 
1200
+ $this->writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, $pSheet, 'num');
1201
  $objWriter->endElement();
1202
  }
1203
 
1257
  *
1258
  * @throws PHPExcel_Writer_Exception
1259
  */
1260
+ private function writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, PHPExcel_Worksheet $pSheet, $dataType = 'str')
1261
  {
1262
  if (is_null($plotSeriesValues)) {
1263
  return;
classes/PHPExcel/Writer/HTML.php CHANGED
@@ -864,7 +864,7 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
864
 
865
  // col elements, loop through columnDimensions and set width
866
  foreach ($sheet->getColumnDimensions() as $columnDimension) {
867
- if (($width = PHPExcel_Shared_Drawing::cellDimensionToPixels($columnDimension->getWidth(), $this->defaultFont)) >= 0) {
868
  $width = PHPExcel_Shared_Drawing::pixelsToPoints($width);
869
  $column = PHPExcel_Cell::columnIndexFromString($columnDimension->getColumnIndex()) - 1;
870
  $this->columnWidths[$sheetIndex][$column] = $width;
864
 
865
  // col elements, loop through columnDimensions and set width
866
  foreach ($sheet->getColumnDimensions() as $columnDimension) {
867
+ if (($width = PHPExcel_Shared_Drawing::cellDimensionToPixels($this->defaultFont, $columnDimension->getWidth())) >= 0) {
868
  $width = PHPExcel_Shared_Drawing::pixelsToPoints($width);
869
  $column = PHPExcel_Cell::columnIndexFromString($columnDimension->getColumnIndex()) - 1;
870
  $this->columnWidths[$sheetIndex][$column] = $width;
classes/admin/tabs/ajax/trait-wc-order-export-ajax-helpers.php CHANGED
@@ -142,6 +142,10 @@ trait WC_Order_Export_Ajax_Helpers {
142
  if ( $filename !== false ) {
143
  delete_transient( $this->tempfile_prefix . $_REQUEST['file_id'] );
144
  unlink( $filename );
 
 
 
 
145
  }
146
  $this->stop_prevent_object_cache();
147
  }
142
  if ( $filename !== false ) {
143
  delete_transient( $this->tempfile_prefix . $_REQUEST['file_id'] );
144
  unlink( $filename );
145
+ //also delete storage file
146
+ if(file_exists($filename . '.storage')) {
147
+ unlink($filename . '.storage');
148
+ }
149
  }
150
  $this->stop_prevent_object_cache();
151
  }
classes/core/class-wc-order-export-data-extractor-ui.php CHANGED
@@ -1354,7 +1354,7 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
1354
  * @see WC_Order_Export_Data_Extractor_UI::get_order_segments
1355
  */
1356
  public static function get_unselected_fields_segments() {
1357
- return array(
1358
  'common' => __( 'Common', 'woo-order-export-lite' ),
1359
  'user' => __( 'Customer', 'woo-order-export-lite' ),
1360
  'billing' => __( 'Billing Address', 'woo-order-export-lite' ),
@@ -1368,7 +1368,7 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
1368
  'ship_calc' => __( 'Shipping', 'woo-order-export-lite' ),
1369
  'totals' => __( 'Totals', 'woo-order-export-lite' ),
1370
  'misc' => __( 'Others', 'woo-order-export-lite' ),
1371
- );
1372
  }
1373
 
1374
  public static function get_segment_hints() {
1354
  * @see WC_Order_Export_Data_Extractor_UI::get_order_segments
1355
  */
1356
  public static function get_unselected_fields_segments() {
1357
+ return apply_filters('woe_get_order_segments', array(
1358
  'common' => __( 'Common', 'woo-order-export-lite' ),
1359
  'user' => __( 'Customer', 'woo-order-export-lite' ),
1360
  'billing' => __( 'Billing Address', 'woo-order-export-lite' ),
1368
  'ship_calc' => __( 'Shipping', 'woo-order-export-lite' ),
1369
  'totals' => __( 'Totals', 'woo-order-export-lite' ),
1370
  'misc' => __( 'Others', 'woo-order-export-lite' ),
1371
+ ));
1372
  }
1373
 
1374
  public static function get_segment_hints() {
classes/formats/abstract-class-woe-formatter.php CHANGED
@@ -151,7 +151,8 @@ abstract class WOE_Formatter {
151
  }
152
 
153
  protected function format_date_field( $field_value ) {
154
- if ( ! WOE_Formatter::is_valid_time_stamp( $field_value ) ) {
 
155
  $ts = strtotime( $field_value );
156
  } else {
157
  $ts = $field_value;
151
  }
152
 
153
  protected function format_date_field( $field_value ) {
154
+ // 20211208 is not timestamp! too, strtotime() can parse it
155
+ if ( ! WOE_Formatter::is_valid_time_stamp( $field_value ) OR strtotime( $field_value ) ) {
156
  $ts = strtotime( $field_value );
157
  } else {
158
  $ts = $field_value;
classes/formats/class-woe-formatter-pdf.php CHANGED
@@ -201,7 +201,14 @@ class WOE_Formatter_PDF extends WOE_Formatter_Plain_Format {
201
  if ( apply_filters( 'woe_pdf_output', false, $this->settings, str_replace( '.csv', '.pdf', $this->filename ) ) ) {
202
  return;
203
  }
204
-
 
 
 
 
 
 
 
205
  $this->pdf = new WOE_PDF_MC_Table( $this->orientation, 'mm', $this->page_size );
206
 
207
  $this->storage->initRowIterator();
@@ -389,6 +396,7 @@ class WOE_Formatter_PDF extends WOE_Formatter_Plain_Format {
389
  $this->pdf->output_to_destination( 'f', $this->filename );
390
 
391
  $this->storage->close();
 
392
  }
393
  }
394
 
201
  if ( apply_filters( 'woe_pdf_output', false, $this->settings, str_replace( '.csv', '.pdf', $this->filename ) ) ) {
202
  return;
203
  }
204
+
205
+ if ( has_filter( 'woe_storage_sort_by_field') ) {
206
+ $this->storage->loadFull();
207
+ $this->storage->sortRowsByColumn( apply_filters( 'woe_storage_sort_by_field',"plain_products_name") );
208
+ $this->storage->forceSave();
209
+ $this->storage->close();
210
+ }
211
+
212
  $this->pdf = new WOE_PDF_MC_Table( $this->orientation, 'mm', $this->page_size );
213
 
214
  $this->storage->initRowIterator();
396
  $this->pdf->output_to_destination( 'f', $this->filename );
397
 
398
  $this->storage->close();
399
+ $this->storage->delete();
400
  }
401
  }
402
 
classes/formats/class-woe-formatter-xls.php CHANGED
@@ -247,6 +247,13 @@ class WOE_Formatter_Xls extends WOE_Formatter_Plain_Format {
247
 
248
  if ( $this->mode != 'preview' ) {
249
  $this->storage->close(); // //if it's full export, storage hasn't been closed
 
 
 
 
 
 
 
250
 
251
  //more memory for XLS?
252
  ini_set( 'memory_limit', '512M' );
@@ -334,12 +341,12 @@ class WOE_Formatter_Xls extends WOE_Formatter_Plain_Format {
334
  $row[] = $rowObj->getMetaItem('order_id');
335
  $rows[] = $row;
336
  if( count( $rows ) == self::CHUNK_SIZE ) {
337
- $this->fromArray( $sheet, $rows, NULL, 'A' . ++ $this->last_row );
338
  $rows = array();
339
  }
340
  }
341
  if( count( $rows ) ) { //last chunk
342
- $this->fromArray( $sheet, $rows, NULL, 'A' . ++ $this->last_row );
343
  }
344
 
345
  if ( $this->settings['auto_width'] ) {
@@ -418,6 +425,7 @@ class WOE_Formatter_Xls extends WOE_Formatter_Plain_Format {
418
  $objWriter->save( $this->filename );
419
 
420
  $this->storage->close();
 
421
  }
422
  }
423
 
247
 
248
  if ( $this->mode != 'preview' ) {
249
  $this->storage->close(); // //if it's full export, storage hasn't been closed
250
+
251
+ if ( has_filter( 'woe_storage_sort_by_field') ) {
252
+ $this->storage->loadFull();
253
+ $this->storage->sortRowsByColumn( apply_filters( 'woe_storage_sort_by_field',"plain_products_name") );
254
+ $this->storage->forceSave();
255
+ $this->storage->close();
256
+ }
257
 
258
  //more memory for XLS?
259
  ini_set( 'memory_limit', '512M' );
341
  $row[] = $rowObj->getMetaItem('order_id');
342
  $rows[] = $row;
343
  if( count( $rows ) == self::CHUNK_SIZE ) {
344
+ $this->fromArray( $sheet, $rows, NULL, 'A' . ($this->last_row + 1), true );
345
  $rows = array();
346
  }
347
  }
348
  if( count( $rows ) ) { //last chunk
349
+ $this->fromArray( $sheet, $rows, NULL, 'A' . ($this->last_row + 1), true );
350
  }
351
 
352
  if ( $this->settings['auto_width'] ) {
425
  $objWriter->save( $this->filename );
426
 
427
  $this->storage->close();
428
+ $this->storage->delete();
429
  }
430
  }
431
 
classes/formats/class-woe-formatter-xml.php CHANGED
@@ -111,8 +111,9 @@ class WOE_Formatter_Xml extends WOE_Formatter {
111
  if ( $this->has_output_filter ) {
112
  $xml = apply_filters( "woe_xml_output_filter", $xml, $rec, $this );
113
  }
114
-
115
- fwrite( $this->handle, $xml . $this->linebreak );
 
116
  }
117
 
118
  public function finish( $data = '' ) {
111
  if ( $this->has_output_filter ) {
112
  $xml = apply_filters( "woe_xml_output_filter", $xml, $rec, $this );
113
  }
114
+
115
+ if( $xml )
116
+ fwrite( $this->handle, $xml . $this->linebreak );
117
  }
118
 
119
  public function finish( $data = '' ) {
classes/formats/storage/class-woe-formatter-storage-csv.php CHANGED
@@ -115,7 +115,7 @@ class WOE_Formatter_Storage_Csv implements WOE_Formatter_Storage {
115
 
116
  $this->header = array();
117
  foreach ( $header as $rawItem ) {
118
- $item = array_map( 'unserialize', $rawItem );
119
  $column = new WOE_Formatter_Storage_Column();
120
  $column->setKey( $item[0] );
121
  $column->setMeta( $item[1] );
@@ -189,6 +189,16 @@ class WOE_Formatter_Storage_Csv implements WOE_Formatter_Storage {
189
 
190
  fclose( $handle );
191
  }
 
 
 
 
 
 
 
 
 
 
192
 
193
  public function insertColumn( $column ) {
194
  if ( $column instanceof WOE_Formatter_Storage_Column ) {
@@ -269,4 +279,8 @@ class WOE_Formatter_Storage_Csv implements WOE_Formatter_Storage {
269
  {
270
  return $rows;
271
  }
 
 
 
 
272
  }
115
 
116
  $this->header = array();
117
  foreach ( $header as $rawItem ) {
118
+ $item = unserialize($rawItem );
119
  $column = new WOE_Formatter_Storage_Column();
120
  $column->setKey( $item[0] );
121
  $column->setMeta( $item[1] );
189
 
190
  fclose( $handle );
191
  }
192
+
193
+ public function sortRowsByColumn($field) {
194
+ return $this->sortRows( function($a,$b) use($field){
195
+ return strcmp($a->getDataItem($field),$b->getDataItem($field));
196
+ } );
197
+ }
198
+
199
+ public function sortRows($callback) {
200
+ usort($this->rowsBuffer,$callback);
201
+ }
202
 
203
  public function insertColumn( $column ) {
204
  if ( $column instanceof WOE_Formatter_Storage_Column ) {
279
  {
280
  return $rows;
281
  }
282
+
283
+ public function delete() {
284
+ return unlink($this->filename);
285
+ }
286
  }
classes/formats/storage/class-woe-formatter-storage-row.php CHANGED
@@ -81,6 +81,15 @@ class WOE_Formatter_Storage_Row {
81
  public function getData() {
82
  return $this->data;
83
  }
 
 
 
 
 
 
 
 
 
84
 
85
  /**
86
  * @return array<int, mixed>
81
  public function getData() {
82
  return $this->data;
83
  }
84
+
85
+ /**
86
+ * @param string
87
+ *
88
+ * @return mixed|null
89
+ */
90
+ public function getDataItem( $key ) {
91
+ return is_string( $key ) && isset( $this->data[ $key ] ) ? $this->data[ $key ] : null;
92
+ }
93
 
94
  /**
95
  * @return array<int, mixed>
classes/formats/storage/class-woe-formatter-storage-summary-session.php CHANGED
@@ -70,6 +70,8 @@ class WOE_Formatter_Storage_Summary_Session implements WOE_Formatter_Storage {
70
 
71
  public function close() {}
72
 
 
 
73
  public function initRowIterator() {
74
  $this->sortByName();
75
  do_action('woe_summary_before_output');
@@ -148,12 +150,15 @@ class WOE_Formatter_Storage_Summary_Session implements WOE_Formatter_Storage {
148
 
149
  public function insertRowAndSave($row) {}
150
 
151
- private function sortByName() {
152
- $first_row = array_column($_SESSION[$this->summaryKey . '_header'], 'key');
153
- if ( in_array('product_name', $first_row) ) {
154
- uasort( $_SESSION[$this->summaryKey], function ( $a, $b ) {
155
- return strcasecmp( $a['product_name'], $b['product_name'] );
156
- } );
157
- }
158
- }
 
 
 
159
  }
70
 
71
  public function close() {}
72
 
73
+ public function delete() {}
74
+
75
  public function initRowIterator() {
76
  $this->sortByName();
77
  do_action('woe_summary_before_output');
150
 
151
  public function insertRowAndSave($row) {}
152
 
153
+ private function sortByName()
154
+ {
155
+ if (isset($_SESSION[$this->summaryKey . '_header'])) {
156
+ $first_row = array_column($_SESSION[$this->summaryKey . '_header'], 'key');
157
+ if (in_array('name', $first_row)) {
158
+ uasort($_SESSION[$this->summaryKey], function ($a, $b) {
159
+ return strcasecmp($a['name'], $b['name']);
160
+ });
161
+ }
162
+ }
163
+ }
164
  }
classes/formats/storage/interface-woe-formatter-storage.php CHANGED
@@ -33,6 +33,8 @@ interface WOE_Formatter_Storage {
33
 
34
  public function close();
35
 
 
 
36
  /**
37
  * @param array $rows
38
  * @return array
33
 
34
  public function close();
35
 
36
+ public function delete();
37
+
38
  /**
39
  * @param array $rows
40
  * @return array
i18n/languages/woo-order-export-lite.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Advanced Order Export For WooCommerce\n"
5
  "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2021-11-08 13:37+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
  "Language-Team: \n"
@@ -13,7 +13,7 @@ msgstr ""
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "X-Generator: Loco https://localise.biz/\n"
16
- "X-Loco-Version: 2.5.5; wp-5.8.1\n"
17
  "X-Domain: woo-order-export-lite"
18
 
19
  #: classes/class-wc-order-export-admin.php:578
@@ -51,7 +51,7 @@ msgstr ""
51
  msgid "[Rest of the World]"
52
  msgstr ""
53
 
54
- #: view/settings-form.php:1629 view/settings-form.php:1643
55
  msgid "Actions"
56
  msgstr ""
57
 
@@ -64,15 +64,15 @@ msgstr ""
64
  msgid "Add %s fields"
65
  msgstr ""
66
 
67
- #: view/settings-form.php:1638
68
  msgid "Add calculated field"
69
  msgstr ""
70
 
71
- #: view/settings-form.php:1646
72
  msgid "Add fee"
73
  msgstr ""
74
 
75
- #: view/settings-form.php:1632
76
  msgid "Add field"
77
  msgstr ""
78
 
@@ -80,15 +80,15 @@ msgstr ""
80
  msgid "Add links to images"
81
  msgstr ""
82
 
83
- #: view/settings-form.php:1649
84
  msgid "Add shipping"
85
  msgstr ""
86
 
87
- #: view/settings-form.php:1635
88
  msgid "Add static field"
89
  msgstr ""
90
 
91
- #: view/settings-form.php:1652
92
  msgid "Add tax"
93
  msgstr ""
94
 
@@ -198,14 +198,14 @@ msgstr ""
198
  msgid "Can't find exported file"
199
  msgstr ""
200
 
201
- #: view/settings-form.php:1689 view/settings-form.php:1710
202
- #: view/settings-form.php:1746 view/settings-form.php:1786
203
- #: view/settings-form.php:1808 view/settings-form.php:1839
204
- #: view/settings-form.php:1861 view/settings-form.php:1887
205
- #: view/settings-form.php:1910 view/settings-form.php:1932
206
- #: view/settings-form.php:1954 view/settings-form.php:1976
207
- #: view/settings-form.php:2006 view/settings-form.php:2036
208
- #: view/settings-form.php:2066
209
  msgid "Cancel"
210
  msgstr ""
211
 
@@ -282,12 +282,12 @@ msgstr ""
282
  msgid "code snippets"
283
  msgstr ""
284
 
285
- #: view/settings-form.php:1679 view/settings-form.php:1695
286
- #: view/settings-form.php:1736 view/settings-form.php:1778
287
- #: view/settings-form.php:1792 view/settings-form.php:1831
288
- #: view/settings-form.php:1845 view/settings-form.php:1878
289
- #: view/settings-form.php:1893 view/settings-form.php:1922
290
- #: view/settings-form.php:1944 view/settings-form.php:1966
291
  msgid "Column name"
292
  msgstr ""
293
 
@@ -333,14 +333,14 @@ msgstr ""
333
  msgid "Completed Date"
334
  msgstr ""
335
 
336
- #: view/settings-form.php:1687 view/settings-form.php:1708
337
- #: view/settings-form.php:1744 view/settings-form.php:1784
338
- #: view/settings-form.php:1806 view/settings-form.php:1837
339
- #: view/settings-form.php:1859 view/settings-form.php:1885
340
- #: view/settings-form.php:1907 view/settings-form.php:1929
341
- #: view/settings-form.php:1951 view/settings-form.php:1973
342
- #: view/settings-form.php:2003 view/settings-form.php:2033
343
- #: view/settings-form.php:2063
344
  msgid "Confirm"
345
  msgstr ""
346
 
@@ -551,7 +551,7 @@ msgstr ""
551
  msgid "Download URL"
552
  msgstr ""
553
 
554
- #: view/settings-form.php:1590
555
  msgid "Drag rows to reorder exported fields"
556
  msgstr ""
557
 
@@ -695,7 +695,7 @@ msgstr ""
695
  msgid "Express export"
696
  msgstr ""
697
 
698
- #: view/settings-form.php:1916
699
  msgid "Fee name"
700
  msgstr ""
701
 
@@ -835,9 +835,9 @@ msgstr ""
835
  msgid "helpdesk system"
836
  msgstr ""
837
 
838
- #: view/settings-form.php:1675 view/settings-form.php:1732
839
- #: view/settings-form.php:1762 view/settings-form.php:1826
840
- #: view/settings-form.php:1869
841
  msgid "Hide unused fields"
842
  msgstr ""
843
 
@@ -959,8 +959,8 @@ msgstr ""
959
  msgid "L,C or R. Comma separated list"
960
  msgstr ""
961
 
962
- #: view/settings-form.php:1994 view/settings-form.php:2024
963
- #: view/settings-form.php:2054
964
  msgid "Label"
965
  msgstr ""
966
 
@@ -1038,9 +1038,9 @@ msgstr ""
1038
  msgid "Mark exported orders"
1039
  msgstr ""
1040
 
1041
- #: view/settings-form.php:1659 view/settings-form.php:1716
1042
- #: view/settings-form.php:1866 view/settings-form.php:1988
1043
- #: view/settings-form.php:2018 view/settings-form.php:2048
1044
  msgid "Meta key"
1045
  msgstr ""
1046
 
@@ -1106,13 +1106,13 @@ msgstr ""
1106
  msgid "one row"
1107
  msgstr ""
1108
 
1109
- #: view/settings-form.php:1765
1110
  msgid "OR"
1111
  msgstr ""
1112
 
1113
- #: view/settings-form.php:1670 view/settings-form.php:1727
1114
- #: view/settings-form.php:1757 view/settings-form.php:1821
1115
- #: view/settings-form.php:1875
1116
  msgid "or type meta key here"
1117
  msgstr ""
1118
 
@@ -1126,7 +1126,7 @@ msgstr ""
1126
  msgid "Order ID"
1127
  msgstr ""
1128
 
1129
- #: view/settings-form.php:1815
1130
  msgid "Order item fields"
1131
  msgstr ""
1132
 
@@ -1291,7 +1291,7 @@ msgid "Order Type"
1291
  msgstr ""
1292
 
1293
  #: classes/admin/class-wc-order-export-manage.php:250
1294
- #: classes/formats/class-woe-formatter-xls.php:298
1295
  msgid "Orders"
1296
  msgstr ""
1297
 
@@ -1467,7 +1467,7 @@ msgstr ""
1467
  msgid "Product custom fields"
1468
  msgstr ""
1469
 
1470
- #: view/settings-form.php:1751
1471
  msgid "Product fields"
1472
  msgstr ""
1473
 
@@ -1556,7 +1556,7 @@ msgstr ""
1556
  msgid "Read how to fix it"
1557
  msgstr ""
1558
 
1559
- #: view/settings-form.php:1596
1560
  msgid "Remove all fields"
1561
  msgstr ""
1562
 
@@ -1707,7 +1707,7 @@ msgstr ""
1707
  msgid "Shipping methods"
1708
  msgstr ""
1709
 
1710
- #: view/settings-form.php:1938
1711
  msgid "Shipping name"
1712
  msgstr ""
1713
 
@@ -1888,11 +1888,11 @@ msgstr ""
1888
  msgid "Tags"
1889
  msgstr ""
1890
 
1891
- #: view/settings-form.php:1960
1892
  msgid "Tax name"
1893
  msgstr ""
1894
 
1895
- #: view/settings-form.php:1767
1896
  msgid "Taxonomy"
1897
  msgstr ""
1898
 
@@ -1907,7 +1907,7 @@ msgid ""
1907
  "outdated Select2.js"
1908
  msgstr ""
1909
 
1910
- #: view/settings-form.php:1657 view/settings-form.php:1813
1911
  msgid ""
1912
  "The plugin fetches meta keys from the existing orders. So you should create "
1913
  "fake order if you've added new field just now."
@@ -1994,7 +1994,7 @@ msgstr ""
1994
  msgid "Tue"
1995
  msgstr ""
1996
 
1997
- #: view/settings-form.php:1583
1998
  msgid "Turn off mode Summary report to export order fields"
1999
  msgstr ""
2000
 
@@ -2052,8 +2052,8 @@ msgstr ""
2052
  msgid "Usernames"
2053
  msgstr ""
2054
 
2055
- #: view/settings-form.php:1700 view/settings-form.php:1797
2056
- #: view/settings-form.php:1850 view/settings-form.php:1898
2057
  msgid "Value"
2058
  msgstr ""
2059
 
@@ -2101,8 +2101,8 @@ msgstr ""
2101
  msgid "You can not do it"
2102
  msgstr ""
2103
 
2104
- #: view/settings-form.php:1983 view/settings-form.php:2013
2105
- #: view/settings-form.php:2043
2106
  msgid "You should add code to section \"Misc Settings\". Read the guide"
2107
  msgstr ""
2108
 
3
  msgstr ""
4
  "Project-Id-Version: Advanced Order Export For WooCommerce\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2021-12-13 13:15+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
  "Language-Team: \n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "X-Generator: Loco https://localise.biz/\n"
16
+ "X-Loco-Version: 2.5.5; wp-5.8.2\n"
17
  "X-Domain: woo-order-export-lite"
18
 
19
  #: classes/class-wc-order-export-admin.php:578
51
  msgid "[Rest of the World]"
52
  msgstr ""
53
 
54
+ #: view/settings-form.php:1626 view/settings-form.php:1640
55
  msgid "Actions"
56
  msgstr ""
57
 
64
  msgid "Add %s fields"
65
  msgstr ""
66
 
67
+ #: view/settings-form.php:1635
68
  msgid "Add calculated field"
69
  msgstr ""
70
 
71
+ #: view/settings-form.php:1643
72
  msgid "Add fee"
73
  msgstr ""
74
 
75
+ #: view/settings-form.php:1629
76
  msgid "Add field"
77
  msgstr ""
78
 
80
  msgid "Add links to images"
81
  msgstr ""
82
 
83
+ #: view/settings-form.php:1646
84
  msgid "Add shipping"
85
  msgstr ""
86
 
87
+ #: view/settings-form.php:1632
88
  msgid "Add static field"
89
  msgstr ""
90
 
91
+ #: view/settings-form.php:1649
92
  msgid "Add tax"
93
  msgstr ""
94
 
198
  msgid "Can't find exported file"
199
  msgstr ""
200
 
201
+ #: view/settings-form.php:1686 view/settings-form.php:1707
202
+ #: view/settings-form.php:1743 view/settings-form.php:1783
203
+ #: view/settings-form.php:1805 view/settings-form.php:1836
204
+ #: view/settings-form.php:1858 view/settings-form.php:1884
205
+ #: view/settings-form.php:1907 view/settings-form.php:1929
206
+ #: view/settings-form.php:1951 view/settings-form.php:1973
207
+ #: view/settings-form.php:2003 view/settings-form.php:2033
208
+ #: view/settings-form.php:2063
209
  msgid "Cancel"
210
  msgstr ""
211
 
282
  msgid "code snippets"
283
  msgstr ""
284
 
285
+ #: view/settings-form.php:1676 view/settings-form.php:1692
286
+ #: view/settings-form.php:1733 view/settings-form.php:1775
287
+ #: view/settings-form.php:1789 view/settings-form.php:1828
288
+ #: view/settings-form.php:1842 view/settings-form.php:1875
289
+ #: view/settings-form.php:1890 view/settings-form.php:1919
290
+ #: view/settings-form.php:1941 view/settings-form.php:1963
291
  msgid "Column name"
292
  msgstr ""
293
 
333
  msgid "Completed Date"
334
  msgstr ""
335
 
336
+ #: view/settings-form.php:1684 view/settings-form.php:1705
337
+ #: view/settings-form.php:1741 view/settings-form.php:1781
338
+ #: view/settings-form.php:1803 view/settings-form.php:1834
339
+ #: view/settings-form.php:1856 view/settings-form.php:1882
340
+ #: view/settings-form.php:1904 view/settings-form.php:1926
341
+ #: view/settings-form.php:1948 view/settings-form.php:1970
342
+ #: view/settings-form.php:2000 view/settings-form.php:2030
343
+ #: view/settings-form.php:2060
344
  msgid "Confirm"
345
  msgstr ""
346
 
551
  msgid "Download URL"
552
  msgstr ""
553
 
554
+ #: view/settings-form.php:1587
555
  msgid "Drag rows to reorder exported fields"
556
  msgstr ""
557
 
695
  msgid "Express export"
696
  msgstr ""
697
 
698
+ #: view/settings-form.php:1913
699
  msgid "Fee name"
700
  msgstr ""
701
 
835
  msgid "helpdesk system"
836
  msgstr ""
837
 
838
+ #: view/settings-form.php:1672 view/settings-form.php:1729
839
+ #: view/settings-form.php:1759 view/settings-form.php:1823
840
+ #: view/settings-form.php:1866
841
  msgid "Hide unused fields"
842
  msgstr ""
843
 
959
  msgid "L,C or R. Comma separated list"
960
  msgstr ""
961
 
962
+ #: view/settings-form.php:1991 view/settings-form.php:2021
963
+ #: view/settings-form.php:2051
964
  msgid "Label"
965
  msgstr ""
966
 
1038
  msgid "Mark exported orders"
1039
  msgstr ""
1040
 
1041
+ #: view/settings-form.php:1656 view/settings-form.php:1713
1042
+ #: view/settings-form.php:1863 view/settings-form.php:1985
1043
+ #: view/settings-form.php:2015 view/settings-form.php:2045
1044
  msgid "Meta key"
1045
  msgstr ""
1046
 
1106
  msgid "one row"
1107
  msgstr ""
1108
 
1109
+ #: view/settings-form.php:1762
1110
  msgid "OR"
1111
  msgstr ""
1112
 
1113
+ #: view/settings-form.php:1667 view/settings-form.php:1724
1114
+ #: view/settings-form.php:1754 view/settings-form.php:1818
1115
+ #: view/settings-form.php:1872
1116
  msgid "or type meta key here"
1117
  msgstr ""
1118
 
1126
  msgid "Order ID"
1127
  msgstr ""
1128
 
1129
+ #: view/settings-form.php:1812
1130
  msgid "Order item fields"
1131
  msgstr ""
1132
 
1291
  msgstr ""
1292
 
1293
  #: classes/admin/class-wc-order-export-manage.php:250
1294
+ #: classes/formats/class-woe-formatter-xls.php:305
1295
  msgid "Orders"
1296
  msgstr ""
1297
 
1467
  msgid "Product custom fields"
1468
  msgstr ""
1469
 
1470
+ #: view/settings-form.php:1748
1471
  msgid "Product fields"
1472
  msgstr ""
1473
 
1556
  msgid "Read how to fix it"
1557
  msgstr ""
1558
 
1559
+ #: view/settings-form.php:1593
1560
  msgid "Remove all fields"
1561
  msgstr ""
1562
 
1707
  msgid "Shipping methods"
1708
  msgstr ""
1709
 
1710
+ #: view/settings-form.php:1935
1711
  msgid "Shipping name"
1712
  msgstr ""
1713
 
1888
  msgid "Tags"
1889
  msgstr ""
1890
 
1891
+ #: view/settings-form.php:1957
1892
  msgid "Tax name"
1893
  msgstr ""
1894
 
1895
+ #: view/settings-form.php:1764
1896
  msgid "Taxonomy"
1897
  msgstr ""
1898
 
1907
  "outdated Select2.js"
1908
  msgstr ""
1909
 
1910
+ #: view/settings-form.php:1654 view/settings-form.php:1810
1911
  msgid ""
1912
  "The plugin fetches meta keys from the existing orders. So you should create "
1913
  "fake order if you've added new field just now."
1994
  msgid "Tue"
1995
  msgstr ""
1996
 
1997
+ #: view/settings-form.php:2071
1998
  msgid "Turn off mode Summary report to export order fields"
1999
  msgstr ""
2000
 
2052
  msgid "Usernames"
2053
  msgstr ""
2054
 
2055
+ #: view/settings-form.php:1697 view/settings-form.php:1794
2056
+ #: view/settings-form.php:1847 view/settings-form.php:1895
2057
  msgid "Value"
2058
  msgstr ""
2059
 
2101
  msgid "You can not do it"
2102
  msgstr ""
2103
 
2104
+ #: view/settings-form.php:1980 view/settings-form.php:2010
2105
+ #: view/settings-form.php:2040
2106
  msgid "You should add code to section \"Misc Settings\". Read the guide"
2107
  msgstr ""
2108
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: woocommerce,export,order,xls,csv,xml,woo export lite,export orders,orders
5
  Requires PHP: 5.4.0
6
  Requires at least: 4.7
7
  Tested up to: 5.8
8
- Stable tag: 3.2.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -117,6 +117,13 @@ Yes, you can email a request to aprokaev@gmail.com. We intensively develop this
117
 
118
  == Changelog ==
119
 
 
 
 
 
 
 
 
120
  = 3.2.1 - 2021-11-11 =
121
  * Fixed critical bug - option "Format numbers" broke XLS format
122
 
5
  Requires PHP: 5.4.0
6
  Requires at least: 4.7
7
  Tested up to: 5.8
8
+ Stable tag: 3.2.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
117
 
118
  == Changelog ==
119
 
120
+ = 3.2.2 - 2021-12-14 =
121
+ * Fixed bug - PHP8 compatibility issues (deprecation warnings for XLS format)
122
+ * Fixed bug - blank row was added after every 1000 rows (XLS format)
123
+ * Fixed bug - money cells were empty if value = 0 (XLS format)
124
+ * Fixed bug - products were not sorted by Name in summary mode
125
+ * Fixed bug - some files were not deleted in folder /tmp
126
+
127
  = 3.2.1 - 2021-11-11 =
128
  * Fixed critical bug - option "Format numbers" broke XLS format
129
 
view/settings-form.php CHANGED
@@ -1579,9 +1579,6 @@ function remove_time_from_date( $datetime ) {
1579
  </div>
1580
  <div id='fields' style='display:none;'>
1581
 
1582
- <div class="summary-products-mode-tip">
1583
- <?php _e( 'Turn off mode Summary report to export order fields', 'woo-order-export-lite' ) ?>
1584
- </div>
1585
  <div class="fields-control-block"></div>
1586
  <br>
1587
  <div class="fields-control">
@@ -2070,6 +2067,9 @@ function remove_time_from_date( $datetime ) {
2070
  </div>
2071
  </div>
2072
  <div id="woe_hints_block">
 
 
 
2073
  <?php foreach ( $segment_hints as $key => $hint ): ?>
2074
  <div class="woe_segment_tips" id="woe_tips_<?php echo $key ?>">
2075
  <?php echo $hint; ?>
1579
  </div>
1580
  <div id='fields' style='display:none;'>
1581
 
 
 
 
1582
  <div class="fields-control-block"></div>
1583
  <br>
1584
  <div class="fields-control">
2067
  </div>
2068
  </div>
2069
  <div id="woe_hints_block">
2070
+ <div class="summary-products-mode-tip">
2071
+ <?php _e( 'Turn off mode Summary report to export order fields', 'woo-order-export-lite' ) ?>
2072
+ </div>
2073
  <?php foreach ( $segment_hints as $key => $hint ): ?>
2074
  <div class="woe_segment_tips" id="woe_tips_<?php echo $key ?>">
2075
  <?php echo $hint; ?>
woo-order-export-lite.php CHANGED
@@ -5,11 +5,11 @@
5
  * Description: Export orders from WooCommerce with ease (Excel/CSV/XML/JSON supported)
6
  * Author: AlgolPlus
7
  * Author URI: https://algolplus.com/
8
- * Version: 3.2.1
9
  * Text Domain: woo-order-export-lite
10
  * Domain Path: /i18n/languages/
11
  * WC requires at least: 3.0.0
12
- * WC tested up to: 5.8
13
  *
14
  * Copyright: (c) 2015 AlgolPlus LLC. (algol.plus@gmail.com)
15
  *
@@ -40,7 +40,7 @@ if ( class_exists( 'WC_Order_Export_Admin' ) ) {
40
  }
41
 
42
  if ( ! defined( 'WOE_VERSION' ) ) {
43
- define( 'WOE_VERSION', '3.2.1' );
44
  define( 'WOE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
45
  define( 'WOE_PLUGIN_BASEPATH', dirname( __FILE__ ) );
46
  }
5
  * Description: Export orders from WooCommerce with ease (Excel/CSV/XML/JSON supported)
6
  * Author: AlgolPlus
7
  * Author URI: https://algolplus.com/
8
+ * Version: 3.2.2
9
  * Text Domain: woo-order-export-lite
10
  * Domain Path: /i18n/languages/
11
  * WC requires at least: 3.0.0
12
+ * WC tested up to: 5.9
13
  *
14
  * Copyright: (c) 2015 AlgolPlus LLC. (algol.plus@gmail.com)
15
  *
40
  }
41
 
42
  if ( ! defined( 'WOE_VERSION' ) ) {
43
+ define( 'WOE_VERSION', '3.2.2' );
44
  define( 'WOE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
45
  define( 'WOE_PLUGIN_BASEPATH', dirname( __FILE__ ) );
46
  }