Order Export & Order Import for WooCommerce - Version 1.7.5

Version Description

  • Tested OK with WC 5.2.0
Download this release

Release Info

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

Code changes from version 1.7.4 to 1.7.5

includes/exporter/class-wf-orderimpexpcsv-exporter.php CHANGED
@@ -218,15 +218,26 @@ class WF_OrderImpExpCsv_Exporter {
218
  }
219
 
220
  // add coupons
221
- foreach ($order->get_items('coupon') as $_ => $coupon_item) {
222
- $discount_amount = !empty($coupon_item['discount_amount']) ? $coupon_item['discount_amount'] : 0;
223
- $coupon_items[] = implode('|', array(
224
- 'code:' . $coupon_item['name'],
225
- 'amount:' . wc_format_decimal($discount_amount, 2),
226
- ));
227
- }
228
-
229
- foreach ($order->get_refunds() as $refunded_items){
 
 
 
 
 
 
 
 
 
 
 
230
 
231
  if ((WC()->version < '2.7.0')) {
232
  $refund_items[] = implode('|', array(
218
  }
219
 
220
  // add coupons
221
+ if ( (WC()->version < '4.4.0' ) ) {
222
+ foreach ( $order->get_items('coupon') as $_ => $coupon_item ) {
223
+ $discount_amount = !empty( $coupon_item[ 'discount_amount' ] ) ? $coupon_item[ 'discount_amount' ] : 0;
224
+ $coupon_items[] = implode( '|', array(
225
+ 'code:' . $coupon_item[ 'name' ],
226
+ 'amount:' . wc_format_decimal( $discount_amount, 2 ),
227
+ ) );
228
+ }
229
+ } else {
230
+ foreach ( $order->get_coupon_codes() as $_ => $coupon_code ) {
231
+ $coupon_obj = new WC_Coupon($coupon_code);
232
+ $discount_amount = !empty( $coupon_obj->get_amount() ) ? $coupon_obj->get_amount() : 0;
233
+ $coupon_items[] = implode( '|', array(
234
+ 'code:' . $coupon_code,
235
+ 'amount:' . wc_format_decimal( $discount_amount, 2 ),
236
+ ) );
237
+ }
238
+ }
239
+
240
+ foreach ($order->get_refunds() as $refunded_items){
241
 
242
  if ((WC()->version < '2.7.0')) {
243
  $refund_items[] = implode('|', array(
includes/importer/class-wf-orderimpexpcsv-order-import.php CHANGED
@@ -297,8 +297,8 @@ class WF_OrderImpExpCsv_Order_Import extends WP_Importer {
297
  @ob_flush();
298
  @flush();
299
  $wpdb->hide_errors();
300
- $this->processed_terms = isset($_POST['processed_terms']) ? wc_clean($_POST['processed_terms']) : array();
301
- $this->processed_posts = isset($_POST['processed_posts']) ? array_map('intval', $_POST['processed_posts']) : array();
302
  $file = isset($_POST['file']) ? stripslashes($_POST['file']) : '';
303
 
304
  _e('Step 1...', 'order-import-export-for-woocommerce') . ' ';
297
  @ob_flush();
298
  @flush();
299
  $wpdb->hide_errors();
300
+ $this->processed_terms = !empty($_POST['processed_terms']) ? wc_clean($_POST['processed_terms']) : array();
301
+ $this->processed_posts = !empty($_POST['processed_posts']) ? array_map('intval', $_POST['processed_posts']) : array();
302
  $file = isset($_POST['file']) ? stripslashes($_POST['file']) : '';
303
 
304
  _e('Step 1...', 'order-import-export-for-woocommerce') . ' ';
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.7.4
10
  Text Domain: order-import-export-for-woocommerce
11
- WC tested up to: 5.1.0
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.7.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.7.5
10
  Text Domain: order-import-export-for-woocommerce
11
+ WC tested up to: 5.2.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.7.5");
28
  }
29
 
30
  /**
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: order export, order import, woocommerce export orders, woocommerce import
5
  Requires at least: 3.0.1
6
  Tested up to: 5.7
7
  Requires PHP: 5.6
8
- Stable tag: 1.7.4
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -24,7 +24,7 @@ The following are functionalities offered by the basic version of the plugin.
24
  &#128312; Import Coupons from CSV file.
25
  &#128312; Export Subscription Orders to CSV file(Premium Feature).
26
  &#128312; Import Subscription Orders from CSV file(Premium Feature).
27
- &#128312; Tested OK with WooCommerce 5.1.0
28
  &#128312; Tested OK with WP 5.7
29
  &#128312; Tested OK with PHP 7.3.5
30
 
@@ -197,6 +197,8 @@ Yes.
197
 
198
  == Changelog ==
199
 
 
 
200
  = 1.7.4 =
201
  * Tested OK with WC 5.1 and WP 5.7
202
  = 1.7.3 =
@@ -394,5 +396,5 @@ Yes.
394
 
395
  == Upgrade Notice ==
396
 
397
- = 1.7.4 =
398
- * Tested OK with WC 5.1 and WP 5.7
5
  Requires at least: 3.0.1
6
  Tested up to: 5.7
7
  Requires PHP: 5.6
8
+ Stable tag: 1.7.5
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
24
  &#128312; Import Coupons from CSV file.
25
  &#128312; Export Subscription Orders to CSV file(Premium Feature).
26
  &#128312; Import Subscription Orders from CSV file(Premium Feature).
27
+ &#128312; Tested OK with WooCommerce 5.2.0
28
  &#128312; Tested OK with WP 5.7
29
  &#128312; Tested OK with PHP 7.3.5
30
 
197
 
198
  == Changelog ==
199
 
200
+ = 1.7.5 =
201
+ * Tested OK with WC 5.2.0
202
  = 1.7.4 =
203
  * Tested OK with WC 5.1 and WP 5.7
204
  = 1.7.3 =
396
 
397
  == Upgrade Notice ==
398
 
399
+ = 1.7.5 =
400
+ * Tested OK with WC 5.2.0