Version Description
- Tested OK with WP 5.2
- Bug Fix:- Issue with Coupon Expiry Date export and import.
Download this release
Release Info
Developer | webtoffee |
Plugin | Order Export & Order Import for WooCommerce |
Version | 1.4.6 |
Comparing to | |
See all releases |
Code changes from version 1.4.4 to 1.4.6
- includes/exporter/class-wf-cpnimpexpcsv-exporter.php +8 -4
- includes/exporter/class-wf-orderimpexpcsv-exporter.php +15 -4
- includes/exporter/data/data-wf-post-columns-coupon.php +0 -1
- includes/importer/class-wf-cpnimpexpcsv-coupon-import.php +8 -7
- includes/views/export/html-wf-export-orders.php +21 -1
- order-import-export-for-woocommerce.php +3 -3
- readme.txt +15 -6
includes/exporter/class-wf-cpnimpexpcsv-exporter.php
CHANGED
@@ -29,9 +29,7 @@ class WF_CpnImpExpCsv_Exporter {
|
|
29 |
if (function_exists('apache_setenv'))
|
30 |
@apache_setenv('no-gzip', 1);
|
31 |
@ini_set('zlib.output_compression', 0);
|
32 |
-
|
33 |
-
@ob_clean();
|
34 |
-
}
|
35 |
|
36 |
|
37 |
header('Content-Type: text/csv; charset=UTF-8');
|
@@ -66,7 +64,9 @@ class WF_CpnImpExpCsv_Exporter {
|
|
66 |
|
67 |
if (!$export_columns || in_array('meta', $export_columns)) {
|
68 |
foreach ($found_coupon_meta as $coupon_meta) {
|
69 |
-
$
|
|
|
|
|
70 |
}
|
71 |
}
|
72 |
|
@@ -98,6 +98,10 @@ class WF_CpnImpExpCsv_Exporter {
|
|
98 |
}
|
99 |
|
100 |
if (!$export_columns || in_array($column, $export_columns)) {
|
|
|
|
|
|
|
|
|
101 |
if (isset($product->meta->$column)) {
|
102 |
$row[] = self::format_data($product->meta->$column);
|
103 |
} elseif (isset($product->$column) && !is_array($product->$column)) {
|
29 |
if (function_exists('apache_setenv'))
|
30 |
@apache_setenv('no-gzip', 1);
|
31 |
@ini_set('zlib.output_compression', 0);
|
32 |
+
@ob_end_clean();
|
|
|
|
|
33 |
|
34 |
|
35 |
header('Content-Type: text/csv; charset=UTF-8');
|
64 |
|
65 |
if (!$export_columns || in_array('meta', $export_columns)) {
|
66 |
foreach ($found_coupon_meta as $coupon_meta) {
|
67 |
+
if($coupon_meta == 'date_expires')
|
68 |
+
continue;
|
69 |
+
$row[] = 'meta:' . $coupon_meta;
|
70 |
}
|
71 |
}
|
72 |
|
98 |
}
|
99 |
|
100 |
if (!$export_columns || in_array($column, $export_columns)) {
|
101 |
+
if($column == 'expiry_date'){
|
102 |
+
$row[] = $product->date_expires ? self::format_data(date('Y-m-d',$product->date_expires)) : '';
|
103 |
+
continue;
|
104 |
+
}
|
105 |
if (isset($product->meta->$column)) {
|
106 |
$row[] = self::format_data($product->meta->$column);
|
107 |
} elseif (isset($product->$column) && !is_array($product->$column)) {
|
includes/exporter/class-wf-orderimpexpcsv-exporter.php
CHANGED
@@ -29,9 +29,7 @@ class WF_OrderImpExpCsv_Exporter {
|
|
29 |
if (function_exists('apache_setenv'))
|
30 |
@apache_setenv('no-gzip', 1);
|
31 |
@ini_set('zlib.output_compression', 0);
|
32 |
-
|
33 |
-
@ob_clean();
|
34 |
-
}
|
35 |
|
36 |
header('Content-Type: text/csv; charset=UTF-8');
|
37 |
header('Content-Disposition: attachment; filename=woocommerce-order-export.csv');
|
@@ -306,7 +304,7 @@ class WF_OrderImpExpCsv_Exporter {
|
|
306 |
'fee_items' => implode(';', $fee_items),
|
307 |
'tax_items' => implode(';', $tax_items),
|
308 |
'coupon_items' => implode(';', $coupon_items),
|
309 |
-
'order_notes' => implode('||', WF_OrderImpExpCsv_Exporter::get_order_notes($order)),
|
310 |
'download_permissions' => $order->is_download_permitted() ? $order->is_download_permitted() : 0,
|
311 |
);
|
312 |
|
@@ -363,5 +361,18 @@ class WF_OrderImpExpCsv_Exporter {
|
|
363 |
}
|
364 |
return $order_notes;
|
365 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
|
367 |
}
|
29 |
if (function_exists('apache_setenv'))
|
30 |
@apache_setenv('no-gzip', 1);
|
31 |
@ini_set('zlib.output_compression', 0);
|
32 |
+
@ob_end_clean();
|
|
|
|
|
33 |
|
34 |
header('Content-Type: text/csv; charset=UTF-8');
|
35 |
header('Content-Disposition: attachment; filename=woocommerce-order-export.csv');
|
304 |
'fee_items' => implode(';', $fee_items),
|
305 |
'tax_items' => implode(';', $tax_items),
|
306 |
'coupon_items' => implode(';', $coupon_items),
|
307 |
+
'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)),
|
308 |
'download_permissions' => $order->is_download_permitted() ? $order->is_download_permitted() : 0,
|
309 |
);
|
310 |
|
361 |
}
|
362 |
return $order_notes;
|
363 |
}
|
364 |
+
|
365 |
+
public static function get_order_notes_new($order) {
|
366 |
+
$notes = wc_get_order_notes(array('order_id' => $order->get_id(),'order_by' => 'date_created','order' => 'ASC'));
|
367 |
+
$order_notes = array();
|
368 |
+
foreach ($notes as $note) {
|
369 |
+
$order_notes[] = implode('|', array(
|
370 |
+
'content:' .str_replace(array("\r", "\n"), ' ', $note->content),
|
371 |
+
'date:'.$note->date_created->date('Y-m-d H:i:s'),
|
372 |
+
'customer:'.$note->customer_note
|
373 |
+
));
|
374 |
+
}
|
375 |
+
return $order_notes;
|
376 |
+
}
|
377 |
|
378 |
}
|
includes/exporter/data/data-wf-post-columns-coupon.php
CHANGED
@@ -28,6 +28,5 @@ return apply_filters('coupon_csv_coupon_post_columns', array(
|
|
28 |
'minimum_amount' => 'minimum_amount',
|
29 |
'maximum_amount' => 'maximum_amount',
|
30 |
'customer_email' => 'customer_email',
|
31 |
-
'date_expires' => 'date_expires',
|
32 |
'usage_count' => 'usage_count',
|
33 |
) );
|
28 |
'minimum_amount' => 'minimum_amount',
|
29 |
'maximum_amount' => 'maximum_amount',
|
30 |
'customer_email' => 'customer_email',
|
|
|
31 |
'usage_count' => 'usage_count',
|
32 |
) );
|
includes/importer/class-wf-cpnimpexpcsv-coupon-import.php
CHANGED
@@ -816,13 +816,14 @@ class WF_CpnImpExpCsv_Coupon_Import extends WP_Importer {
|
|
816 |
if ($key) {
|
817 |
if ($key == 'product_categories' || $key == 'exclude_product_categories') {
|
818 |
update_post_meta($post_id, $key, explode(",", $meta['value']));
|
819 |
-
}
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
|
|
826 |
}
|
827 |
}
|
828 |
}
|
816 |
if ($key) {
|
817 |
if ($key == 'product_categories' || $key == 'exclude_product_categories') {
|
818 |
update_post_meta($post_id, $key, explode(",", $meta['value']));
|
819 |
+
} elseif ($key == 'customer_email') {
|
820 |
+
$data = explode(',', $meta['value']);
|
821 |
+
update_post_meta($post_id, $key, $data);
|
822 |
+
} elseif ($key == 'expiry_date') {
|
823 |
+
$data = strtotime($meta['value']);
|
824 |
+
update_post_meta($post_id, 'date_expires', $data);
|
825 |
+
}else {
|
826 |
+
update_post_meta($post_id, $key, maybe_unserialize($meta['value']));
|
827 |
}
|
828 |
}
|
829 |
}
|
includes/views/export/html-wf-export-orders.php
CHANGED
@@ -1,7 +1,27 @@
|
|
1 |
<div class="tool-box bg-white p-20p">
|
2 |
-
<h3 class="title"><?php _e('Export
|
3 |
<p><?php _e('Export and download your orders in CSV format. This file can be used to import orders back into your Woocommerce shop.', 'order-import-export-for-woocommerce'); ?></p>
|
4 |
<form action="<?php echo admin_url('admin.php?page=wf_woocommerce_order_im_ex&action=export'); ?>" method="post">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
<p class="submit"><input type="submit" class="button button-primary" value="<?php _e('Export Orders', 'order-import-export-for-woocommerce'); ?>" /></p>
|
6 |
</form>
|
7 |
</div>
|
1 |
<div class="tool-box bg-white p-20p">
|
2 |
+
<h3 class="title"><?php _e('Export Settings:', 'order-import-export-for-woocommerce'); ?></h3>
|
3 |
<p><?php _e('Export and download your orders in CSV format. This file can be used to import orders back into your Woocommerce shop.', 'order-import-export-for-woocommerce'); ?></p>
|
4 |
<form action="<?php echo admin_url('admin.php?page=wf_woocommerce_order_im_ex&action=export'); ?>" method="post">
|
5 |
+
<table class="form-table">
|
6 |
+
<tr>
|
7 |
+
<th>
|
8 |
+
<label for="ord_offset"><?php _e('Offset', 'order-import-export-for-woocommerce'); ?></label>
|
9 |
+
</th>
|
10 |
+
<td>
|
11 |
+
<input type="text" name="offset" id="ord_offset" placeholder="0" class="input-text" />
|
12 |
+
<p style="font-size: 12px"><?php _e('Number of orders to skip before exporting. If the value is 0 no orders are skipped. If value is 100, orders from order id 101 will be exported.', 'order-import-export-for-woocommerce'); ?></p>
|
13 |
+
</td>
|
14 |
+
</tr>
|
15 |
+
<tr>
|
16 |
+
<th>
|
17 |
+
<label for="ord_limit"><?php _e('Limit', 'order-import-export-for-woocommerce'); ?></label>
|
18 |
+
</th>
|
19 |
+
<td>
|
20 |
+
<input type="text" name="limit" id="ord_limit" placeholder="<?php _e('Unlimited', 'order-import-export-for-woocommerce'); ?>" class="input-text" />
|
21 |
+
<p style="font-size: 12px"><?php _e('Number of orders to export. If no value is given all orders will be exported. This is useful if you have large number of orders and want to export partial list of orders.', 'order-import-export-for-woocommerce'); ?></p>
|
22 |
+
</td>
|
23 |
+
</tr>
|
24 |
+
</table>
|
25 |
<p class="submit"><input type="submit" class="button button-primary" value="<?php _e('Export Orders', 'order-import-export-for-woocommerce'); ?>" /></p>
|
26 |
</form>
|
27 |
</div>
|
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.4.
|
10 |
Text Domain: order-import-export-for-woocommerce
|
11 |
-
WC tested up to: 3.6.
|
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.4.
|
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.4.6
|
10 |
Text Domain: order-import-export-for-woocommerce
|
11 |
+
WC tested up to: 3.6.2
|
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.4.6");
|
28 |
}
|
29 |
|
30 |
/**
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ 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
|
5 |
Requires at least: 3.0.1
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 1.4.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -21,7 +21,8 @@ This is perfect tool if you are migrating an existing shop on a different eComme
|
|
21 |
🔸 Import Coupons from CSV file.
|
22 |
🔸 Export Subscription Orders to CSV file(Premium Feature).
|
23 |
🔸 Import Subscription Orders from CSV file(Premium Feature).
|
24 |
-
🔸 Tested OK with WooCommerce 3.6.
|
|
|
25 |
|
26 |
<blockquote>
|
27 |
|
@@ -110,6 +111,14 @@ Yes. You can import or export order line item details.
|
|
110 |
|
111 |
== Changelog ==
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
= 1.4.4 =
|
114 |
* Tested OK with WC 3.6.1 and WP 5.1.1.
|
115 |
* Bug Fix and Improvements: Tax calculation.
|
@@ -224,6 +233,6 @@ Yes. You can import or export order line item details.
|
|
224 |
* Export /Import WooCommerce Orders.
|
225 |
|
226 |
== Upgrade Notice ==
|
227 |
-
= 1.4.
|
228 |
-
* Tested OK with
|
229 |
-
* Bug Fix
|
3 |
Donate link: https://www.webtoffee.com/plugins/
|
4 |
Tags: Order Export, Order Import, WooCommerce Export Orders , WooCommerce Import Orders , Export Orders, Import Orders
|
5 |
Requires at least: 3.0.1
|
6 |
+
Tested up to: 5.2
|
7 |
+
Stable tag: 1.4.6
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
21 |
🔸 Import Coupons from CSV file.
|
22 |
🔸 Export Subscription Orders to CSV file(Premium Feature).
|
23 |
🔸 Import Subscription Orders from CSV file(Premium Feature).
|
24 |
+
🔸 Tested OK with WooCommerce 3.6.2
|
25 |
+
🔸 Tested OK with PHP 7.3.5
|
26 |
|
27 |
<blockquote>
|
28 |
|
111 |
|
112 |
== Changelog ==
|
113 |
|
114 |
+
= 1.4.6 =
|
115 |
+
* Tested OK with WP 5.2
|
116 |
+
* Bug Fix:- Issue with Coupon Expiry Date export and import.
|
117 |
+
= 1.4.5 =
|
118 |
+
* Tested OK with WC 3.6.2
|
119 |
+
* New Feature:- Filters added in order export(offset & limit).
|
120 |
+
* Order notes optimisation.
|
121 |
+
* Compatibility with PHP 7.3.5
|
122 |
= 1.4.4 =
|
123 |
* Tested OK with WC 3.6.1 and WP 5.1.1.
|
124 |
* Bug Fix and Improvements: Tax calculation.
|
233 |
* Export /Import WooCommerce Orders.
|
234 |
|
235 |
== Upgrade Notice ==
|
236 |
+
= 1.4.6 =
|
237 |
+
* Tested OK with WP 5.2
|
238 |
+
* Bug Fix:- Issue with Coupon Expiry Date export and import.
|