Order Export & Order Import for WooCommerce - Version 1.5.6

Version Description

  • provision to export for Super Admin users.
  • Tested OK with WP 5.3 and WC 3.8.1
Download this release

Release Info

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

Code changes from version 1.5.5 to 1.5.6

includes/class-wf-orderimpexp-plugin-uninstall-feedback.php CHANGED
@@ -6,6 +6,10 @@ if (!class_exists('WF_OrderImpExp_Uninstall_Feedback')) :
6
  */
7
  class WF_OrderImpExp_Uninstall_Feedback {
8
 
 
 
 
 
9
  public function __construct() {
10
  add_action('admin_footer', array($this, 'deactivate_scripts'));
11
  add_action('wp_ajax_wforderimpexp_submit_uninstall_reason', array($this, "send_uninstall_reason"));
@@ -91,6 +95,9 @@ if (!class_exists('WF_OrderImpExp_Uninstall_Feedback')) :
91
  </div>
92
  <div class="wforderimpexp-modal-footer">
93
  <a href="#" class="dont-bother-me"><?php _e('I rather wouldn\'t say', 'order-import-export-for-woocommerce'); ?></a>
 
 
 
94
  <button class="button-primary wforderimpexp-model-submit"><?php _e('Submit & Deactivate', 'order-import-export-for-woocommerce'); ?></button>
95
  <button class="button-secondary wforderimpexp-model-cancel"><?php _e('Cancel', 'order-import-export-for-woocommerce'); ?></button>
96
  </div>
@@ -218,8 +225,8 @@ if (!class_exists('WF_OrderImpExp_Uninstall_Feedback')) :
218
 
219
  $data = array(
220
  'reason_id' => sanitize_text_field($_POST['reason_id']),
221
- 'plugin' => "orderimpexp",
222
- 'auth' => 'wforderimpexp_uninstall_1234#',
223
  'date' => gmdate("M d, Y h:i:s A"),
224
  'url' => '',
225
  'user_email' => '',
@@ -231,10 +238,11 @@ if (!class_exists('WF_OrderImpExp_Uninstall_Feedback')) :
231
  'wc_version' => (!defined('WC_VERSION')) ? '' : WC_VERSION,
232
  'locale' => get_locale(),
233
  'multisite' => is_multisite() ? 'Yes' : 'No',
234
- 'wforderimpexp_version' => WF_ORDERIMPEXP_CURRENT_VERSION
235
  );
 
236
  // Write an action/hook here in webtoffe to recieve the data
237
- $resp = wp_remote_post('http://feedback.webtoffee.com/wp-json/wforderimpexp/v1/uninstall', array(
238
  'method' => 'POST',
239
  'timeout' => 45,
240
  'redirection' => 5,
@@ -245,6 +253,7 @@ if (!class_exists('WF_OrderImpExp_Uninstall_Feedback')) :
245
  )
246
  );
247
 
 
248
  wp_send_json_success();
249
  }
250
 
6
  */
7
  class WF_OrderImpExp_Uninstall_Feedback {
8
 
9
+ protected $api_url='https://feedback.webtoffee.com/wp-json/wforderimpexp/v1/uninstall';
10
+ protected $current_version=WF_ORDERIMPEXP_CURRENT_VERSION;
11
+ protected $auth_key='wforderimpexp_uninstall_1234#';
12
+ protected $plugin_id='wforderimpexp';
13
  public function __construct() {
14
  add_action('admin_footer', array($this, 'deactivate_scripts'));
15
  add_action('wp_ajax_wforderimpexp_submit_uninstall_reason', array($this, "send_uninstall_reason"));
95
  </div>
96
  <div class="wforderimpexp-modal-footer">
97
  <a href="#" class="dont-bother-me"><?php _e('I rather wouldn\'t say', 'order-import-export-for-woocommerce'); ?></a>
98
+ <a class="button-primary" href="https://www.webtoffee.com/support/" target="_blank">
99
+ <span class="dashicons dashicons-external" style="margin-top:3px;"></span>
100
+ <?php _e('Go to support', 'order-import-export-for-woocommerce'); ?></a>
101
  <button class="button-primary wforderimpexp-model-submit"><?php _e('Submit & Deactivate', 'order-import-export-for-woocommerce'); ?></button>
102
  <button class="button-secondary wforderimpexp-model-cancel"><?php _e('Cancel', 'order-import-export-for-woocommerce'); ?></button>
103
  </div>
225
 
226
  $data = array(
227
  'reason_id' => sanitize_text_field($_POST['reason_id']),
228
+ 'plugin' => $this->plugin_id,
229
+ 'auth' => $this->auth_key,
230
  'date' => gmdate("M d, Y h:i:s A"),
231
  'url' => '',
232
  'user_email' => '',
238
  'wc_version' => (!defined('WC_VERSION')) ? '' : WC_VERSION,
239
  'locale' => get_locale(),
240
  'multisite' => is_multisite() ? 'Yes' : 'No',
241
+ 'wforderimpexp_version' => $this->current_version,
242
  );
243
+
244
  // Write an action/hook here in webtoffe to recieve the data
245
+ $resp = wp_remote_post($this->api_url, array(
246
  'method' => 'POST',
247
  'timeout' => 45,
248
  'redirection' => 5,
253
  )
254
  );
255
 
256
+
257
  wp_send_json_success();
258
  }
259
 
includes/exporter/class-wf-orderimpexpcsv-exporter.php CHANGED
File without changes
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.5.5
10
  Text Domain: order-import-export-for-woocommerce
11
- WC tested up to: 3.8
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.5.5");
28
  }
29
 
30
  /**
@@ -152,16 +152,19 @@ function wt_order_basic_register_activation_hook_callback() {
152
  private function hf_user_permission() {
153
  // Check if user has rights to export
154
  $current_user = wp_get_current_user();
 
 
155
  $user_ok = false;
156
  $wf_roles = apply_filters('hf_user_permission_roles', array('administrator', 'shop_manager'));
157
  if ($current_user instanceof WP_User) {
158
  $can_users = array_intersect($wf_roles, $current_user->roles);
159
- if (!empty($can_users)) {
160
  $user_ok = true;
161
  }
162
  }
163
  return $user_ok;
164
  }
 
165
  }
166
  endif;
167
 
@@ -276,21 +279,23 @@ function wt_order_basic_register_activation_hook_callback() {
276
  */
277
  public function register_importers() {
278
  register_importer('coupon_csv', 'WooCommerce Coupons (CSV)', __('Import <strong>coupon</strong> to your store via a csv file.', 'order-import-export-for-woocommerce'), 'WF_CpnImpExpCsv_Importer::coupon_importer');
279
- }
280
 
281
  private function hf_user_permission() {
282
  // Check if user has rights to export
283
  $current_user = wp_get_current_user();
 
 
284
  $user_ok = false;
285
  $wf_roles = apply_filters('hf_user_permission_roles', array('administrator', 'shop_manager'));
286
  if ($current_user instanceof WP_User) {
287
  $can_users = array_intersect($wf_roles, $current_user->roles);
288
- if (!empty($can_users)) {
289
  $user_ok = true;
290
  }
291
  }
292
  return $user_ok;
293
- }
294
 
295
 
296
  }
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.5.6
10
  Text Domain: order-import-export-for-woocommerce
