Order Export & Order Import for WooCommerce - Version 1.6.2

Version Description

  • Bug Fix:- Paid date and Completed date not importing.
  • Tested OK with WC 4.0.0
Download this release

Release Info

Developer webtoffee
Plugin Icon 128x128 Order Export & Order Import for WooCommerce
Version 1.6.2
Comparing to
See all releases

Code changes from version 1.6.1 to 1.6.2

Sample_Order.csv CHANGED
@@ -1,7 +1,7 @@
1
- order_id,order_number,order_date,status,shipping_total,shipping_tax_total,fee_total,fee_tax_total,tax_total,cart_discount,order_discount,discount_total,order_total,order_currency,payment_method,shipping_method,customer_id,customer_user,customer_email,billing_first_name,billing_last_name,billing_company,billing_email,billing_phone,billing_address_1,billing_address_2,billing_postcode,billing_city,billing_state,billing_country,shipping_first_name,shipping_last_name,shipping_company,shipping_address_1,shipping_address_2,shipping_postcode,shipping_city,shipping_state,shipping_country,customer_note,shipping_items,fee_items,tax_items,coupon_items,refund_items,order_notes,download_permissions,line_item_1,line_item_2,line_item_3
2
  1001,1001,16-05-2018 07:32:06,completed,10,1.8,1,0.18,3.42,0,0,0,22.42,USD,cod,Express Delivery,3,3,lilly@example.com,Lilly,Gordon,,lilly@example.com,9898989898,20 Maple Avenue,,90731,San Pedro,CA,US,Lilly,Gordon,,20 Maple Avenue,"Door No,16",90731,San Pedro,CA,US,Deliver with a smile!,"item:Items|value:Formal shoe X 1
3
- ",name:Gift Wrap|total:1.00|tax:0.18,code:GST-1|total:3.42,,,Order status changed from Processing to Completed.|Formal shoe (A12) stock reduced from 20 to 19.|Payment to be made upon delivery. Order status changed from Pending payment to Processing.,1,name:Formal shoe|product_id:13|sku:A12|quantity:1|total:8.00|tax:1.44,,
4
  1002,1002,16-05-2018 07:25:28,on-hold,10,1.8,0,0,5.04,0,0,0,33.04,USD,paypal,Express Delivery,0,0,,John,Edward,,john@example.com,9999999,300 BOYLSTON AVE E,,98102,Seattle,WA,US,John,Edward,,300 BOYLSTON AVE E,,98102,Seattle,WA,US,,"item:Items|value:Washing machine X 1
5
- ",,code:GST-1|total:5.04,,amount:46.00|reason:refund|date:2019-06-19 12:13:48,Order status changed from Pending payment to Processing.|Washing machine (A15) stock reduced from 30 to 29.|IPN payment completed,1,name:Washing machine|product_id:616773451|sku:A15|quantity:1|total:18.00|tax:3.24,,
6
  1003,1003,16-05-2018 07:21:32,processing,10,1.8,0,0,8.99,10,10,10,58.98,USD,eh_stripe_pay,Express Delivery,2,2,mark@example.com,Mark,Xa,Xadapter,mark@example.com,9898989898,20 Maple Avenue,,90731,San Pedro,CA,US,Mark,Xa,Xadapter,20 Maple Avenue,,90731,San Pedro,CA,US,,"item:Items|value:LED TV X 1, Samsung Galaxy Ace Duos X 1, Men's Cotton T-Shirt - Red X 1
