Order Export & Order Import for WooCommerce - Version 2.0.7

Version Description

  • Fixed: Paid date import
Download this release

Release Info

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

Code changes from version 2.0.6 to 2.0.7

admin/classes/class-csvreader.php CHANGED
@@ -65,6 +65,7 @@ class Wt_Import_Export_For_Woo_Basic_Csvreader
65
 
66
  foreach($sample_data_key as $k => $key)
67
  {
 
68
  if(!$key)
69
  {
70
  continue;
@@ -211,7 +212,8 @@ class Wt_Import_Export_For_Woo_Basic_Csvreader
211
 
212
  /* clearing temp variables */
213
  $row_column_count=$head_column_count=null;
214
- unset($row_column_count, $head_column_count);
 
215
 
216
  /* preparing associative array */
217
  $data_row=array_combine($head_arr, $row);
65
 
66
  foreach($sample_data_key as $k => $key)
67
  {
68
+ $key = trim($key);
69
  if(!$key)
70
  {
71
  continue;
212
 
213
  /* clearing temp variables */
214
  $row_column_count=$head_column_count=null;
215
+ unset($row_column_count, $head_column_count);
216
+ $head_arr = array_map('trim', $head_arr);
217
 
218
  /* preparing associative array */
219
  $data_row=array_combine($head_arr, $row);
admin/modules/coupon/import/import.php CHANGED
@@ -227,7 +227,7 @@ class Wt_Import_Export_For_Woo_Basic_Coupon_Import {
227
  continue;
228
  }
229
  if ('free_shipping' == $column ) {
230
- $item_data['free_shipping'] = ($value);
231
  continue;
232
  }
233
  if ('exclude_sale_items' == $column ) {
@@ -787,7 +787,7 @@ class Wt_Import_Export_For_Woo_Basic_Coupon_Import {
787
  try {
788
  do_action('wt_woocommerce_coupon_import_before_process_item', $data);
789
  $data = apply_filters('wt_woocommerce_coupon_import_process_item', $data);
790
-
791
  $post_id = $data['id'];
792
  $object = new WC_Coupon($post_id);
793
 
@@ -799,7 +799,7 @@ class Wt_Import_Export_For_Woo_Basic_Coupon_Import {
799
 
800
  Wt_Import_Export_For_Woo_Basic_Logwriter::write_log($this->parent_module->module_base, 'import', "Found coupon object. ID:".$object->get_id());
801
 
802
- $boolean_keys = apply_filters('wt_ier_coupon_boolean_keys', array('exclude_sale_items', 'individual_use'));
803
 
804
  foreach ($data as $key => $value) {
805
 
227
  continue;
228
  }
229
  if ('free_shipping' == $column ) {
230
+ $item_data['free_shipping'] = wc_string_to_bool($value);
231
  continue;
232
  }
233
  if ('exclude_sale_items' == $column ) {
787
  try {
788
  do_action('wt_woocommerce_coupon_import_before_process_item', $data);
789
  $data = apply_filters('wt_woocommerce_coupon_import_process_item', $data);
790
+
791
  $post_id = $data['id'];
792
  $object = new WC_Coupon($post_id);
793
 
799
 
800
  Wt_Import_Export_For_Woo_Basic_Logwriter::write_log($this->parent_module->module_base, 'import', "Found coupon object. ID:".$object->get_id());
801
 
802
+ $boolean_keys = apply_filters('wt_ier_coupon_boolean_keys', array('exclude_sale_items', 'individual_use', 'free_shipping'));
803
 
804
  foreach ($data as $key => $value) {
805
 
admin/modules/order/export/export.php CHANGED
@@ -520,11 +520,13 @@ class Wt_Import_Export_For_Woo_Basic_Order_Export {
520
  }
521
 
522
  if (version_compare(WC_VERSION, '2.7', '<')) {
 
 
523
  $order_data = array(
524
  'order_id' => $order->id,
525
  'order_number' => $order->get_order_number(),
526
  'order_date' => date('Y-m-d H:i:s', strtotime(get_post($order->id)->post_date)),
527
- 'paid_date' => date('Y-m-d H:i:s', get_post_meta($order->id, '_date_paid')),
528
  'status' => $order->get_status(),
529
  'shipping_total' => $order->get_total_shipping(),
530
  'shipping_tax_total' => wc_format_decimal($order->get_shipping_tax(), 2),
@@ -573,11 +575,12 @@ class Wt_Import_Export_For_Woo_Basic_Order_Export {
573
  'download_permissions' => $order->download_permissions_granted ? $order->download_permissions_granted : 0,
574
  );
575
  } else {
 
576
  $order_data = array(
577
  'order_id' => $order->get_id(),
578
  'order_number' => $order->get_order_number(),
579
  'order_date' => date('Y-m-d H:i:s', strtotime(get_post($order->get_id())->post_date)),
580
- 'paid_date' => date('Y-m-d H:i:s', strtotime($order->get_date_paid())),
581
  'status' => $order->get_status(),
582
  'shipping_total' => $order->get_total_shipping(),
583
  'shipping_tax_total' => wc_format_decimal($order->get_shipping_tax(), 2),
520
  }
521
 
522
  if (version_compare(WC_VERSION, '2.7', '<')) {
523
+
524
+ $paid_date = get_post_meta($order->id, '_date_paid');
525
  $order_data = array(
526
  'order_id' => $order->id,
527
  'order_number' => $order->get_order_number(),
528
  'order_date' => date('Y-m-d H:i:s', strtotime(get_post($order->id)->post_date)),
529
+ 'paid_date' => isset($paid_date) ? date('Y-m-d H:i:s', $paid_date) : '',
530
  'status' => $order->get_status(),
531
  'shipping_total' => $order->get_total_shipping(),
532
  'shipping_tax_total' => wc_format_decimal($order->get_shipping_tax(), 2),
575
  'download_permissions' => $order->download_permissions_granted ? $order->download_permissions_granted : 0,
576
  );
577
  } else {
578
+ $paid_date = $order->get_date_paid();
579
  $order_data = array(
580
  'order_id' => $order->get_id(),
581
  'order_number' => $order->get_order_number(),
582
  'order_date' => date('Y-m-d H:i:s', strtotime(get_post($order->get_id())->post_date)),
583
+ 'paid_date' => isset($paid_date) ? date('Y-m-d H:i:s', strtotime($paid_date)) : '',
584
  'status' => $order->get_status(),
585
  'shipping_total' => $order->get_total_shipping(),
586
  'shipping_tax_total' => wc_format_decimal($order->get_shipping_tax(), 2),
admin/modules/order/import/import.php CHANGED
@@ -197,13 +197,17 @@ class Wt_Import_Export_For_Woo_Basic_Order_Import {
197
  continue;
198
  }
199
 
200
- if ( 'date_created' == $column || 'post_date' == $column || '_paid_date' == $column || 'paid_date' == $column || 'order_date' == $column) {
201
  $date = $this->wt_parse_date_field($value,$column);
202
  $this->item_data['date_created'] = date('Y-m-d H:i:s', $date);
203
- if('_paid_date' == $column || 'paid_date' == $column)
204
- $this->item_data['date_paid'] = date('Y-m-d H:i:s', $date);
205
  continue;
206
  }
 
 
 
 
 
 
207
 
208
  if ('post_modified' == $column || 'date_modified' == $column || 'date_completed' == $column || '_completed_date' == $column ) {
209
  $date = $this->wt_parse_date_field($value,$column);
197
  continue;
198
  }
199
 
200
+ if ( 'date_created' == $column || 'post_date' == $column || 'order_date' == $column) {
201
  $date = $this->wt_parse_date_field($value,$column);
202
  $this->item_data['date_created'] = date('Y-m-d H:i:s', $date);
 
 
203
  continue;
204
  }
205
+ if(('_paid_date' == $column || 'paid_date' == $column) && $value != ''){
206
+
207
+ $date = $this->wt_parse_date_field($value,$column);
208
+ $this->item_data['date_paid'] = date('Y-m-d H:i:s', $date);
209
+ continue;
210
+ }
211
 
212
  if ('post_modified' == $column || 'date_modified' == $column || 'date_completed' == $column || '_completed_date' == $column ) {
213
  $date = $this->wt_parse_date_field($value,$column);
includes/class-wt-import-export-for-woo.php CHANGED
@@ -80,7 +80,7 @@ class Wt_Import_Export_For_Woo_Basic {
80
  if ( defined( 'WT_O_IEW_VERSION' ) ) {
81
  $this->version = WT_O_IEW_VERSION;
82
  } else {
83
- $this->version = '2.0.6';
84
  }
85
  $this->plugin_name = 'wt-import-export-for-woo-basic';
86
 
80
  if ( defined( 'WT_O_IEW_VERSION' ) ) {
81
  $this->version = WT_O_IEW_VERSION;
82
  } else {
83
+ $this->version = '2.0.7';
84
  }
85
  $this->plugin_name = 'wt-import-export-for-woo-basic';
86
 
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: 2.0.6
10
  Text Domain: order-import-export-for-woocommerce
11
- WC tested up to: 5.3.0
12
  License: GPLv3
13
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
14
  */
@@ -45,7 +45,7 @@ if ( !defined( 'WT_IEW_DEBUG_BASIC_TROUBLESHOOT' ) ) {
45
  * Start at version 1.0.0 and use SemVer - https://semver.org
46
  * Rename this for your plugin and update it as you release new versions.
47
  */
48
- define( 'WT_O_IEW_VERSION', '2.0.6' );
49
 
50
  /**
51
  * The code that runs during plugin activation.
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: 2.0.7
10
  Text Domain: order-import-export-for-woocommerce
11
+ WC tested up to: 5.4
12
  License: GPLv3
13
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
14
  */
45
  * Start at version 1.0.0 and use SemVer - https://semver.org
46
  * Rename this for your plugin and update it as you release new versions.
47
  */
48
+ define( 'WT_O_IEW_VERSION', '2.0.7' );
49
 
50
  /**
51
  * The code that runs during plugin activation.
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
  === Order Export & Order Import for WooCommerce ===
2
  Contributors: webtoffee
3
  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, advanced order export
5
  Requires at least: 3.0.1
6
  Tested up to: 5.7
7
  Requires PHP: 5.6
8
- Stable tag: 2.0.6
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -13,19 +13,23 @@ The best order export import plugin for WooCommerce. Easily import and export Wo
13
 
14
  == Description ==
15
 
16
- = Introduction - Order/Coupon Import Export Plugin =
17
- Order Import Export Plugin for WooCommerce is a perfect tool if you are migrating an existing shop on a different eCommerce platform to WooCommerce. Using the WooCommerce order export plugin you can also migrate order data seamlessly from one WooCommerce store to another allowing you to maintain your order history including subscription orders (available in premium).
18
- The plugin will also allow you to migrate thousands of coupons from your old eCommerce platform or Campaigns.
 
 
 
19
  The following are functionalities offered by the basic version of the plugin.
20
 
21
- &#128312; Export Orders to CSV.
22
- &#128312; Import Orders from CSV.
23
- &#128312; Export Coupons to CSV.
24
- &#128312; Import Coupons from CSV.
25
  &#128312; Bulk update WooCommerce orders and coupons.
26
- &#128312; Export Subscription Orders to a CSV file(Premium Feature).
27
- &#128312; Import Subscription Orders from a CSV file(Premium Feature).
28
- &#128312; Tested OK with WooCommerce 5.3.0
 
29
  &#128312; Tested OK with WP 5.7
30
  &#128312; Tested OK with PHP 8.0
31
 
@@ -52,10 +56,10 @@ More information about the setup of the plugin and a sample CSV that is taken as
52
  &#9989; Import Subscription Orders from CSV file.
53
  &#9989; Import Coupons from CSV file.
54
  &#9989; Export Coupons to CSV file.
55
- &#9989; Importing Order meta to WooCommerce.
56
  &#9989; Export Filters(Order Status, Product, Coupon Type, Customer etc)
57
  &#9989; Change values while import using Evaluation Field feature.
58
- &#9989; A number of third party plugins supported.
59
  &#9989; Column Mapping Feature to Import from any CSV format.
60
  &#9989; Import and Export via FTP.
61
  &#9989; Schedule automatic import using Cron Job Feature.
@@ -108,6 +112,9 @@ Other useful plugins from WebToffee for migrating WooCommerce data:
108
 
109
  <a rel="nofollow" href="https://wordpress.org/plugins/users-customers-import-export-for-wp-woocommerce/">Import Export WordPress Users</a>: Import and export the users in your WordPress store using a CSV file with the help of this plugin.
110
 
 
 
 
111
 
112
  = About WebToffee.com =
113
 
@@ -213,6 +220,8 @@ Yes.
213
 
214
  == Changelog ==
215
 
 
 
216
  = 2.0.6 =
217
  * Fixed: Mail sending with order status transition on import
218
  = 2.0.5 =
@@ -437,5 +446,5 @@ Yes.
437
 
438
  == Upgrade Notice ==
439
 
440
- = 2.0.6 =
441
- * Fixed: Mail sending with order status transition on import
1
  === Order Export & Order Import for WooCommerce ===
2
  Contributors: webtoffee
3
  Donate link: https://www.webtoffee.com/plugins/
4
+ Tags: order export, order import, woocommerce, csv, coupon, woocommerce export orders, woocommerce import orders, order, export, import, coupon export, coupon import
5
  Requires at least: 3.0.1
6
  Tested up to: 5.7
7
  Requires PHP: 5.6
8
+ Stable tag: 2.0.7
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
13
 
14
  == Description ==
15
 
16
+ = Introduction - Order/Coupon Export Import Plugin =
17
+
18
+ Order Export Import Plugin for WooCommerce is a perfect tool for migrating order data seamlessly from one WooCommerce store to another while allowing you to maintain your order history including subscription orders (available in premium). Using the WooCommerce order export plugin you can also migrate an existing shop on a different eCommerce platform to WooCommerce.
19
+
20
+ The plugin will also allow you to migrate thousands of coupons from your old eCommerce platform or campaigns.
21
+
22
  The following are functionalities offered by the basic version of the plugin.
23
 
24
+ &#128312; Export orders to CSV.
25
+ &#128312; Import orders from CSV to WooCommerce.
26
+ &#128312; Export coupons to CSV.
27
+ &#128312; Import coupons from CSV to WooCommerce.
28
  &#128312; Bulk update WooCommerce orders and coupons.
29
+ &#128312; Supports various export filters (order status, product, coupon, customer, date range)
30
+ &#128312; Export Subscription orders to a CSV file(Premium Feature).
31
+ &#128312; Import Subscription orders from a CSV file(Premium Feature).
32
+ &#128312; Tested OK with WooCommerce 5.4
33
  &#128312; Tested OK with WP 5.7
34
  &#128312; Tested OK with PHP 8.0
35
 
56
  &#9989; Import Subscription Orders from CSV file.
57
  &#9989; Import Coupons from CSV file.
58
  &#9989; Export Coupons to CSV file.
59
+ &#9989; Importing order meta to WooCommerce.
60
  &#9989; Export Filters(Order Status, Product, Coupon Type, Customer etc)
61
  &#9989; Change values while import using Evaluation Field feature.
62
+ &#9989; <a href="https://www.webtoffee.com/order-import-export-plugin-for-woocommerce-third-party-compatibility/">Support for third-party plugins</a>.
63
  &#9989; Column Mapping Feature to Import from any CSV format.
64
  &#9989; Import and Export via FTP.
65
  &#9989; Schedule automatic import using Cron Job Feature.
112
 
113
  <a rel="nofollow" href="https://wordpress.org/plugins/users-customers-import-export-for-wp-woocommerce/">Import Export WordPress Users</a>: Import and export the users in your WordPress store using a CSV file with the help of this plugin.
114
 
115
+ <a rel="nofollow" href="https://wordpress.org/plugins/wp-migration-duplicator/">WordPress Backup & Migration</a>: Quickly migrate and backup entire WordPress site or selected files from one location to another. Backup to FTP, Google drive, Amazon S3 or local storage and easily restore them back.
116
+
117
+
118
 
119
  = About WebToffee.com =
120
 
220
 
221
  == Changelog ==
222
 
223
+ = 2.0.7 =
224
+ * Fixed: Paid date import
225
  = 2.0.6 =
226
  * Fixed: Mail sending with order status transition on import
227
  = 2.0.5 =
446
 
447
  == Upgrade Notice ==
448
 
449
+ = 2.0.7 =
450
+ * Fixed: Paid date import