11
+ WC tested up to: 3.8.1
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.5.6");
28
  }
29
 
30
  /**
152
  private function hf_user_permission() {
153
  // Check if user has rights to export
154
  $current_user = wp_get_current_user();
155
+ $current_user->roles = apply_filters('hf_add_user_roles', $current_user->roles);
156
+ $current_user->roles = array_unique($current_user->roles);
157
  $user_ok = false;
158
  $wf_roles = apply_filters('hf_user_permission_roles', array('administrator', 'shop_manager'));
159
  if ($current_user instanceof WP_User) {
160
  $can_users = array_intersect($wf_roles, $current_user->roles);
161
+ if (!empty($can_users) || is_super_admin($current_user->ID)) {
162
  $user_ok = true;
163
  }
164
  }
165
  return $user_ok;
166
  }
167
+
168
  }
169
  endif;
170
 
279
  */
280
  public function register_importers() {
281
  register_importer('coupon_csv', 'WooCommerce Coupons (CSV)', __('Import <strong>coupon</strong> to your store via a csv file.', 'order-import-export-for-woocommerce'), 'WF_CpnImpExpCsv_Importer::coupon_importer');
282
+ }
283
 
284
  private function hf_user_permission() {
285
  // Check if user has rights to export
286
  $current_user = wp_get_current_user();
287
+ $current_user->roles = apply_filters('hf_add_user_roles', $current_user->roles);
288
+ $current_user->roles = array_unique($current_user->roles);
289
  $user_ok = false;
290
  $wf_roles = apply_filters('hf_user_permission_roles', array('administrator', 'shop_manager'));
291
  if ($current_user instanceof WP_User) {
292
  $can_users = array_intersect($wf_roles, $current_user->roles);
293
+ if (!empty($can_users) || is_super_admin($current_user->ID)) {
294
  $user_ok = true;
295
  }
296
  }
297
  return $user_ok;
298
+ }
299
 
300
 
301
  }
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 , order, export, import, woocommerce, csv, coupon, coupon export, coupon import, woocommerce export coupon , woocommerce import coupon , export coupons, import coupons,
5
  Requires at least: 3.0.1
6
- Tested up to: 5.2.4
7
- Stable tag: 1.5.5
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -21,7 +21,7 @@ This is perfect tool if you are migrating an existing shop on a different eComme
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.8
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.5.5 =
119
  * Tested OK with WP 5.2.4 and WC 3.8
120
  = 1.5.4 =
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,
5
  Requires at least: 3.0.1
6
+ Tested up to: 5.3
7
+ Stable tag: 1.5.6
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 3.8.1
25
  &#128312; Tested OK with PHP 7.3.5
26
 
27
  <blockquote>
115
 
116
  == Changelog ==
117
 
118
+ = 1.5.6 =
119
+ * provision to export for Super Admin users.
120
+ * Tested OK with WP 5.3 and WC 3.8.1
121
  = 1.5.5 =
122
  * Tested OK with WP 5.2.4 and WC 3.8
123
  = 1.5.4 =