7
- ",,code:GST-1|total:8.99,code:flat20|amount:10.00,,"Order status changed from Pending payment to Processing.|LED TV (A13) stock reduced from 19 to 18.|Samsung Galaxy Ace Duos (A11) stock reduced from 10 to 9.|Men's Cotton T-Shirt - Red (B11V2)<span class=""description""></span> stock reduced from 9 to 8.|Payment Status : Succeeded [ 2018-05-16 12:51:06 ] . Source : Visa( credit ). Charge Status :Captured. Transaction ID : txn_1CSJwcJ91uK4qPibEmTjip6P:is_customer_note",1,name:LED TV|product_id:616773447|sku:A13|quantity:1|total:23.19|tax:4.17,name:Samsung Galaxy Ace Duos|product_id:616773443|sku:A11|quantity:1|total:8.80|tax:1.58,name:Men's Cotton T-Shirt|product_id:616773455|sku:B11V2|quantity:1|total:8.00|color:Red|_variation_id:616773455|tax:1.44
1
+ order_id,order_number,order_date,status,shipping_total,shipping_tax_total,fee_total,fee_tax_total,tax_total,cart_discount,order_discount,discount_total,order_total,order_currency,payment_method,shipping_method,customer_id,customer_user,customer_email,billing_first_name,billing_last_name,billing_company,billing_email,billing_phone,billing_address_1,billing_address_2,billing_postcode,billing_city,billing_state,billing_country,shipping_first_name,shipping_last_name,shipping_company,shipping_address_1,shipping_address_2,shipping_postcode,shipping_city,shipping_state,shipping_country,customer_note,shipping_items,fee_items,tax_items,coupon_items,refund_items,order_notes,download_permissions,customer_ip_address,paid_date,completed_date,line_item_1,line_item_2,line_item_3
2
  1001,1001,16-05-2018 07:32:06,completed,10,1.8,1,0.18,3.42,0,0,0,22.42,USD,cod,Express Delivery,3,3,lilly@example.com,Lilly,Gordon,,lilly@example.com,9898989898,20 Maple Avenue,,90731,San Pedro,CA,US,Lilly,Gordon,,20 Maple Avenue,"Door No,16",90731,San Pedro,CA,US,Deliver with a smile!,"item:Items|value:Formal shoe X 1
3
+ ",name:Gift Wrap|total:1.00|tax:0.18,code:GST-1|total:3.42,,,Order status changed from Processing to Completed.|Formal shoe (A12) stock reduced from 20 to 19.|Payment to be made upon delivery. Order status changed from Pending payment to Processing.,1,::1,2020-03-19 06:40:32,2020-03-19 06:40:32,name:Formal shoe|product_id:13|sku:A12|quantity:1|total:8.00|tax:1.44,,
4
  1002,1002,16-05-2018 07:25:28,on-hold,10,1.8,0,0,5.04,0,0,0,33.04,USD,paypal,Express Delivery,0,0,,John,Edward,,john@example.com,9999999,300 BOYLSTON AVE E,,98102,Seattle,WA,US,John,Edward,,300 BOYLSTON AVE E,,98102,Seattle,WA,US,,"item:Items|value:Washing machine X 1
5
+ ",,code:GST-1|total:5.04,,amount:46.00|reason:refund|date:2019-06-19 12:13:48,Order status changed from Pending payment to Processing.|Washing machine (A15) stock reduced from 30 to 29.|IPN payment completed,1,::1,,,name:Washing machine|product_id:616773451|sku:A15|quantity:1|total:18.00|tax:3.24,,
6
  1003,1003,16-05-2018 07:21:32,processing,10,1.8,0,0,8.99,10,10,10,58.98,USD,eh_stripe_pay,Express Delivery,2,2,mark@example.com,Mark,Xa,Xadapter,mark@example.com,9898989898,20 Maple Avenue,,90731,San Pedro,CA,US,Mark,Xa,Xadapter,20 Maple Avenue,,90731,San Pedro,CA,US,,"item:Items|value:LED TV X 1, Samsung Galaxy Ace Duos X 1, Men's Cotton T-Shirt - Red X 1
