Order Export & Order Import for WooCommerce - Version 1.3.5

Version Description

  • WC 3.4.5 Tested OK.
  • Review link added on footer.
Download this release

Release Info

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

Code changes from version 1.3.4 to 1.3.5

includes/class-wf-orderimpexp-plugin-uninstall-feedback.php CHANGED
@@ -14,6 +14,12 @@ if (!class_exists('WF_OrderImpExp_Uninstall_Feedback')) :
14
  private function get_uninstall_reasons() {
15
 
16
  $reasons = array(
 
 
 
 
 
 
17
  array(
18
  'id' => 'could-not-understand',
19
  'text' => __('I couldn\'t understand how to make it work', 'wf_order_import_export'),
@@ -140,22 +146,32 @@ if (!class_exists('WF_OrderImpExp_Uninstall_Feedback')) :
140
  deactivateLink = $(this).attr('href');
141
  modal.find('a.dont-bother-me').attr('href', deactivateLink).css('float', 'left');
142
  });
 
 
 
 
 
 
143
  modal.on('click', 'button.wforderimpexp-model-cancel', function (e) {
144
  e.preventDefault();
145
  modal.removeClass('modal-active');
146
  });
 
147
  modal.on('click', 'input[type="radio"]', function () {
148
- var parent = $(this).parents('li:first');
149
- modal.find('.reason-input').remove();
150
- var inputType = parent.data('type'),
151
- inputPlaceholder = parent.data('placeholder'),
152
- reasonInputHtml = '<div class="reason-input">' + (('text' === inputType) ? '<input type="text" class="input-text" size="40" />' : '<textarea rows="5" cols="45"></textarea>') + '</div>';
153
-
154
- if (inputType !== '') {
155
- parent.append($(reasonInputHtml));
156
- parent.find('input, textarea').attr('placeholder', inputPlaceholder).focus();
157
- }
158
- });
 
 
 
159
 
160
  modal.on('click', 'button.wforderimpexp-model-submit', function (e) {
161
  e.preventDefault();
@@ -205,8 +221,8 @@ if (!class_exists('WF_OrderImpExp_Uninstall_Feedback')) :
205
  'plugin' => "orderimpexp",
206
  'auth' => 'wforderimpexp_uninstall_1234#',
207
  'date' => gmdate("M d, Y h:i:s A"),
208
- 'url' => home_url(),
209
- 'user_email' => '', //$current_user->user_email,
210
  'reason_info' => isset($_REQUEST['reason_info']) ? trim(stripslashes($_REQUEST['reason_info'])) : '',
211
  'software' => $_SERVER['SERVER_SOFTWARE'],
212
  'php_version' => phpversion(),
@@ -224,7 +240,6 @@ if (!class_exists('WF_OrderImpExp_Uninstall_Feedback')) :
224
  'redirection' => 5,
225
  'httpversion' => '1.0',
226
  'blocking' => false,
227
- 'headers' => array('user-agent' => 'wforderimpexp/' . md5(esc_url(home_url())) . ';'),
228
  'body' => $data,
229
  'cookies' => array()
230
  )
14
  private function get_uninstall_reasons() {
15
 
16
  $reasons = array(
17
+ array(
18
+ 'id' => 'used-it',
19
+ 'text' => __('Used it successfully. Don\'t need anymore.', 'wf_csv_import_export'),
20
+ 'type' => 'reviewhtml',
21
+ 'placeholder' => __('Have used it successfully and aint in need of it anymore', 'wf_csv_import_export')
22
+ ),
23
  array(
24
  'id' => 'could-not-understand',
25
  'text' => __('I couldn\'t understand how to make it work', 'wf_order_import_export'),
146
  deactivateLink = $(this).attr('href');
147
  modal.find('a.dont-bother-me').attr('href', deactivateLink).css('float', 'left');
148
  });
149
+ modal.on('click', 'a.review-and-deactivate', function (e) {
150
+ e.preventDefault();
151
+ window.open("https://wordpress.org/support/plugin/order-import-export-for-woocommerce/reviews/#new-post");
152
+ window.location.href = deactivateLink;
153
+ });
154
+
155
  modal.on('click', 'button.wforderimpexp-model-cancel', function (e) {
156
  e.preventDefault();
157
  modal.removeClass('modal-active');
158
  });
159
+
160
  modal.on('click', 'input[type="radio"]', function () {
161
+ var parent = $(this).parents('li:first');
162
+ modal.find('.reason-input').remove();
163
+ var inputType = parent.data('type'),
164
+ inputPlaceholder = parent.data('placeholder');
165
+ if ('reviewhtml' === inputType) {
166
+ var reasonInputHtml = '<div class="reviewlink"><a href="#" target="_blank" class="review-and-deactivate"><?php _e('Deactivate and leave a review', 'wf_order_import_export'); ?> <span class="xa-ocsie-rating-link"> &#9733;&#9733;&#9733;&#9733;&#9733; </span></a></div>';
167
+ } else {
168
+ var reasonInputHtml = '<div class="reason-input">' + (('text' === inputType) ? '<input type="text" class="input-text" size="40" />' : '<textarea rows="5" cols="45"></textarea>') + '</div>';
169
+ }
170
+ if (inputType !== '') {
171
+ parent.append($(reasonInputHtml));
172
+ parent.find('input, textarea').attr('placeholder', inputPlaceholder).focus();
173
+ }
174
+ });
175
 
176
  modal.on('click', 'button.wforderimpexp-model-submit', function (e) {
177
  e.preventDefault();
221
  'plugin' => "orderimpexp",
222
  'auth' => 'wforderimpexp_uninstall_1234#',
223
  'date' => gmdate("M d, Y h:i:s A"),
224
+ 'url' => '',
225
+ 'user_email' => '',
226
  'reason_info' => isset($_REQUEST['reason_info']) ? trim(stripslashes($_REQUEST['reason_info'])) : '',
227
  'software' => $_SERVER['SERVER_SOFTWARE'],
228
  'php_version' => phpversion(),
240
  'redirection' => 5,
241
  'httpversion' => '1.0',
242
  'blocking' => false,
 
243
  'body' => $data,
244
  'cookies' => array()
245
  )
includes/views/market.php CHANGED
@@ -4,7 +4,13 @@ if (!defined('ABSPATH')) {
4
  }
5
  ?>
6
  <div class="market-box table-box-main">
 
 
 
 
 
7
  <div class="orderimpexp-premium-features">
 
8
  <center><a href="https://www.xadapter.com/product/order-import-export-plugin-for-woocommerce/" target="_blank" class="button button-primary button-go-pro"><?php _e('Upgrade to Premium Version', 'wf_csv_import_export'); ?></a></center>
9
  <span>
10
  <ul>
@@ -44,11 +50,7 @@ if (!defined('ABSPATH')) {
44
  </button>
45
  </div>
46
  </div>
47
- <div class="orderimpexp-review-widget">
48
- <?php
49
- echo sprintf(__('<div class=""><p><i>If you like the plugin please leave us a %1$s review!</i><p></div>', 'wf_csv_import_export'), '<a href="https://wordpress.org/support/plugin/order-import-export-for-woocommerce/reviews?rate=5#new-post" target="_blank" class="xa-orderimpexp-rating-link" data-reviewed="' . esc_attr__('Thanks for the review.', 'wf_csv_import_export') . '">&#9733;&#9733;&#9733;&#9733;&#9733;</a>');
50
- ?>
51
- </div>
52
  </div>
53
  <script>
54
  function showMoreFeatures() {
4
  }
5
  ?>
6
  <div class="market-box table-box-main">
7
+ <div class="orderimpexp-review-widget">
8
+ <?php
9
+ echo sprintf(__('<div class=""><p><i>If you like the plugin please leave us a %1$s review!</i><p></div>', 'wf_csv_import_export'), '<a href="https://wordpress.org/support/plugin/order-import-export-for-woocommerce/reviews?rate=5#new-post" target="_blank" class="xa-orderimpexp-rating-link" data-reviewed="' . esc_attr__('Thanks for the review.', 'wf_csv_import_export') . '">&#9733;&#9733;&#9733;&#9733;&#9733;</a>');
10
+ ?>
11
+ </div>
12
  <div class="orderimpexp-premium-features">
13
+
14
  <center><a href="https://www.xadapter.com/product/order-import-export-plugin-for-woocommerce/" target="_blank" class="button button-primary button-go-pro"><?php _e('Upgrade to Premium Version', 'wf_csv_import_export'); ?></a></center>
15
  <span>
16
  <ul>
50
  </button>
51
  </div>
52
  </div>
53
+
 
 
 
 
54
  </div>
55
  <script>
56
  function showMoreFeatures() {
order-import-export.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.3.4
10
  Text Domain: wf_order_import_export
11
- WC tested up to: 3.4.4
12
  License: GPLv3
13
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
14
  */
@@ -298,8 +298,8 @@ function webtoffee_storefrog_admin_notices() {
298
  }
299
  $screen = get_current_screen();
300
 
301
- $allowed_screen_ids = array('woocommerce_page_wf_woocommerce_order_im_ex','woocommerce_page_wf_coupon_csv_im_ex', 'admin');
302
- if (in_array($screen->id, $allowed_screen_ids)) {
303
 
304
  $notice = __('<h3>Save Time, Money & Hassle on Your WooCommerce Data Migration?</h3>', 'wf_order_import_export');
305
  $notice .= __('<h3>Use StoreFrog Migration Services.</h3>', 'wf_order_import_export');
@@ -325,3 +325,42 @@ function webtoffee_storefrog_notice_dismiss() {
325
  update_option('OCSEIPF_Webtoffee_storefrog_admin_notices_dismissed', 1);
326
  wp_die();
327
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.3.5
10
  Text Domain: wf_order_import_export
11
+ WC tested up to: 3.4.5
12
  License: GPLv3
13
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
14
  */
298
  }
299
  $screen = get_current_screen();
300
 
301
+ $allowed_screen_ids = array('woocommerce_page_wf_woocommerce_order_im_ex','woocommerce_page_wf_coupon_csv_im_ex');
302
+ if (in_array($screen->id, $allowed_screen_ids) || (isset($_GET['import']) && $_GET['import'] == 'woocommerce_wf_order_csv') || (isset($_GET['import']) && $_GET['import'] == 'coupon_csv') ) {
303
 
304
  $notice = __('<h3>Save Time, Money & Hassle on Your WooCommerce Data Migration?</h3>', 'wf_order_import_export');
305
  $notice .= __('<h3>Use StoreFrog Migration Services.</h3>', 'wf_order_import_export');
325
  update_option('OCSEIPF_Webtoffee_storefrog_admin_notices_dismissed', 1);
326
  wp_die();
327
  }
328
+
329
+
330
+
331
+
332
+ add_filter('admin_footer_text', 'WT_admin_footer_text', 100);
333
+ add_action('wp_ajax_ocsie_wt_review_plugin', "review_plugin");
334
+
335
+ function WT_admin_footer_text($footer_text) {
336
+ if (!current_user_can('manage_woocommerce') || !function_exists('wc_get_screen_ids')) {
337
+ return $footer_text;
338
+ }
339
+ $screen = get_current_screen();
340
+ $allowed_screen_ids = array('woocommerce_page_wf_woocommerce_order_im_ex','woocommerce_page_wf_coupon_csv_im_ex');
341
+ if (in_array($screen->id, $allowed_screen_ids) || (isset($_GET['import']) && $_GET['import'] == 'woocommerce_wf_order_csv') || (isset($_GET['import']) && $_GET['import'] == 'coupon_csv') ) {
342
+ if (!get_option('ocsie_wt_plugin_reviewed')) {
343
+ $footer_text = sprintf(
344
+ __('If you like the plugin please leave us a %1$s review.', 'wf_order_import_export'), '<a href="https://wordpress.org/support/plugin/order-import-export-for-woocommerce/reviews/?rate=5#new-post" target="_blank" class="wt-review-link" data-rated="' . esc_attr__('Thanks :)', 'wf_order_import_export') . '">&#9733;&#9733;&#9733;&#9733;&#9733;</a>'
345
+ );
346
+ wc_enqueue_js(
347
+ "jQuery( 'a.wt-review-link' ).click( function() {
348
+ jQuery.post( '" . WC()->ajax_url() . "', { action: 'ocsie_wt_review_plugin' } );
349
+ jQuery( this ).parent().text( jQuery( this ).data( 'rated' ) );
350
+ });"
351
+ );
352
+ } else {
353
+ $footer_text = __('Thank you for your review.', 'wf_order_import_export');
354
+ }
355
+ }
356
+
357
+ return '<i>' . $footer_text . '</i>';
358
+ }
359
+
360
+ function review_plugin() {
361
+ if (!current_user_can('manage_woocommerce')) {
362
+ wp_die(-1);
363
+ }
364
+ update_option('ocsie_wt_plugin_reviewed', 1);
365
+ wp_die();
366
+ }
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
5
  Requires at least: 3.0.1
6
  Tested up to: 4.9.8
7
- Stable tag: 1.3.4
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.4.4.
25
 
26
  <blockquote>
27
 
@@ -110,6 +110,10 @@ Yes. You can import or export order line item details.
110
 
111
  == Changelog ==
112
 
 
 
 
 
113
  = 1.3.4 =
114
  * WC 3.4.4 Tested OK.
115
  * Bug fix.
@@ -191,7 +195,6 @@ Yes. You can import or export order line item details.
191
  * Export /Import WooCommerce Orders.
192
 
193
  == Upgrade Notice ==
194
- = 1.3.4 =
195
- * WC 3.4.4 and WP 4.9.8 Tested OK.
196
- * Bug fix.
197
- * Readme content change.
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: 4.9.8
7
+ Stable tag: 1.3.5
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.4.5.
25
 
26
  <blockquote>
27
 
110
 
111
  == Changelog ==
112
 
113
+ = 1.3.5 =
114
+ * WC 3.4.5 Tested OK.
115
+ * Review link added on footer.
116
+
117
  = 1.3.4 =
118
  * WC 3.4.4 Tested OK.
119
  * Bug fix.
195
  * Export /Import WooCommerce Orders.
196
 
197
  == Upgrade Notice ==
198
+ = 1.3.5 =
199
+ * WC 3.4.5 Tested OK.
200
+ * Review link added on footer.
 
styles/wf-style.css CHANGED
@@ -239,7 +239,7 @@
239
  .orderimpexp-review-widget{
240
  background: #fff;
241
  padding: 5px;
242
- margin-top: 23px;
243
  }
244
  .orderimpexp-review-widget p{
245
  margin-right:5px;
@@ -264,4 +264,7 @@
264
  .button-show-more .button .dashicons {
265
  font-size: 12px;
266
  line-height: 1.5;
 
 
 
267
  }
239
  .orderimpexp-review-widget{
240
  background: #fff;
241
  padding: 5px;
242
+ margin-bottom: 23px;
243
  }
244
  .orderimpexp-review-widget p{
245
  margin-right:5px;
264
  .button-show-more .button .dashicons {
265
  font-size: 12px;
266
  line-height: 1.5;
267
+ }
268
+ .xa-ocsie-rating-link{
269
+ color: #ffc600;
270
  }