7
+ ",,code:GST-1|total:8.99,code:flat20|amount:10.00,,"Order status changed from Pending payment to Processing.|LED TV (A13) stock reduced from 19 to 18.|Samsung Galaxy Ace Duos (A11) stock reduced from 10 to 9.|Men's Cotton T-Shirt - Red (B11V2)<span class=""description""></span> stock reduced from 9 to 8.|Payment Status : Succeeded [ 2018-05-16 12:51:06 ] . Source : Visa( credit ). Charge Status :Captured. Transaction ID : txn_1CSJwcJ91uK4qPibEmTjip6P:is_customer_note",1,::1,,,name:LED TV|product_id:616773447|sku:A13|quantity:1|total:23.19|tax:4.17,name:Samsung Galaxy Ace Duos|product_id:616773443|sku:A11|quantity:1|total:8.80|tax:1.58,name:Men's Cotton T-Shirt|product_id:616773455|sku:B11V2|quantity:1|total:8.00|color:Red|_variation_id:616773455|tax:1.44
includes/exporter/class-wf-cpnimpexpcsv-exporter.php CHANGED
@@ -8,7 +8,6 @@ class WF_CpnImpExpCsv_Exporter {
8
 
9
  public static function do_export($post_type = 'shop_coupon') {
10
  global $wpdb;
11
- absint($maybeint);
12
  $export_limit = !empty($_POST['limit']) ? absint($_POST['limit']) : 999999999;
13
  $export_count = 0;
14
  $limit = 100;
8
 
9
  public static function do_export($post_type = 'shop_coupon') {
10
  global $wpdb;
 
11
  $export_limit = !empty($_POST['limit']) ? absint($_POST['limit']) : 999999999;
12
  $export_count = 0;
13
  $limit = 100;
includes/exporter/class-wf-orderimpexpcsv-exporter.php CHANGED
@@ -324,7 +324,24 @@ class WF_OrderImpExpCsv_Exporter {
324
  'refund_items' => implode(';', $refund_items),
325
  'order_notes' => implode('||', (defined('WC_VERSION') && (WC_VERSION >= 3.2)) ? WF_OrderImpExpCsv_Exporter::get_order_notes_new($order) : WF_OrderImpExpCsv_Exporter::get_order_notes($order)),
326
  'download_permissions' => $order->is_download_permitted() ? $order->is_download_permitted() : 0,
 
 
 
327
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
328
  }
329
  foreach ($order_data as $key => $value) {
330
  if (!$export_columns || in_array( $key, $export_columns ) ){
324
  'refund_items' => implode(';', $refund_items),
325
  'order_notes' => implode('||', (defined('WC_VERSION') && (WC_VERSION >= 3.2)) ? WF_OrderImpExpCsv_Exporter::get_order_notes_new($order) : WF_OrderImpExpCsv_Exporter::get_order_notes($order)),
326
  'download_permissions' => $order->is_download_permitted() ? $order->is_download_permitted() : 0,
327
+ 'customer_ip_address' => $order->get_customer_ip_address() ? $order->get_customer_ip_address() : '',
328
+ 'paid_date' => '',
329
+ 'completed_date' => '',
330
  );
331
+ if($order->get_date_paid()){
332
+ $paid_date = $order->get_date_paid();
333
+ $paid_date_timestamp = strtotime($paid_date);
334
+ $formatted_paid_date = date('Y-m-d H:i:s', $paid_date_timestamp);
335
+ $order_data['paid_date'] = $formatted_paid_date ;
336
+
337
+ }
338
+ if($order->get_date_completed()){
339
+ $date_completed = $order->get_date_completed();
340
+ $date_completed_timestamp = strtotime($date_completed);
341
+ $formatted_date_completed = date('Y-m-d H:i:s', $date_completed_timestamp);
342
+ $order_data['completed_date'] = $formatted_date_completed ;
343
+
344
+ }
345
  }
346
  foreach ($order_data as $key => $value) {
347
  if (!$export_columns || in_array( $key, $export_columns ) ){
includes/exporter/data/data-wf-post-columns.php CHANGED
@@ -52,5 +52,8 @@ return apply_filters('woocommerce_csv_order_post_columns', array(
52
  'coupon_items' => 'coupon_items',
53
  'refund_items' => 'refund_items',
54
  'order_notes' => 'order_notes',
55
- 'download_permissions' => 'download_permissions'
 
 
 
56
  ));
52
  'coupon_items' => 'coupon_items',
53
  'refund_items' => 'refund_items',
54
  'order_notes' => 'order_notes',
55
+ 'download_permissions' => 'download_permissions',
56
+ 'customer_ip_address' => 'customer_ip_address',
57
+ 'paid_date' => 'paid_date',
58
+ 'completed_date'=>'completed_date'
59
  ));
includes/importer/class-wf-csv-parser.php CHANGED
@@ -63,6 +63,9 @@ class WF_CSV_Parser {
63
  "shipping_country",
64
  "shipping_method",
65
  "download_permissions",
 
 
 
66
  );
67
  }
68
 
@@ -420,6 +423,13 @@ class WF_CSV_Parser {
420
  }
421
  }
422
  }
 
 
 
 
 
 
 
423
  if (!empty($item['customer_id']))
424
  $postmeta[] = array('key' => '_customer_user', 'value' => $item['customer_id']);
425
  $order_shipping_methods = array();
63
  "shipping_country",
64
  "shipping_method",
65
  "download_permissions",
66
+ "customer_ip_address",
67
+ "paid_date",
68
+ "completed_date"
69
  );
70
  }
71
 
423
  }
424
  }
425
  }
426
+ if(isset($item['paid_date']) && !empty($item['paid_date'])){
427
+ $postmeta[] = array('key' => '_date_paid', 'value' => strtotime($item['paid_date']));
428
+ }
429
+ if(isset($item['completed_date']) && !empty($item['completed_date'])){
430
+ $postmeta[] = array('key' => '_date_completed', 'value' => strtotime($item['completed_date']));
431
+ }
432
+
433
  if (!empty($item['customer_id']))
434
  $postmeta[] = array('key' => '_customer_user', 'value' => $item['customer_id']);
435
  $order_shipping_methods = array();
order-import-export-for-woocommerce.php CHANGED
@@ -6,9 +6,9 @@ Plugin URI: https://wordpress.org/plugins/order-import-export-for-woocommerce/
6
  Description: Export and Import Order detail including line items, From and To your WooCommerce Store.
7
  Author: WebToffee
8
  Author URI: https://www.webtoffee.com/product/woocommerce-order-coupon-subscription-export-import/
9
- Version: 1.6.1
10
  Text Domain: order-import-export-for-woocommerce
11
- WC tested up to: 3.9.2
12
  License: GPLv3
13
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
14
  */
@@ -24,7 +24,7 @@ define("WF_CPN_IMP_EXP_ID", "wf_cpn_imp_exp");
24
  define("wf_coupon_csv_im_ex", "wf_coupon_csv_im_ex");
25
 
26
  if (!defined('WF_ORDERIMPEXP_CURRENT_VERSION')) {
27
- define("WF_ORDERIMPEXP_CURRENT_VERSION", "1.6.1");
28
  }
29
 
30
  /**
6
  Description: Export and Import Order detail including line items, From and To your WooCommerce Store.
7
  Author: WebToffee
8
  Author URI: https://www.webtoffee.com/product/woocommerce-order-coupon-subscription-export-import/
9
+ Version: 1.6.2
10
  Text Domain: order-import-export-for-woocommerce
11
+ WC tested up to: 4.0.0
12
  License: GPLv3
13
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
14
  */
24
  define("wf_coupon_csv_im_ex", "wf_coupon_csv_im_ex");
25
 
26
  if (!defined('WF_ORDERIMPEXP_CURRENT_VERSION')) {
27
+ define("WF_ORDERIMPEXP_CURRENT_VERSION", "1.6.2");
28
  }
29
 
30
  /**
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.webtoffee.com/plugins/
4
  Tags: order export, order import, woocommerce export orders, woocommerce import orders, export orders, import orders, order, export, import, woocommerce, csv, coupon, coupon export, coupon import, woocommerce export coupon , woocommerce import coupon , export coupons, import coupons, woocommerce coupon generator
5
  Requires at least: 3.0.1
6
  Tested up to: 5.3.2
7
- Stable tag: 1.6.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -21,7 +21,7 @@ This is a perfect tool if you are migrating an existing shop on a different eCom
21
  &#128312; Import Coupons from CSV file.
22
  &#128312; Export Subscription Orders to CSV file(Premium Feature).
23
  &#128312; Import Subscription Orders from CSV file(Premium Feature).
24
- &#128312; Tested OK with WooCommerce 3.9.2
25
  &#128312; Tested OK with PHP 7.3.5
26
 
27
  <blockquote>
@@ -115,6 +115,9 @@ By default, admin and store manager are given access to export orders from your
115
 
116
  == Changelog ==
117
 
 
 
 
118
  = 1.6.1 =
119
  * [Improvement] Security
120
  = 1.6.0 =
4
  Tags: order export, order import, woocommerce export orders, woocommerce import orders, export orders, import orders, order, export, import, woocommerce, csv, coupon, coupon export, coupon import, woocommerce export coupon , woocommerce import coupon , export coupons, import coupons, woocommerce coupon generator
5
  Requires at least: 3.0.1
6
  Tested up to: 5.3.2
7
+ Stable tag: 1.6.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
21
  &#128312; Import Coupons from CSV file.
22
  &#128312; Export Subscription Orders to CSV file(Premium Feature).
23
  &#128312; Import Subscription Orders from CSV file(Premium Feature).
24
+ &#128312; Tested OK with WooCommerce 4.0.0
25
  &#128312; Tested OK with PHP 7.3.5
26
 
27
  <blockquote>
115
 
116
  == Changelog ==
117
 
118
+ = 1.6.2 =
119
+ * Bug Fix:- Paid date and Completed date not importing.
120
+ * Tested OK with WC 4.0.0
121
  = 1.6.1 =
122
  * [Improvement] Security
123
  = 1.6.0 =