WooCommerce – Store Exporter - Version 2.1

Version Description

  • Fixed: Order exports failing with date filter
  • Added: Scheduled Exports tab
  • Added: Export Templates tab
  • Changed: Removed legacy Scheduled Export fields from Settings screen
Download this release

Release Info

Developer visser
Plugin Icon 128x128 WooCommerce – Store Exporter
Version 2.1
Comparing to
See all releases

Code changes from version 2.0.3 to 2.1

Files changed (47) hide show
  1. common/common.php +3 -3
  2. exporter.php +15 -16
  3. includes/admin.php +1 -2
  4. includes/admin/brand.php +1 -2
  5. includes/admin/category.php +1 -2
  6. includes/admin/commission.php +1 -2
  7. includes/admin/coupon.php +1 -2
  8. includes/admin/customer.php +1 -2
  9. includes/admin/order.php +2 -5
  10. includes/admin/product.php +1 -2
  11. includes/admin/quick_export.php +1 -2
  12. includes/admin/scheduled_export.php +29 -0
  13. includes/admin/shipping_class.php +1 -2
  14. includes/admin/subscription.php +1 -2
  15. includes/admin/tag.php +1 -2
  16. includes/admin/user.php +1 -2
  17. includes/brand.php +1 -2
  18. includes/category.php +6 -4
  19. includes/commission.php +4 -2
  20. includes/common-dashboard_widgets.php +1 -2
  21. includes/common.php +1 -2
  22. includes/coupon.php +5 -2
  23. includes/customer.php +3 -2
  24. includes/export-csv.php +1 -2
  25. includes/export_template.php +0 -0
  26. includes/formatting.php +24 -2
  27. includes/functions.php +19 -4
  28. includes/install.php +1 -2
  29. includes/legacy.php +1 -2
  30. includes/order-extend.php +49 -15
  31. includes/order.php +5 -30
  32. includes/product-extend.php +5 -0
  33. includes/product.php +1 -3
  34. includes/product_vendor.php +3 -2
  35. includes/review.php +1 -2
  36. includes/settings.php +21 -316
  37. includes/shipping_class.php +2 -2
  38. includes/subscription.php +4 -2
  39. includes/tag.php +7 -2
  40. includes/user-extend.php +1 -2
  41. includes/user.php +1 -3
  42. readme.txt +7 -9
  43. templates/admin/scheduled_exports-recent_scheduled_exports.php +23 -0
  44. templates/admin/tabs-export_template.php +28 -0
  45. templates/admin/tabs-overview.php +3 -4
  46. templates/admin/tabs-scheduled_export.php +47 -0
  47. templates/admin/tabs.php +2 -0
common/common.php CHANGED
@@ -37,7 +37,7 @@ if( !function_exists( 'woo_get_action' ) ) {
37
  if ( isset( $_GET['action'] ) )
38
  return sanitize_text_field( $_GET['action'] );
39
 
40
- return false;
41
 
42
  }
43
  }
@@ -88,8 +88,8 @@ if( !function_exists( 'woo_get_woo_version' ) ) {
88
  } else if( defined( 'WOOCOMMERCE_VERSION' ) ) {
89
  $version = WOOCOMMERCE_VERSION;
90
  }
 
91
  return $version;
92
 
93
  }
94
- }
95
- ?>
37
  if ( isset( $_GET['action'] ) )
38
  return sanitize_text_field( $_GET['action'] );
39
 
40
+ return;
41
 
42
  }
43
  }
88
  } else if( defined( 'WOOCOMMERCE_VERSION' ) ) {
89
  $version = WOOCOMMERCE_VERSION;
90
  }
91
+
92
  return $version;
93
 
94
  }
95
+ }
 
exporter.php CHANGED
@@ -1,19 +1,19 @@
1
  <?php
2
  /*
3
- Plugin Name: WooCommerce - Store Exporter
4
- Plugin URI: http://www.visser.com.au/woocommerce/plugins/exporter/
5
- Description: Export store details out of WooCommerce into simple formatted files (e.g. CSV, TSV, Excel formats including XLS and XLSX, XML, etc.)
6
- Version: 2.0.3
7
- Author: Visser Labs
8
- Author URI: http://www.visser.com.au/about/
9
- License: GPL2
10
-
11
- Text Domain: woocommerce-exporter
12
- Domain Path: /languages/
13
-
14
- WC requires at least: 2.3
15
- WC tested up to: 3.7
16
- */
17
 
18
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
19
 
@@ -585,5 +585,4 @@ if( is_admin() ) {
585
 
586
  /* End of: WordPress Administration */
587
 
588
- }
589
- ?>
1
  <?php
2
  /*
3
+ * Plugin Name: WooCommerce - Store Exporter
4
+ * Plugin URI: http://www.visser.com.au/woocommerce/plugins/exporter/
5
+ * Description: Export store details out of WooCommerce into simple formatted files (e.g. CSV, TSV, Excel formats including XLS and XLSX, XML, etc.)
6
+ * Version: 2.1
7
+ * Author: Visser Labs
8
+ * Author URI: http://www.visser.com.au/about/
9
+ * License: GPL2
10
+ *
11
+ * Text Domain: woocommerce-exporter
12
+ * Domain Path: /languages/
13
+ *
14
+ * WC requires at least: 2.3
15
+ * WC tested up to: 3.7
16
+ */
17
 
18
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
19
 
585
 
586
  /* End of: WordPress Administration */
587
 
588
+ }
 
includes/admin.php CHANGED
@@ -1107,5 +1107,4 @@ function woo_ce_support_donate() {
1107
  }
1108
  echo $output;
1109
 
1110
- }
1111
- ?>
1107
  }
1108
  echo $output;
1109
 
1110
+ }
 
includes/admin/brand.php CHANGED
@@ -21,5 +21,4 @@ function woo_ce_brand_sorting() {
21
  <?php
22
  ob_end_flush();
23
 
24
- }
25
- ?>
21
  <?php
22
  ob_end_flush();
23
 
24
+ }
 
includes/admin/category.php CHANGED
@@ -21,5 +21,4 @@ function woo_ce_category_sorting() {
21
  <?php
22
  ob_end_flush();
23
 
24
- }
25
- ?>
21
  <?php
22
  ob_end_flush();
23
 
24
+ }
 
includes/admin/commission.php CHANGED
@@ -71,5 +71,4 @@ function woo_ce_commissions_filter_by_date() {
71
  <?php
72
  ob_end_flush();
73
 
74
- }
75
- ?>
71
  <?php
72
  ob_end_flush();
73
 
74
+ }
 
includes/admin/coupon.php CHANGED
@@ -21,5 +21,4 @@ function woo_ce_coupon_sorting() {
21
  <?php
22
  ob_end_flush();
23
 
24
- }
25
- ?>
21
  <?php
22
  ob_end_flush();
23
 
24
+ }
 
includes/admin/customer.php CHANGED
@@ -112,5 +112,4 @@ function woo_ce_customers_custom_fields() {
112
  <?php
113
  ob_end_flush();
114
 
115
- }
116
- ?>
112
  <?php
113
  ob_end_flush();
114
 
115
+ }
 
includes/admin/order.php CHANGED
@@ -17,15 +17,13 @@ function woo_ce_orders_filter_by_date() {
17
  $order_dates_first_order = woo_ce_get_order_first_date( $date_format );
18
  $order_dates_last_order = woo_ce_get_order_date_filter( 'today', 'from', $date_format );
19
  $types = woo_ce_get_option( 'order_dates_filter' );
20
- if( empty( $types ) )
21
- $types = 'current_week';
22
 
23
  ob_start(); ?>
24
  <p><label><input type="checkbox" id="orders-filters-date"<?php checked( !empty( $types ), true ); ?> /> <?php _e( 'Filter Orders by Order Date', 'woocommerce-exporter' ); ?></label></p>
25
  <div id="export-orders-filters-date" class="separator">
26
  <ul>
27
  <li>
28
- <label><input type="radio" name="order_dates_filter" value="" disabled="disabled" /> <?php _e( 'All dates', 'woocommerce-exporter' ); ?> (<?php echo $order_dates_first_order; ?> - <?php echo $order_dates_last_order; ?>)</label>
29
  </li>
30
  <li>
31
  <label><input type="radio" name="order_dates_filter" value="today"<?php checked( $types, 'today' ); ?> /> <?php _e( 'Today', 'woocommerce-exporter' ); ?> (<?php echo $today; ?>)</label>
@@ -660,5 +658,4 @@ function woo_ce_orders_custom_fields() {
660
  <?php
661
  ob_end_flush();
662
 
663
- }
664
- ?>
17
  $order_dates_first_order = woo_ce_get_order_first_date( $date_format );
18
  $order_dates_last_order = woo_ce_get_order_date_filter( 'today', 'from', $date_format );
19
  $types = woo_ce_get_option( 'order_dates_filter' );
 
 
20
 
21
  ob_start(); ?>
22
  <p><label><input type="checkbox" id="orders-filters-date"<?php checked( !empty( $types ), true ); ?> /> <?php _e( 'Filter Orders by Order Date', 'woocommerce-exporter' ); ?></label></p>
23
  <div id="export-orders-filters-date" class="separator">
24
  <ul>
25
  <li>
26
+ <label><input type="radio" name="order_dates_filter" value=""<?php checked( $types, false ); ?> /> <?php _e( 'All dates', 'woocommerce-exporter' ); ?> (<?php echo $order_dates_first_order; ?> - <?php echo $order_dates_last_order; ?>)</label>
27
  </li>
28
  <li>
29
  <label><input type="radio" name="order_dates_filter" value="today"<?php checked( $types, 'today' ); ?> /> <?php _e( 'Today', 'woocommerce-exporter' ); ?> (<?php echo $today; ?>)</label>
658
  <?php
659
  ob_end_flush();
660
 
661
+ }
 
includes/admin/product.php CHANGED
@@ -378,5 +378,4 @@ function woo_ce_export_options_product_gallery_formatting() {
378
  <?php
379
  ob_end_flush();
380
 
381
- }
382
- ?>
378
  <?php
379
  ob_end_flush();
380
 
381
+ }
 
includes/admin/quick_export.php CHANGED
@@ -96,5 +96,4 @@ function woo_ce_export_options_volume_offset() {
96
  <?php
97
  ob_end_flush();
98
 
99
- }
100
- ?>
96
  <?php
97
  ob_end_flush();
98
 
99
+ }
 
includes/admin/scheduled_export.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function woo_ce_admin_scheduled_exports_recent_scheduled_exports() {
4
+
5
+ $size = 0;
6
+ $pagination_links = '';
7
+
8
+ $template = 'scheduled_exports-recent_scheduled_exports.php';
9
+ if( file_exists( WOO_CE_PATH . 'templates/admin/' . $template ) ) {
10
+ include_once( WOO_CE_PATH . 'templates/admin/' . $template );
11
+ } else {
12
+ $message = sprintf( __( 'We couldn\'t load the widget template file <code>%s</code> within <code>%s</code>, this file should be present.', 'woocommerce-exporter' ), $template, WOO_CE_PATH . 'templates/admin/...' );
13
+
14
+ ob_start(); ?>
15
+ <p><strong><?php echo $message; ?></strong></p>
16
+ <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-exporter' ); ?>:</p>
17
+ <ul class="ul-disc">
18
+ <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-exporter' ); ?></li>
19
+ <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-exporter' ); ?></li>
20
+ <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-exporter' ); ?></li>
21
+ </ul>
22
+ <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-exporter' ); ?></p>
23
+ <?php
24
+ ob_end_flush();
25
+ }
26
+
27
+ }
28
+ add_action( 'woo_ce_after_scheduled_exports', 'woo_ce_admin_scheduled_exports_recent_scheduled_exports' );
29
+ ?>
includes/admin/shipping_class.php CHANGED
@@ -21,5 +21,4 @@ function woo_ce_shipping_class_sorting() {
21
  <?php
22
  ob_end_flush();
23
 
24
- }
25
- ?>
21
  <?php
22
  ob_end_flush();
23
 
24
+ }
 
includes/admin/subscription.php CHANGED
@@ -61,5 +61,4 @@ function woo_ce_subscriptions_filter_by_subscription_product() {
61
  <?php
62
  ob_end_flush();
63
 
64
- }
65
- ?>
61
  <?php
62
  ob_end_flush();
63
 
64
+ }
 
includes/admin/tag.php CHANGED
@@ -21,5 +21,4 @@ function woo_ce_tag_sorting() {
21
  <?php
22
  ob_end_flush();
23
 
24
- }
25
- ?>
21
  <?php
22
  ob_end_flush();
23
 
24
+ }
 
includes/admin/user.php CHANGED
@@ -79,5 +79,4 @@ function woo_ce_users_custom_fields() {
79
  <?php
80
  ob_end_flush();
81
 
82
- }
83
- ?>
79
  <?php
80
  ob_end_flush();
81
 
82
+ }
 
includes/brand.php CHANGED
@@ -157,5 +157,4 @@ function woo_ce_get_product_brands( $args = array() ) {
157
  return $brands;
158
  }
159
 
160
- }
161
- ?>
157
  return $brands;
158
  }
159
 
160
+ }
 
includes/category.php CHANGED
@@ -178,6 +178,7 @@ function woo_ce_override_category_field_labels( $fields = array() ) {
178
  $fields[$key]['label'] = $labels[$field['name']];
179
  }
180
  }
 
181
  return $fields;
182
 
183
  }
@@ -207,6 +208,7 @@ function woo_ce_get_category_field( $name = null, $format = 'name' ) {
207
  }
208
  }
209
  }
 
210
  return $output;
211
 
212
  }
@@ -240,7 +242,7 @@ function woo_ce_get_product_categories( $args = array() ) {
240
  }
241
 
242
  $categories[$key]->image = woo_ce_get_category_thumbnail_url( $category->term_id );
243
- $categories[$key]->display_type = get_woocommerce_term_meta( $category->term_id, 'display_type', true );
244
  }
245
  return $categories;
246
  }
@@ -285,17 +287,17 @@ function woo_ce_export_dataset_override_category( $output = null, $export_type =
285
  }
286
  unset( $categories, $category );
287
  }
 
288
  return $output;
289
 
290
  }
291
 
292
  function woo_ce_get_category_thumbnail_url( $category_id = 0, $size = 'full' ) {
293
 
294
- if( $thumbnail_id = get_woocommerce_term_meta( $category_id, 'thumbnail_id', true ) ) {
295
  $image_attributes = wp_get_attachment_image_src( $thumbnail_id, $size );
296
  if( is_array( $image_attributes ) )
297
  return current( $image_attributes );
298
  }
299
 
300
- }
301
- ?>
178
  $fields[$key]['label'] = $labels[$field['name']];
179
  }
180
  }
181
+
182
  return $fields;
183
 
184
  }
208
  }
209
  }
210
  }
211
+
212
  return $output;
213
 
214
  }
242
  }
243
 
244
  $categories[$key]->image = woo_ce_get_category_thumbnail_url( $category->term_id );
245
+ $categories[$key]->display_type = get_term_meta( $category->term_id, 'display_type', true );
246
  }
247
  return $categories;
248
  }
287
  }
288
  unset( $categories, $category );
289
  }
290
+
291
  return $output;
292
 
293
  }
294
 
295
  function woo_ce_get_category_thumbnail_url( $category_id = 0, $size = 'full' ) {
296
 
297
+ if( $thumbnail_id = get_term_meta( $category_id, 'thumbnail_id', true ) ) {
298
  $image_attributes = wp_get_attachment_image_src( $thumbnail_id, $size );
299
  if( is_array( $image_attributes ) )
300
  return current( $image_attributes );
301
  }
302
 
303
+ }
 
includes/commission.php CHANGED
@@ -25,6 +25,7 @@ if( is_admin() ) {
25
  } else {
26
  $count = $cached;
27
  }
 
28
  return $count;
29
 
30
  }
@@ -48,6 +49,7 @@ if( is_admin() ) {
48
  $output = date( 'd/m/Y', $commission );
49
  unset( $commissions, $commission );
50
  }
 
51
  return $output;
52
 
53
  }
@@ -152,6 +154,7 @@ if( is_admin() ) {
152
  $commission_ids = new WP_Query( $args );
153
  if( !empty( $commission_ids->posts ) )
154
  $output = count( $commission_ids->posts );
 
155
  return $output;
156
 
157
  }
@@ -248,5 +251,4 @@ function woo_ce_get_commission_fields( $format = 'full' ) {
248
 
249
  }
250
 
251
- }
252
- ?>
25
  } else {
26
  $count = $cached;
27
  }
28
+
29
  return $count;
30
 
31
  }
49
  $output = date( 'd/m/Y', $commission );
50
  unset( $commissions, $commission );
51
  }
52
+
53
  return $output;
54
 
55
  }
154
  $commission_ids = new WP_Query( $args );
155
  if( !empty( $commission_ids->posts ) )
156
  $output = count( $commission_ids->posts );
157
+
158
  return $output;
159
 
160
  }
251
 
252
  }
253
 
254
+ }
 
includes/common-dashboard_widgets.php CHANGED
@@ -56,5 +56,4 @@ if( !function_exists( 'woo_vl_dashboard_setup' ) ) {
56
 
57
  }
58
 
59
- /* End of: WooCommerce News - by Visser Labs */
60
- ?>
56
 
57
  }
58
 
59
+ /* End of: WooCommerce News - by Visser Labs */
 
includes/common.php CHANGED
@@ -73,5 +73,4 @@ if( !function_exists( 'woo_is_jigo_activated' ) ) {
73
  return true;
74
 
75
  }
76
- }
77
- ?>
73
  return true;
74
 
75
  }
76
+ }
 
includes/coupon.php CHANGED
@@ -17,6 +17,7 @@ if( is_admin() ) {
17
  } else {
18
  $count = $cached;
19
  }
 
20
  return $count;
21
 
22
  }
@@ -184,6 +185,7 @@ function woo_ce_override_coupon_field_labels( $fields = array() ) {
184
  $fields[$key]['label'] = $labels[$field['name']];
185
  }
186
  }
 
187
  return $fields;
188
 
189
  }
@@ -222,6 +224,7 @@ function woo_ce_get_coupons( $args = array() ) {
222
  $coupons[] = $coupon_id;
223
  unset( $coupon_ids, $coupon_id );
224
  }
 
225
  return $coupons;
226
 
227
  }
@@ -236,7 +239,7 @@ function woo_ce_get_coupon_code_usage( $coupon_code = '' ) {
236
  $count_sql = $wpdb->prepare( "SELECT COUNT('order_item_id') FROM `" . $wpdb->prefix . "woocommerce_order_items` WHERE `order_item_type` = %s AND `order_item_name` = %s", $order_item_type, $coupon_code );
237
  $count = $wpdb->get_var( $count_sql );
238
  }
 
239
  return $count;
240
 
241
- }
242
- ?>
17
  } else {
18
  $count = $cached;
19
  }
20
+
21
  return $count;
22
 
23
  }
185
  $fields[$key]['label'] = $labels[$field['name']];
186
  }
187
  }
188
+
189
  return $fields;
190
 
191
  }
224
  $coupons[] = $coupon_id;
225
  unset( $coupon_ids, $coupon_id );
226
  }
227
+
228
  return $coupons;
229
 
230
  }
239
  $count_sql = $wpdb->prepare( "SELECT COUNT('order_item_id') FROM `" . $wpdb->prefix . "woocommerce_order_items` WHERE `order_item_type` = %s AND `order_item_name` = %s", $order_item_type, $coupon_code );
240
  $count = $wpdb->get_var( $count_sql );
241
  }
242
+
243
  return $count;
244
 
245
+ }
 
includes/customer.php CHANGED
@@ -54,6 +54,7 @@ if( is_admin() ) {
54
  } else {
55
  $count = $cached;
56
  }
 
57
  return $count;
58
 
59
  }
@@ -257,8 +258,8 @@ function woo_ce_override_customer_field_labels( $fields = array() ) {
257
  $fields[$key]['label'] = $labels[$field['name']];
258
  }
259
  }
 
260
  return $fields;
261
 
262
  }
263
- add_filter( 'woo_ce_customer_fields', 'woo_ce_override_customer_field_labels', 11 );
264
- ?>
54
  } else {
55
  $count = $cached;
56
  }
57
+
58
  return $count;
59
 
60
  }
258
  $fields[$key]['label'] = $labels[$field['name']];
259
  }
260
  }
261
+
262
  return $fields;
263
 
264
  }
265
+ add_filter( 'woo_ce_customer_fields', 'woo_ce_override_customer_field_labels', 11 );
 
includes/export-csv.php CHANGED
@@ -47,5 +47,4 @@ function woo_ce_generate_csv_header( $export_type = '' ) {
47
  header( 'Expires: 0' );
48
  }
49
 
50
- }
51
- ?>
47
  header( 'Expires: 0' );
48
  }
49
 
50
+ }
 
includes/export_template.php ADDED
File without changes
includes/formatting.php CHANGED
@@ -11,6 +11,7 @@ function woo_ce_file_encoding( $content = '' ) {
11
  if( $to_encoding <> 'UTF-8' )
12
  $content = utf8_encode( $content );
13
  }
 
14
  return $content;
15
 
16
  }
@@ -45,6 +46,7 @@ function woo_ce_display_time_elapsed( $from, $to ) {
45
  $numberOfUnits = floor( $time / $unit );
46
  $output = $numberOfUnits . ' ' . $text . ( ( $numberOfUnits > 1 ) ? 's' : '' );
47
  }
 
48
  return $output;
49
 
50
  }
@@ -67,6 +69,7 @@ function woo_ce_escape_csv_value( $string = '', $delimiter = ',', $format = 'all
67
  break;
68
 
69
  }
 
70
  return $string;
71
 
72
  }
@@ -76,6 +79,7 @@ function woo_ce_filter_attribute_escape( $safe_text = '', $text = '' ) {
76
  if( substr( $safe_text, 0, 1 ) == '=' ) {
77
  $safe_text = ltrim( $safe_text, '=' );
78
  }
 
79
  return $safe_text;
80
 
81
  }
@@ -84,6 +88,7 @@ function woo_ce_filter_sanitize_key( $key ) {
84
 
85
  // Limit length of key to 48 characters
86
  $key = substr( $key, 0, 48 );
 
87
  return $key;
88
 
89
  }
@@ -107,6 +112,7 @@ function woo_ce_count_object( $object = 0, $exclude_post_types = array() ) {
107
  } else {
108
  $count = $object;
109
  }
 
110
  return $count;
111
 
112
  }
@@ -127,6 +133,7 @@ function woo_ce_convert_product_ids( $product_ids = null ) {
127
  $output = str_replace( ',', $export->category_separator, $product_ids );
128
  }
129
  }
 
130
  return $output;
131
 
132
  }
@@ -159,6 +166,7 @@ function woo_ce_format_post_status( $post_status = '' ) {
159
 
160
  }
161
  $output = apply_filters( 'woo_ce_format_post_status', $output, $post_status );
 
162
  return $output;
163
 
164
  }
@@ -178,6 +186,7 @@ function woo_ce_format_comment_status( $comment_status ) {
178
  break;
179
 
180
  }
 
181
  return $output;
182
 
183
  }
@@ -241,6 +250,7 @@ function woo_ce_format_switch( $input = '', $output_format = 'answer' ) {
241
  break;
242
 
243
  }
 
244
  return $output;
245
 
246
  }
@@ -262,6 +272,7 @@ function woo_ce_format_product_filters( $product_filters = array() ) {
262
  foreach( $product_filters as $product_filter )
263
  $output[] = $product_filter;
264
  }
 
265
  return $output;
266
 
267
  }
@@ -273,6 +284,7 @@ function woo_ce_format_user_role_filters( $user_role_filters = array() ) {
273
  foreach( $user_role_filters as $user_role_filter )
274
  $output[] = $user_role_filter;
275
  }
 
276
  return $output;
277
 
278
  }
@@ -292,6 +304,7 @@ if( !function_exists( 'woo_ce_format_price' ) ) {
292
  remove_filter( 'wc_price', 'woo_ce_filter_wc_price' );
293
  remove_filter( 'woocommerce_currency_symbol', 'woo_ce_woocommerce_currency_symbol' );
294
  }
 
295
  return $price;
296
 
297
  }
@@ -313,6 +326,7 @@ function woo_ce_formatted_woocommerce_price( $return, $price, $num_decimals, $de
313
  $thousands_sep = apply_filters( 'woo_ce_wc_price_thousands_sep', $thousands_sep );
314
 
315
  $price = number_format( $price, $num_decimals, $decimal_sep, $thousands_sep );
 
316
  return $price;
317
 
318
  }
@@ -321,6 +335,7 @@ function woo_ce_formatted_woocommerce_price( $return, $price, $num_decimals, $de
321
  function woo_ce_woocommerce_currency_symbol( $currency_symbol, $currency ) {
322
 
323
  $currency_symbol = apply_filters( 'woo_ce_wc_price_currency_symbol', '', $currency_symbol, $currency );
 
324
  return $currency_symbol;
325
 
326
  }
@@ -334,6 +349,7 @@ function woo_ce_format_date( $date = '', $format = '' ) {
334
  if( !empty( $date ) && $date_format != '' ) {
335
  $output = mysql2date( $date_format, $date );
336
  }
 
337
  return $output;
338
 
339
  }
@@ -345,6 +361,7 @@ function woo_ce_format_order_date( $date = '', $format = 'export' ) {
345
  if( !empty( $date ) ) {
346
  $output = str_replace( '/', '-', $date );
347
  }
 
348
  return $output;
349
 
350
  }
@@ -358,6 +375,7 @@ function woo_ce_format_archive_date( $post_ID = 0, $time = false ) {
358
  else
359
  $post_date = mysql2date( get_option( 'date_format', 'd/m/Y' ), date( 'Y/m/d', $time ) );
360
  unset( $time );
 
361
  return $post_date;
362
 
363
  }
@@ -367,6 +385,7 @@ function woo_ce_format_product_category_label( $product_category = '', $parent_c
367
  $output = $product_category;
368
  if( !empty( $parent_category ) )
369
  $output .= ' &raquo; ' . $parent_category;
 
370
  return $output;
371
 
372
  }
@@ -380,6 +399,7 @@ function woo_ce_clean_export_label( $label = '' ) {
380
  $label = str_replace( '_', ' ', $label );
381
  // Auto-capitalise label
382
  $label = ucfirst( $label );
 
383
  return $label;
384
 
385
  }
@@ -399,6 +419,7 @@ if( !function_exists( 'woo_ce_expand_state_name' ) ) {
399
  unset( $states );
400
  }
401
  }
 
402
  return $output;
403
 
404
  }
@@ -415,6 +436,7 @@ if( !function_exists( 'woo_ce_expand_country_name' ) ) {
415
  }
416
  unset( $countries );
417
  }
 
418
  return $output;
419
 
420
  }
@@ -439,7 +461,7 @@ function woo_ce_format_description_excerpt( $string = '' ) {
439
  if( $description_excerpt_formatting = woo_ce_get_option( 'description_excerpt_formatting', 0 ) ) {
440
  $string = wp_kses( $string, apply_filters( 'woo_ce_format_description_excerpt_allowed_html', array() ), apply_filters( 'woo_ce_format_description_excerpt_allowed_protocols', array() ) );
441
  }
 
442
  return apply_filters( 'woo_ce_format_description_excerpt', $string );
443
 
444
- }
445
- ?>
11
  if( $to_encoding <> 'UTF-8' )
12
  $content = utf8_encode( $content );
13
  }
14
+
15
  return $content;
16
 
17
  }
46
  $numberOfUnits = floor( $time / $unit );
47
  $output = $numberOfUnits . ' ' . $text . ( ( $numberOfUnits > 1 ) ? 's' : '' );
48
  }
49
+
50
  return $output;
51
 
52
  }
69
  break;
70
 
71
  }
72
+
73
  return $string;
74
 
75
  }
79
  if( substr( $safe_text, 0, 1 ) == '=' ) {
80
  $safe_text = ltrim( $safe_text, '=' );
81
  }
82
+
83
  return $safe_text;
84
 
85
  }
88
 
89
  // Limit length of key to 48 characters
90
  $key = substr( $key, 0, 48 );
91
+
92
  return $key;
93
 
94
  }
112
  } else {
113
  $count = $object;
114
  }
115
+
116
  return $count;
117
 
118
  }
133
  $output = str_replace( ',', $export->category_separator, $product_ids );
134
  }
135
  }
136
+
137
  return $output;
138
 
139
  }
166
 
167
  }
168
  $output = apply_filters( 'woo_ce_format_post_status', $output, $post_status );
169
+
170
  return $output;
171
 
172
  }
186
  break;
187
 
188
  }
189
+
190
  return $output;
191
 
192
  }
250
  break;
251
 
252
  }
253
+
254
  return $output;
255
 
256
  }
272
  foreach( $product_filters as $product_filter )
273
  $output[] = $product_filter;
274
  }
275
+
276
  return $output;
277
 
278
  }
284
  foreach( $user_role_filters as $user_role_filter )
285
  $output[] = $user_role_filter;
286
  }
287
+
288
  return $output;
289
 
290
  }
304
  remove_filter( 'wc_price', 'woo_ce_filter_wc_price' );
305
  remove_filter( 'woocommerce_currency_symbol', 'woo_ce_woocommerce_currency_symbol' );
306
  }
307
+
308
  return $price;
309
 
310
  }
326
  $thousands_sep = apply_filters( 'woo_ce_wc_price_thousands_sep', $thousands_sep );
327
 
328
  $price = number_format( $price, $num_decimals, $decimal_sep, $thousands_sep );
329
+
330
  return $price;
331
 
332
  }
335
  function woo_ce_woocommerce_currency_symbol( $currency_symbol, $currency ) {
336
 
337
  $currency_symbol = apply_filters( 'woo_ce_wc_price_currency_symbol', '', $currency_symbol, $currency );
338
+
339
  return $currency_symbol;
340
 
341
  }
349
  if( !empty( $date ) && $date_format != '' ) {
350
  $output = mysql2date( $date_format, $date );
351
  }
352
+
353
  return $output;
354
 
355
  }
361
  if( !empty( $date ) ) {
362
  $output = str_replace( '/', '-', $date );
363
  }
364
+
365
  return $output;
366
 
367
  }
375
  else
376
  $post_date = mysql2date( get_option( 'date_format', 'd/m/Y' ), date( 'Y/m/d', $time ) );
377
  unset( $time );
378
+
379
  return $post_date;
380
 
381
  }
385
  $output = $product_category;
386
  if( !empty( $parent_category ) )
387
  $output .= ' &raquo; ' . $parent_category;
388
+
389
  return $output;
390
 
391
  }
399
  $label = str_replace( '_', ' ', $label );
400
  // Auto-capitalise label
401
  $label = ucfirst( $label );
402
+
403
  return $label;
404
 
405
  }
419
  unset( $states );
420
  }
421
  }
422
+
423
  return $output;
424
 
425
  }
436
  }
437
  unset( $countries );
438
  }
439
+
440
  return $output;
441
 
442
  }
461
  if( $description_excerpt_formatting = woo_ce_get_option( 'description_excerpt_formatting', 0 ) ) {
462
  $string = wp_kses( $string, apply_filters( 'woo_ce_format_description_excerpt_allowed_html', array() ), apply_filters( 'woo_ce_format_description_excerpt_allowed_protocols', array() ) );
463
  }
464
+
465
  return apply_filters( 'woo_ce_format_description_excerpt', $string );
466
 
467
+ }
 
includes/functions.php CHANGED
@@ -62,7 +62,9 @@ if( is_admin() ) {
62
 
63
  include_once( WOO_CE_PATH . 'includes/admin.php' );
64
 
65
- // WordPress Admin Pointers
 
 
66
  include_once( WOO_CE_PATH . 'includes/settings.php' );
67
 
68
  function woo_ce_export_init() {
@@ -697,6 +699,7 @@ if( is_admin() ) {
697
  $file->post_author_name = $author_name->display_name;
698
  $file->post_date = woo_ce_format_archive_date( $file->ID );
699
  unset( $author_name, $t_time, $time );
 
700
  return $file;
701
 
702
  }
@@ -732,6 +735,7 @@ if( is_admin() ) {
732
  if( !empty( $type ) )
733
  $args['meta_value'] = $type;
734
  $post_query = new WP_Query( $args );
 
735
  return absint( $post_query->found_posts );
736
 
737
  }
@@ -944,6 +948,7 @@ function woo_ce_get_export_types( $plural = true ) {
944
  'attribute' => ( $plural ? __( 'Attributes', 'woocommerce-exporter' ) : __( 'Attribute', 'woocommerce-exporter' ) )
945
  );
946
  $export_types = apply_filters( 'woo_ce_export_types', $export_types, $plural );
 
947
  return $export_types;
948
 
949
  }
@@ -957,6 +962,7 @@ function woo_ce_export_type_label( $export_type = '', $echo = false, $plural = t
957
  if( array_key_exists( $export_type, $export_types ) )
958
  $output = $export_types[$export_type];
959
  }
 
960
  if( $echo )
961
  echo $output;
962
  else
@@ -972,6 +978,7 @@ function woo_ce_get_export_type_label( $export_type = '', $plural = true ) {
972
  // Check our export type exists
973
  $output = ( isset( $export_types[$export_type] ) ? $export_types[$export_type] : $output );
974
  }
 
975
  return $output;
976
 
977
  }
@@ -1049,6 +1056,7 @@ function woo_ce_post_statuses( $extra_status = array(), $override = false ) {
1049
  if( $extra_status )
1050
  $output = array_merge( $output, $extra_status );
1051
  }
 
1052
  return $output;
1053
 
1054
  }
@@ -1125,6 +1133,7 @@ if( !function_exists( 'woo_ce_sort_fields' ) ) {
1125
  function woo_ce_add_post_mime_type( $post_mime_types = array() ) {
1126
 
1127
  $post_mime_types['text/csv'] = array( __( 'Store Exports (CSV)', 'woocommerce-exporter' ), __( 'Manage Store Exports (CSV)', 'woocommerce-exporter' ), _n_noop( 'Store Export - CSV <span class="count">(%s)</span>', 'Store Exports - CSV <span class="count">(%s)</span>' ) );
 
1128
  return $post_mime_types;
1129
 
1130
  }
@@ -1135,6 +1144,7 @@ function woo_ce_current_memory_usage() {
1135
  $output = '';
1136
  if( function_exists( 'memory_get_usage' ) )
1137
  $output = round( memory_get_usage( true ) / 1024 / 1024, 2 );
 
1138
  return $output;
1139
 
1140
  }
@@ -1151,6 +1161,7 @@ function woo_ce_get_start_of_week_day() {
1151
  break;
1152
  }
1153
  }
 
1154
  return $output;
1155
 
1156
  }
@@ -1450,7 +1461,7 @@ function woo_ce_modules_list( $module_status = false ) {
1450
  'description' => __( 'Assists with EU VAT compliance, for the new VAT regime beginning 1st January 2015.', 'woocommerce-exporter' ),
1451
  'url' => 'https://wordpress.org/plugins/woocommerce-eu-vat-assistant/',
1452
  'slug' => 'woocommerce-eu-vat-assistant',
1453
- 'class' => 'Aelia_WC_RequirementsChecks'
1454
  );
1455
  $modules[] = array(
1456
  'name' => 'hear_about_us',
@@ -2276,7 +2287,9 @@ function woo_ce_error_log( $message = '', $level = false ) {
2276
  } else {
2277
  $logger->add( WOO_CE_PREFIX, $message );
2278
  }
 
2279
  return true;
 
2280
  } else {
2281
  // Fallback where the WooCommerce logging engine is unavailable
2282
  error_log( sprintf( '[store-exporter] %s', $message ) );
@@ -2294,6 +2307,7 @@ function woo_ce_error_get_last_message() {
2294
  }
2295
  unset( $last_error );
2296
  }
 
2297
  return $output;
2298
 
2299
  }
@@ -2307,6 +2321,7 @@ function woo_ce_get_option( $option = null, $default = false, $allow_empty = fal
2307
  if( $allow_empty == false && $output != 0 && ( $output == false || $output == '' ) )
2308
  $output = $default;
2309
  }
 
2310
  return $output;
2311
 
2312
  }
@@ -2318,7 +2333,7 @@ function woo_ce_update_option( $option = null, $value = null ) {
2318
  $separator = '_';
2319
  $output = update_option( WOO_CE_PREFIX . $separator . $option, $value );
2320
  }
 
2321
  return $output;
2322
 
2323
- }
2324
- ?>
62
 
63
  include_once( WOO_CE_PATH . 'includes/admin.php' );
64
 
65
+ include_once( WOO_CE_PATH . 'includes/admin/scheduled_export.php' );
66
+ include_once( WOO_CE_PATH . 'includes/export_template.php' );
67
+
68
  include_once( WOO_CE_PATH . 'includes/settings.php' );
69
 
70
  function woo_ce_export_init() {
699
  $file->post_author_name = $author_name->display_name;
700
  $file->post_date = woo_ce_format_archive_date( $file->ID );
701
  unset( $author_name, $t_time, $time );
702
+
703
  return $file;
704
 
705
  }
735
  if( !empty( $type ) )
736
  $args['meta_value'] = $type;
737
  $post_query = new WP_Query( $args );
738
+
739
  return absint( $post_query->found_posts );
740
 
741
  }
948
  'attribute' => ( $plural ? __( 'Attributes', 'woocommerce-exporter' ) : __( 'Attribute', 'woocommerce-exporter' ) )
949
  );
950
  $export_types = apply_filters( 'woo_ce_export_types', $export_types, $plural );
951
+
952
  return $export_types;
953
 
954
  }
962
  if( array_key_exists( $export_type, $export_types ) )
963
  $output = $export_types[$export_type];
964
  }
965
+
966
  if( $echo )
967
  echo $output;
968
  else
978
  // Check our export type exists
979
  $output = ( isset( $export_types[$export_type] ) ? $export_types[$export_type] : $output );
980
  }
981
+
982
  return $output;
983
 
984
  }
1056
  if( $extra_status )
1057
  $output = array_merge( $output, $extra_status );
1058
  }
1059
+
1060
  return $output;
1061
 
1062
  }
1133
  function woo_ce_add_post_mime_type( $post_mime_types = array() ) {
1134
 
1135
  $post_mime_types['text/csv'] = array( __( 'Store Exports (CSV)', 'woocommerce-exporter' ), __( 'Manage Store Exports (CSV)', 'woocommerce-exporter' ), _n_noop( 'Store Export - CSV <span class="count">(%s)</span>', 'Store Exports - CSV <span class="count">(%s)</span>' ) );
1136
+
1137
  return $post_mime_types;
1138
 
1139
  }
1144
  $output = '';
1145
  if( function_exists( 'memory_get_usage' ) )
1146
  $output = round( memory_get_usage( true ) / 1024 / 1024, 2 );
1147
+
1148
  return $output;
1149
 
1150
  }
1161
  break;
1162
  }
1163
  }
1164
+
1165
  return $output;
1166
 
1167
  }
1461
  'description' => __( 'Assists with EU VAT compliance, for the new VAT regime beginning 1st January 2015.', 'woocommerce-exporter' ),
1462
  'url' => 'https://wordpress.org/plugins/woocommerce-eu-vat-assistant/',
1463
  'slug' => 'woocommerce-eu-vat-assistant',
1464
+ 'class' => 'WC_Aelia_EU_VAT_Assistant'
1465
  );
1466
  $modules[] = array(
1467
  'name' => 'hear_about_us',
2287
  } else {
2288
  $logger->add( WOO_CE_PREFIX, $message );
2289
  }
2290
+
2291
  return true;
2292
+
2293
  } else {
2294
  // Fallback where the WooCommerce logging engine is unavailable
2295
  error_log( sprintf( '[store-exporter] %s', $message ) );
2307
  }
2308
  unset( $last_error );
2309
  }
2310
+
2311
  return $output;
2312
 
2313
  }
2321
  if( $allow_empty == false && $output != 0 && ( $output == false || $output == '' ) )
2322
  $output = $default;
2323
  }
2324
+
2325
  return $output;
2326
 
2327
  }
2333
  $separator = '_';
2334
  $output = update_option( WOO_CE_PREFIX . $separator . $option, $value );
2335
  }
2336
+
2337
  return $output;
2338
 
2339
+ }
 
includes/install.php CHANGED
@@ -38,5 +38,4 @@ function woo_ce_create_options() {
38
  if( !get_option( $prefix . '_date_format' ) )
39
  add_option( $prefix . '_date_format', 'd/m/Y' );
40
 
41
- }
42
- ?>
38
  if( !get_option( $prefix . '_date_format' ) )
39
  add_option( $prefix . '_date_format', 'd/m/Y' );
40
 
41
+ }
 
includes/legacy.php CHANGED
@@ -6,5 +6,4 @@ function woo_ce_sort_fields( $key ) {
6
  return strnatcmp( $a[$key], $b[$key] );
7
  };
8
 
9
- }
10
- ?>
6
  return strnatcmp( $a[$key], $b[$key] );
7
  };
8
 
9
+ }
 
includes/order-extend.php CHANGED
@@ -61,7 +61,7 @@ function woo_ce_extend_order_fields( $fields = array() ) {
61
  );
62
  }
63
 
64
- // WooCommerce Germanized - http://www.wpovernight.com
65
  if( woo_ce_detect_export_plugin( 'wc_germanized_pro' ) ) {
66
  $fields[] = array(
67
  'name' => 'invoice_number',
@@ -729,6 +729,7 @@ function woo_ce_extend_order_fields( $fields = array() ) {
729
  );
730
  }
731
  }
 
732
  }
733
 
734
  // YITH WooCommerce Delivery Date Premium - http://yithemes.com/themes/plugins/yith-woocommerce-delivery-date/
@@ -1111,7 +1112,7 @@ function woo_ce_extend_order_items_fields( $fields = array() ) {
1111
  );
1112
  $fields[] = array(
1113
  'name' => 'order_items_booking_all_day',
1114
- 'label' => __( 'Order Items: All Day Booking' ),
1115
  'hover' => __( 'WooCommerce Bookings', 'woocommerce-exporter' )
1116
  );
1117
  $fields[] = array(
@@ -1171,7 +1172,8 @@ function woo_ce_extend_order_items_fields( $fields = array() ) {
1171
 
1172
  // WooCommerce TM Extra Product Options - http://codecanyon.net/item/woocommerce-extra-product-options/7908619
1173
  if( woo_ce_detect_export_plugin( 'extra_product_options' ) ) {
1174
- if( $tm_fields = woo_ce_get_extra_product_option_fields() ) {
 
1175
  foreach( $tm_fields as $tm_field ) {
1176
  $fields[] = array(
1177
  'name' => sprintf( 'order_items_tm_%s', sanitize_key( $tm_field['name'] ) ),
@@ -1179,8 +1181,8 @@ function woo_ce_extend_order_items_fields( $fields = array() ) {
1179
  'hover' => __( 'WooCommerce TM Extra Product Options', 'woocommerce-exporter' )
1180
  );
1181
  }
1182
- unset( $tm_fields, $tm_field );
1183
  }
 
1184
  }
1185
 
1186
  // WooCommerce Custom Fields - http://www.rightpress.net/woocommerce-custom-fields
@@ -1225,7 +1227,8 @@ function woo_ce_extend_order_items_fields( $fields = array() ) {
1225
 
1226
  // WooCommerce Product Custom Options Lite - https://wordpress.org/plugins/woocommerce-custom-options-lite/
1227
  if( woo_ce_detect_export_plugin( 'wc_product_custom_options' ) ) {
1228
- if( $custom_options = woo_ce_get_product_custom_options() ) {
 
1229
  foreach( $custom_options as $custom_option ) {
1230
  $fields[] = array(
1231
  'name' => sprintf( 'order_items_pco_%s', sanitize_key( $custom_option ) ),
@@ -1234,6 +1237,7 @@ function woo_ce_extend_order_items_fields( $fields = array() ) {
1234
  );
1235
  }
1236
  }
 
1237
  }
1238
 
1239
  // Barcodes for WooCommerce - http://www.wolkenkraft.com/produkte/barcodes-fuer-woocommerce/
@@ -1255,12 +1259,12 @@ function woo_ce_extend_order_items_fields( $fields = array() ) {
1255
  $fields[] = array(
1256
  'name' => 'order_items_booking_start_date',
1257
  'label' => __( 'Order Items: Start', 'woocommerce-exporter' ),
1258
- 'hover' => __( 'WooCommerce Easy Bookings', 'woocommerce-exporter' )
1259
  );
1260
  $fields[] = array(
1261
  'name' => 'order_items_booking_end_date',
1262
  'label' => __( 'Order Items: End', 'woocommerce-exporter' ),
1263
- 'hover' => __( 'WooCommerce Easy Bookings', 'woocommerce-exporter' )
1264
  );
1265
  }
1266
 
@@ -1298,28 +1302,30 @@ function woo_ce_extend_order_items_fields( $fields = array() ) {
1298
  );
1299
  }
1300
 
 
1301
  if( apply_filters( 'woo_ce_enable_product_attributes', true ) ) {
1302
- // Product Attributes
1303
- if( $attributes = woo_ce_get_product_attributes() ) {
1304
  foreach( $attributes as $attribute ) {
1305
  $attribute->attribute_label = trim( $attribute->attribute_label );
1306
  if( empty( $attribute->attribute_label ) )
1307
  $attribute->attribute_label = $attribute->attribute_name;
 
1308
  // First row is to fetch the Variation Attribute linked to the Order Item
1309
  $fields[] = array(
1310
- 'name' => sprintf( 'order_items_attribute_%s', sanitize_key( $attribute->attribute_name ) ),
1311
  'label' => sprintf( __( 'Order Items: %s Variation', 'woocommerce-exporter' ), ucwords( $attribute->attribute_label ) ),
1312
  'hover' => sprintf( apply_filters( 'woo_ce_extend_order_fields_attribute', '%s: %s (#%d)' ), __( 'Product Variation', 'woocommerce-exporter' ), $attribute->attribute_name, $attribute->attribute_id )
1313
  );
1314
  // The second row is to fetch the Product Attribute from the Order Item Product
1315
  $fields[] = array(
1316
- 'name' => sprintf( 'order_items_product_attribute_%s', sanitize_key( $attribute->attribute_name ) ),
1317
  'label' => sprintf( __( 'Order Items: %s Attribute', 'woocommerce-exporter' ), ucwords( $attribute->attribute_label ) ),
1318
  'hover' => sprintf( apply_filters( 'woo_ce_extend_order_fields_product_attribute', '%s: %s (#%d)' ), __( 'Product Attribute', 'woocommerce-exporter' ), $attribute->attribute_name, $attribute->attribute_id )
1319
  );
1320
  }
1321
- unset( $attributes, $attribute );
1322
  }
 
1323
  }
1324
 
1325
  // Custom Order Items fields
@@ -1388,7 +1394,8 @@ function woo_ce_get_gravity_forms_fields() {
1388
  if ( false === ( $fields = get_transient( WOO_CE_PREFIX . '_gravity_forms_fields' ) ) ) {
1389
 
1390
  $fields = array();
1391
- if( $gf_products = woo_ce_get_gravity_forms_products() ) {
 
1392
  foreach( $gf_products as $gf_product ) {
1393
  if( $gf_product_data = maybe_unserialize( get_post_meta( $gf_product->post_id, '_gravity_form_data', true ) ) ) {
1394
  // Check the class and method for Gravity Forms exists
@@ -1429,6 +1436,34 @@ function woo_ce_get_gravity_forms_fields() {
1429
 
1430
  }
1431
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1432
  // WooCommerce Custom Fields - http://www.rightpress.net/woocommerce-custom-fields
1433
  function woo_ce_get_wccf_product_fields() {
1434
 
@@ -1475,5 +1510,4 @@ function woo_ce_get_wccf_checkout_fields() {
1475
  return $checkout_fields->posts;
1476
  }
1477
 
1478
- }
1479
- ?>
61
  );
62
  }
63
 
64
+ // WooCommerce Germanized Pro - https://www.vendidero.de/woocommerce-germanized
65
  if( woo_ce_detect_export_plugin( 'wc_germanized_pro' ) ) {
66
  $fields[] = array(
67
  'name' => 'invoice_number',
729
  );
730
  }
731
  }
732
+ unset( $ac_fields, $ac_field, $ac_key );
733
  }
734
 
735
  // YITH WooCommerce Delivery Date Premium - http://yithemes.com/themes/plugins/yith-woocommerce-delivery-date/
1112
  );
1113
  $fields[] = array(
1114
  'name' => 'order_items_booking_all_day',
1115
+ 'label' => __( 'Order Items: All Day Booking', 'woocommerce-exporter' ),
1116
  'hover' => __( 'WooCommerce Bookings', 'woocommerce-exporter' )
1117
  );
1118
  $fields[] = array(
1172
 
1173
  // WooCommerce TM Extra Product Options - http://codecanyon.net/item/woocommerce-extra-product-options/7908619
1174
  if( woo_ce_detect_export_plugin( 'extra_product_options' ) ) {
1175
+ $tm_fields = woo_ce_get_extra_product_option_fields();
1176
+ if( !empty( $tm_fields ) ) {
1177
  foreach( $tm_fields as $tm_field ) {
1178
  $fields[] = array(
1179
  'name' => sprintf( 'order_items_tm_%s', sanitize_key( $tm_field['name'] ) ),
1181
  'hover' => __( 'WooCommerce TM Extra Product Options', 'woocommerce-exporter' )
1182
  );
1183
  }
 
1184
  }
1185
+ unset( $tm_fields, $tm_field );
1186
  }
1187
 
1188
  // WooCommerce Custom Fields - http://www.rightpress.net/woocommerce-custom-fields
1227
 
1228
  // WooCommerce Product Custom Options Lite - https://wordpress.org/plugins/woocommerce-custom-options-lite/
1229
  if( woo_ce_detect_export_plugin( 'wc_product_custom_options' ) ) {
1230
+ $custom_options = woo_ce_get_product_custom_options();
1231
+ if( !empty( $custom_options ) ) {
1232
  foreach( $custom_options as $custom_option ) {
1233
  $fields[] = array(
1234
  'name' => sprintf( 'order_items_pco_%s', sanitize_key( $custom_option ) ),
1237
  );
1238
  }
1239
  }
1240
+ unset( $custom_options, $custom_option );
1241
  }
1242
 
1243
  // Barcodes for WooCommerce - http://www.wolkenkraft.com/produkte/barcodes-fuer-woocommerce/
1259
  $fields[] = array(
1260
  'name' => 'order_items_booking_start_date',
1261
  'label' => __( 'Order Items: Start', 'woocommerce-exporter' ),
1262
+ 'hover' => __( 'WooCommerce Easy Booking', 'woocommerce-exporter' )
1263
  );
1264
  $fields[] = array(
1265
  'name' => 'order_items_booking_end_date',
1266
  'label' => __( 'Order Items: End', 'woocommerce-exporter' ),
1267
+ 'hover' => __( 'WooCommerce Easy Booking', 'woocommerce-exporter' )
1268
  );
1269
  }
1270
 
1302
  );
1303
  }
1304
 
1305
+ // Variation Attributes
1306
  if( apply_filters( 'woo_ce_enable_product_attributes', true ) ) {
1307
+ $attributes = woo_ce_get_product_attributes();
1308
+ if( !empty( $attributes ) ) {
1309
  foreach( $attributes as $attribute ) {
1310
  $attribute->attribute_label = trim( $attribute->attribute_label );
1311
  if( empty( $attribute->attribute_label ) )
1312
  $attribute->attribute_label = $attribute->attribute_name;
1313
+ $key = sanitize_key( $attribute->attribute_name );
1314
  // First row is to fetch the Variation Attribute linked to the Order Item
1315
  $fields[] = array(
1316
+ 'name' => sprintf( 'order_items_attribute_%s', $key ),
1317
  'label' => sprintf( __( 'Order Items: %s Variation', 'woocommerce-exporter' ), ucwords( $attribute->attribute_label ) ),
1318
  'hover' => sprintf( apply_filters( 'woo_ce_extend_order_fields_attribute', '%s: %s (#%d)' ), __( 'Product Variation', 'woocommerce-exporter' ), $attribute->attribute_name, $attribute->attribute_id )
1319
  );
1320
  // The second row is to fetch the Product Attribute from the Order Item Product
1321
  $fields[] = array(
1322
+ 'name' => sprintf( 'order_items_product_attribute_%s', $key ),
1323
  'label' => sprintf( __( 'Order Items: %s Attribute', 'woocommerce-exporter' ), ucwords( $attribute->attribute_label ) ),
1324
  'hover' => sprintf( apply_filters( 'woo_ce_extend_order_fields_product_attribute', '%s: %s (#%d)' ), __( 'Product Attribute', 'woocommerce-exporter' ), $attribute->attribute_name, $attribute->attribute_id )
1325
  );
1326
  }
 
1327
  }
1328
+ unset( $attributes, $attribute );
1329
  }
1330
 
1331
  // Custom Order Items fields
1394
  if ( false === ( $fields = get_transient( WOO_CE_PREFIX . '_gravity_forms_fields' ) ) ) {
1395
 
1396
  $fields = array();
1397
+ $gf_products = woo_ce_get_gravity_forms_products();
1398
+ if( !empty( $gf_products ) ) {
1399
  foreach( $gf_products as $gf_product ) {
1400
  if( $gf_product_data = maybe_unserialize( get_post_meta( $gf_product->post_id, '_gravity_form_data', true ) ) ) {
1401
  // Check the class and method for Gravity Forms exists
1436
 
1437
  }
1438
 
1439
+ // WooCommerce TM Extra Product Options - http://codecanyon.net/item/woocommerce-extra-product-options/7908619
1440
+ function woo_ce_get_extra_product_option_fields() {
1441
+
1442
+ global $wpdb;
1443
+
1444
+ $meta_key = '_tmcartepo_data';
1445
+ $tm_fields_sql = $wpdb->prepare( "SELECT order_itemmeta.`meta_value` FROM `" . $wpdb->prefix . "woocommerce_order_items` as order_items, `" . $wpdb->prefix . "woocommerce_order_itemmeta` as order_itemmeta WHERE order_items.`order_item_id` = order_itemmeta.`order_item_id` AND order_items.`order_item_type` = 'line_item' AND order_itemmeta.`meta_key` = %s", $meta_key );
1446
+ $tm_fields = $wpdb->get_col( $tm_fields_sql );
1447
+ if( !empty( $tm_fields ) ) {
1448
+ $fields = array();
1449
+ foreach( $tm_fields as $tm_field ) {
1450
+ $tm_field = maybe_unserialize( $tm_field );
1451
+ $size = count( $tm_field );
1452
+ for( $i = 0; $i < $size; $i++ ) {
1453
+ // Check that the name is set
1454
+ if( !empty( $tm_field[$i]['name'] ) ) {
1455
+ // Check if we haven't already set this
1456
+ if( !array_key_exists( sanitize_key( $tm_field[$i]['name'] ), $fields ) )
1457
+ $fields[sanitize_key( $tm_field[$i]['name'] )] = $tm_field[$i];
1458
+ }
1459
+ }
1460
+ }
1461
+ }
1462
+
1463
+ return $fields;
1464
+
1465
+ }
1466
+
1467
  // WooCommerce Custom Fields - http://www.rightpress.net/woocommerce-custom-fields
1468
  function woo_ce_get_wccf_product_fields() {
1469
 
1510
  return $checkout_fields->posts;
1511
  }
1512
 
1513
+ }
 
includes/order.php CHANGED
@@ -8,6 +8,7 @@ if( is_admin() ) {
8
 
9
  $count = 0;
10
  $post_type = 'shop_order';
 
11
  $woocommerce_version = woo_get_woo_version();
12
  // Check if this is a WooCommerce 2.2+ instance (new Post Status)
13
  if( version_compare( $woocommerce_version, '2.2' ) >= 0 )
@@ -754,8 +755,6 @@ function woo_ce_get_orders( $export_type = 'order', $args = array() ) {
754
  $orderby = ( isset( $args['order_orderby'] ) ? $args['order_orderby'] : 'ID' );
755
  $order = ( isset( $args['order_order'] ) ? $args['order_order'] : 'ASC' );
756
  $order_dates_filter = ( isset( $args['order_dates_filter'] ) ? $args['order_dates_filter'] : false );
757
- if( empty( $order_dates_filter ) )
758
- $order_dates_filter = 'current_week';
759
  switch( $order_dates_filter ) {
760
 
761
  case 'today':
@@ -827,6 +826,7 @@ function woo_ce_get_orders( $export_type = 'order', $args = array() ) {
827
  'fields' => 'ids',
828
  'suppress_filters' => false
829
  );
 
830
  $woocommerce_version = woo_get_woo_version();
831
  // Check if this is a pre-WooCommerce 2.2 instance
832
  if( version_compare( $woocommerce_version, '2.2' ) >= 0 )
@@ -917,7 +917,7 @@ function woo_ce_get_order_data( $order_id = 0, $export_type = 'order', $args = a
917
  // Order billing details
918
  if( !apply_filters( 'woo_ce_get_order_data_legacy_billing_address', version_compare( $woocommerce_version, '3.0', '<' ) ) ) {
919
  // WC: 3.0+ Order billing address
920
- $billing_address = $order->get_address( 'billing' );
921
  if( !empty( $billing_address ) ) {
922
  $order->billing_first_name = $billing_address['first_name'];
923
  $order->billing_last_name = $billing_address['last_name'];
@@ -1104,32 +1104,6 @@ function woo_ce_get_gravity_form_fields() {
1104
 
1105
  }
1106
 
1107
- function woo_ce_get_extra_product_option_fields() {
1108
-
1109
- global $wpdb;
1110
-
1111
- $meta_key = '_tmcartepo_data';
1112
- $tm_fields_sql = $wpdb->prepare( "SELECT order_itemmeta.`meta_value` FROM `" . $wpdb->prefix . "woocommerce_order_items` as order_items, `" . $wpdb->prefix . "woocommerce_order_itemmeta` as order_itemmeta WHERE order_items.`order_item_id` = order_itemmeta.`order_item_id` AND order_items.`order_item_type` = 'line_item' AND order_itemmeta.`meta_key` = %s", $meta_key );
1113
- $tm_fields = $wpdb->get_col( $tm_fields_sql );
1114
- if( !empty( $tm_fields ) ) {
1115
- $fields = array();
1116
- foreach( $tm_fields as $tm_field ) {
1117
- $tm_field = maybe_unserialize( $tm_field );
1118
- $size = count( $tm_field );
1119
- for( $i = 0; $i < $size; $i++ ) {
1120
- // Check that the name is set
1121
- if( !empty( $tm_field[$i]['name'] ) ) {
1122
- // Check if we haven't already set this
1123
- if( !array_key_exists( sanitize_key( $tm_field[$i]['name'] ), $fields ) )
1124
- $fields[sanitize_key( $tm_field[$i]['name'] )] = $tm_field[$i];
1125
- }
1126
- }
1127
- }
1128
- }
1129
- return $fields;
1130
-
1131
- }
1132
-
1133
  // Return the PHP date format for the requested Order Date filter
1134
  function woo_ce_get_order_date_filter( $filter = '', $format = '', $date_format = 'd-m-Y' ) {
1135
 
@@ -1389,6 +1363,7 @@ function woo_ce_get_order_payment_gateways() {
1389
  'title' => __( 'Other', 'woocommerce-exporter' ),
1390
  'method_title' => __( 'Other', 'woocommerce-exporter' )
1391
  );
 
1392
  return $output;
1393
 
1394
  }
@@ -1411,7 +1386,7 @@ function woo_ce_format_order_payment_gateway( $payment_id = '' ) {
1411
  }
1412
  if( empty( $payment_id ) )
1413
  $output = __( 'N/A', 'woocommerce-exporter' );
 
1414
  return $output;
1415
 
1416
  }
1417
- ?>
8
 
9
  $count = 0;
10
  $post_type = 'shop_order';
11
+
12
  $woocommerce_version = woo_get_woo_version();
13
  // Check if this is a WooCommerce 2.2+ instance (new Post Status)
14
  if( version_compare( $woocommerce_version, '2.2' ) >= 0 )
755
  $orderby = ( isset( $args['order_orderby'] ) ? $args['order_orderby'] : 'ID' );
756
  $order = ( isset( $args['order_order'] ) ? $args['order_order'] : 'ASC' );
757
  $order_dates_filter = ( isset( $args['order_dates_filter'] ) ? $args['order_dates_filter'] : false );
 
 
758
  switch( $order_dates_filter ) {
759
 
760
  case 'today':
826
  'fields' => 'ids',
827
  'suppress_filters' => false
828
  );
829
+
830
  $woocommerce_version = woo_get_woo_version();
831
  // Check if this is a pre-WooCommerce 2.2 instance
832
  if( version_compare( $woocommerce_version, '2.2' ) >= 0 )
917
  // Order billing details
918
  if( !apply_filters( 'woo_ce_get_order_data_legacy_billing_address', version_compare( $woocommerce_version, '3.0', '<' ) ) ) {
919
  // WC: 3.0+ Order billing address
920
+ $billing_address = ( method_exists( $order, 'get_address' ) ? $order->get_address( 'billing' ) : false );
921
  if( !empty( $billing_address ) ) {
922
  $order->billing_first_name = $billing_address['first_name'];
923
  $order->billing_last_name = $billing_address['last_name'];
1104
 
1105
  }
1106
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1107
  // Return the PHP date format for the requested Order Date filter
1108
  function woo_ce_get_order_date_filter( $filter = '', $format = '', $date_format = 'd-m-Y' ) {
1109
 
1363
  'title' => __( 'Other', 'woocommerce-exporter' ),
1364
  'method_title' => __( 'Other', 'woocommerce-exporter' )
1365
  );
1366
+
1367
  return $output;
1368
 
1369
  }
1386
  }
1387
  if( empty( $payment_id ) )
1388
  $output = __( 'N/A', 'woocommerce-exporter' );
1389
+
1390
  return $output;
1391
 
1392
  }
 
includes/product-extend.php CHANGED
@@ -1528,6 +1528,7 @@ function woo_ce_format_gpf_availability( $availability = null ) {
1528
 
1529
  }
1530
  }
 
1531
  return $output;
1532
 
1533
  }
@@ -1552,6 +1553,7 @@ function woo_ce_format_gpf_condition( $condition ) {
1552
 
1553
  }
1554
  }
 
1555
  return $output;
1556
 
1557
  }
@@ -1623,6 +1625,7 @@ function woo_ce_format_wpseo_noindex( $noindex = '' ) {
1623
 
1624
  }
1625
  }
 
1626
  return $output;
1627
 
1628
  }
@@ -1644,6 +1647,7 @@ function woo_ce_format_wpseo_follow( $follow = '' ) {
1644
 
1645
  }
1646
  }
 
1647
  return $output;
1648
 
1649
  }
@@ -1657,6 +1661,7 @@ function woo_ce_get_wholesale_prices_roles() {
1657
  if( is_array( $wholesale_roles ) )
1658
  $output = $wholesale_roles;
1659
  unset( $wholesale_roles );
 
1660
  return $output;
1661
 
1662
  }
1528
 
1529
  }
1530
  }
1531
+
1532
  return $output;
1533
 
1534
  }
1553
 
1554
  }
1555
  }
1556
+
1557
  return $output;
1558
 
1559
  }
1625
 
1626
  }
1627
  }
1628
+
1629
  return $output;
1630
 
1631
  }
1647
 
1648
  }
1649
  }
1650
+
1651
  return $output;
1652
 
1653
  }
1661
  if( is_array( $wholesale_roles ) )
1662
  $output = $wholesale_roles;
1663
  unset( $wholesale_roles );
1664
+
1665
  return $output;
1666
 
1667
  }
includes/product.php CHANGED
@@ -1462,6 +1462,4 @@ function woo_ce_format_product_sale_price_dates( $sale_date = '' ) {
1462
  $output = woo_ce_format_date( date( 'Y-m-d H:i:s', $sale_date ) );
1463
  return $output;
1464
 
1465
- }
1466
-
1467
- ?>
1462
  $output = woo_ce_format_date( date( 'Y-m-d H:i:s', $sale_date ) );
1463
  return $output;
1464
 
1465
+ }
 
 
includes/product_vendor.php CHANGED
@@ -21,6 +21,7 @@ if( is_admin() ) {
21
  } else {
22
  $count = $cached;
23
  }
 
24
  return $count;
25
 
26
  }
@@ -130,6 +131,7 @@ function woo_ce_override_product_vendor_field_labels( $fields = array() ) {
130
  $fields[$key]['label'] = $labels[$field['name']];
131
  }
132
  }
 
133
  return $fields;
134
 
135
  }
@@ -169,5 +171,4 @@ function woo_ce_get_product_vendors( $args = array(), $output = 'term_id' ) {
169
  }
170
  }
171
 
172
- }
173
- ?>
21
  } else {
22
  $count = $cached;
23
  }
24
+
25
  return $count;
26
 
27
  }
131
  $fields[$key]['label'] = $labels[$field['name']];
132
  }
133
  }
134
+
135
  return $fields;
136
 
137
  }
171
  }
172
  }
173
 
174
+ }
 
includes/review.php CHANGED
@@ -84,5 +84,4 @@ function woo_ce_get_review_fields( $format = 'full' ) {
84
  break;
85
 
86
  }
87
- }
88
- ?>
84
  break;
85
 
86
  }
87
+ }
 
includes/settings.php CHANGED
@@ -6,7 +6,8 @@ function woo_ce_export_settings_quicklinks() {
6
  <li><a href="#rss-settings"><?php _e( 'RSS Settings', 'woocommerce-exporter' ); ?></a> |</li>
7
  <li><a href="#scheduled-exports"><?php _e( 'Scheduled Exports', 'woocommerce-exporter' ); ?></a> |</li>
8
  <li><a href="#cron-exports"><?php _e( 'CRON Exports', 'woocommerce-exporter' ); ?></a> |</li>
9
- <li><a href="#orders-screen"><?php _e( 'Orders Screen', 'woocommerce-exporter' ); ?></a></li>
 
10
  <?php
11
  ob_end_flush();
12
 
@@ -101,11 +102,11 @@ function woo_ce_export_settings_extend() {
101
  $cron_fields = 'all';
102
 
103
  // Orders Screen
104
- $order_actions_csv = 1;
105
- $order_actions_tsv = 1;
106
  $order_actions_xml = 0;
107
- $order_actions_xls = 1;
108
- $order_actions_xlsx = 1;
109
 
110
  $troubleshooting_url = 'http://www.visser.com.au/documentation/store-exporter-deluxe/usage/';
111
 
@@ -178,323 +179,27 @@ function woo_ce_export_settings_extend() {
178
  <h3>
179
  <div class="dashicons dashicons-calendar"></div>&nbsp;<?php _e( 'Scheduled Exports', 'woocommerce-exporter' ); ?>
180
  </h3>
181
- <p class="description"><?php _e( 'Configure Store Exporter Deluxe to automatically generate exports, apply filters to export just what you need.<br />Adjusting options within the Scheduling sub-section will after clicking Save Changes refresh the scheduled export engine, editing filters, formats, methods, etc. will not affect the scheduling of the current scheduled export.', 'woocommerce-exporter' ); ?></p>
182
  </td>
183
  </tr>
184
  <tr>
185
  <th><label for="enable_auto"><?php _e( 'Enable scheduled exports', 'woocommerce-exporter' ); ?></label></th>
186
  <td>
187
- <select id="enable_auto" name="enable_auto">
188
  <option value="1" disabled="disabled"><?php _e( 'Yes', 'woocommerce-exporter' ); ?></option>
189
  <option value="0" selected="selected"><?php _e( 'No', 'woocommerce-exporter' ); ?></option>
190
  </select>
191
- <p class="description"><?php _e( 'Enabling Scheduled Exports will trigger automated exports at the interval specified under Once every (minutes).', 'woocommerce-exporter' ); ?></p>
192
- </td>
193
- </tr>
194
- <tr>
195
- <th>
196
- <label for="export_type"><?php _e( 'Export type', 'woocommerce-exporter' ); ?></label>
197
- </th>
198
- <td>
199
- <select id="export_type" name="export_type">
200
- <?php if( !empty( $types ) ) { ?>
201
- <?php foreach( $types as $key => $type ) { ?>
202
- <option value="<?php echo $key; ?>"><?php echo $type; ?></option>
203
- <?php } ?>
204
- <?php } else { ?>
205
- <option value=""><?php _e( 'No export types were found.', 'woocommerce-exporter' ); ?></option>
206
- <?php } ?>
207
- </select>
208
- <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
209
- <p class="description"><?php _e( 'Select the data type you want to export.', 'woocommerce-exporter' ); ?></p>
210
- </td>
211
- </tr>
212
- <tr class="export_type_options">
213
- <th>
214
- <label><?php _e( 'Export filters', 'woocommerce-exporter' ); ?></label>
215
- </th>
216
- <td>
217
- <ul>
218
-
219
- <li class="export-options product-options">
220
- <p class="label"><?php _e( 'Product category', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></p>
221
- <?php if( !empty( $product_categories ) ) { ?>
222
- <select data-placeholder="<?php _e( 'Choose a Product Category...', 'woocommerce-exporter' ); ?>" name="product_filter_category[]" multiple class="chzn-select" style="width:95%;">
223
- <?php foreach( $product_categories as $product_category ) { ?>
224
- <option><?php echo woo_ce_format_product_category_label( $product_category->name, $product_category->parent_name ); ?> (<?php printf( __( 'Term ID: %d', 'woocommerce-exporter' ), $product_category->term_id ); ?>)</option>
225
- <?php } ?>
226
- </select>
227
- <?php } else { ?>
228
- <?php _e( 'No Product Categories were found.', 'woocommerce-exporter' ); ?>
229
- <?php } ?>
230
- <p class="description"><?php _e( 'Select the Product Category\'s you want to filter exported Products by. Default is to include all Product Categories.', 'woocommerce-exporter' ); ?></p>
231
- <hr />
232
- </li>
233
-
234
- <li class="export-options product-options">
235
- <p class="label"><?php _e( 'Product tag', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></p>
236
- <?php if( !empty( $product_tags ) ) { ?>
237
- <select data-placeholder="<?php _e( 'Choose a Product Tag...', 'woocommerce-exporter' ); ?>" name="product_filter_tag[]" multiple class="chzn-select" style="width:95%;">
238
- <?php foreach( $product_tags as $product_tag ) { ?>
239
- <option><?php echo $product_tag->name; ?> (<?php printf( __( 'Term ID: %d', 'woocommerce-exporter' ), $product_tag->term_id ); ?>)</option>
240
- <?php } ?>
241
- </select>
242
- <?php } else { ?>
243
- <?php _e( 'No Product Tags were found.', 'woocommerce-exporter' ); ?>
244
- <?php } ?>
245
- <p class="description"><?php _e( 'Select the Product Tag\'s you want to filter exported Products by. Default is to include all Product Tags.', 'woocommerce-exporter' ); ?></p>
246
- <hr />
247
- </li>
248
-
249
- <li class="export-options product-options">
250
- <p class="label"><?php _e( 'Product type', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></p>
251
- <?php if( !empty( $product_types ) ) { ?>
252
- <select data-placeholder="<?php _e( 'Choose a Product Type...', 'woocommerce-exporter' ); ?>" name="product_filter_type[]" multiple class="chzn-select" style="width:95%;">
253
- <?php foreach( $product_types as $key => $product_type ) { ?>
254
- <option><?php echo woo_ce_format_product_type( $product_type['name'] ); ?> (<?php echo $product_type['count']; ?>)</option>
255
- <?php } ?>
256
- </select>
257
- <?php } else { ?>
258
- <?php _e( 'No Product Types were found.', 'woocommerce-exporter' ); ?>
259
- <?php } ?>
260
- <p class="description"><?php _e( 'Select the Product Type\'s you want to filter exported Products by. Default is to include all Product Types and Variations.', 'woocommerce-exporter' ); ?></p>
261
- <hr />
262
- </li>
263
-
264
- <li class="export-options product-options">
265
- <p class="label"><?php _e( 'Stock status', 'woocommerce-exporter' ); ?></p>
266
- <ul style="margin-top:0.2em;">
267
- <li><label><input type="radio" name="product_filter_stock" value="" disabled="disabled" /> <?php _e( 'Include both', 'woocommerce-exporter' ); ?></label><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
268
- <li><label><input type="radio" name="product_filter_stock" value="instock" disabled="disabled" /> <?php _e( 'In stock', 'woocommerce-exporter' ); ?></label><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
269
- <li><label><input type="radio" name="product_filter_stock" value="outofstock" disabled="disabled" /> <?php _e( 'Out of stock', 'woocommerce-exporter' ); ?></label><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
270
- </ul>
271
- <p class="description"><?php _e( 'Select the Stock Status\'s you want to filter exported Products by. Default is to include all Stock Status\'s.', 'woocommerce-exporter' ); ?></p>
272
- </li>
273
-
274
- <li class="export-options order-options">
275
- <p class="label"><?php _e( 'Order date', 'woocommerce-exporter' ); ?></p>
276
- <ul style="margin-top:0.2em;">
277
- <li><label><input type="radio" name="order_dates_filter" value="" disabled="disabled" /><?php _e( 'All', 'woocommerce-exporter' ); ?></label><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
278
- <li><label><input type="radio" name="order_dates_filter" value="today" disabled="disabled" /><?php _e( 'Today', 'woocommerce-exporter' ); ?></label><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
279
- <li><label><input type="radio" name="order_dates_filter" value="yesterday" disabled="disabled" /><?php _e( 'Yesterday', 'woocommerce-exporter' ); ?></label><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
280
- <li><label><input type="radio" name="order_dates_filter" value="current_week" disabled="disabled" /><?php _e( 'Current week', 'woocommerce-exporter' ); ?></label><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
281
- <li><label><input type="radio" name="order_dates_filter" value="last_week" disabled="disabled" /><?php _e( 'Last week', 'woocommerce-exporter' ); ?></label><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
282
- <li><label><input type="radio" name="order_dates_filter" value="current_month" disabled="disabled" /><?php _e( 'Current month', 'woocommerce-exporter' ); ?></label><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
283
- <li><label><input type="radio" name="order_dates_filter" value="last_month" disabled="disabled" /><?php _e( 'Last month', 'woocommerce-exporter' ); ?></label><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
284
- <li>
285
- <label><input type="radio" name="order_dates_filter" value="variable" disabled="disabled" /><?php _e( 'Variable date', 'woocommerce-exporter' ); ?></label>
286
- <div style="margin-top:0.2em;">
287
- <?php _e( 'Last', 'woocommerce-exporter' ); ?>
288
- <input type="text" name="order_dates_filter_variable" class="text" size="4" value="<?php echo $order_filter_date_variable; ?>" disabled="disabled" />
289
- <select name="order_dates_filter_variable_length">
290
- <option value="">&nbsp;</option>
291
- <option value="second" disabled="disabled"><?php _e( 'second(s)', 'woocommerce-exporter' ); ?></option>
292
- <option value="minute" disabled="disabled"><?php _e( 'minute(s)', 'woocommerce-exporter' ); ?></option>
293
- <option value="hour" disabled="disabled"><?php _e( 'hour(s)', 'woocommerce-exporter' ); ?></option>
294
- <option value="day" disabled="disabled"><?php _e( 'day(s)', 'woocommerce-exporter' ); ?></option>
295
- <option value="week" disabled="disabled"><?php _e( 'week(s)', 'woocommerce-exporter' ); ?></option>
296
- <option value="month" disabled="disabled"><?php _e( 'month(s)', 'woocommerce-exporter' ); ?></option>
297
- <option value="year" disabled="disabled"><?php _e( 'year(s)', 'woocommerce-exporter' ); ?></option>
298
- </select>
299
- <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
300
- </div>
301
- </li>
302
- <li>
303
- <label><input type="radio" name="order_dates_filter" value="manual" disabled="disabled" /><?php _e( 'Fixed date', 'woocommerce-exporter' ); ?></label>
304
- <div style="margin-top:0.2em;">
305
- <input type="text" size="10" maxlength="10" class="text datepicker" /> to <input type="text" size="10" maxlength="10" class="text datepicker" /><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
306
- </div>
307
- </li>
308
- </ul>
309
- <p class="description"><?php _e( 'Filter the dates of Orders to be included in the export. If manually selecting dates ensure the Fixed date radio field is checked, likewise for variable dates. Default is to include all Orders made.', 'woocommerce-exporter' ); ?></p>
310
- <hr />
311
- </li>
312
-
313
- <li class="export-options order-options">
314
- <p class="label"><?php _e( 'Order status', 'woocommerce-exporter' ); ?></p>
315
- <select data-placeholder="<?php _e( 'Choose a Order Status...', 'woocommerce-exporter' ); ?>" name="order_filter_status[]" multiple class="chzn-select" style="width:95%;">
316
- <option value="" selected="selected"><?php _e( 'All', 'woocommerce-exporter' ); ?></option>
317
- <?php if( !empty( $order_statuses ) ) { ?>
318
- <?php foreach( $order_statuses as $order_status ) { ?>
319
- <option value="<?php echo $order_status->name; ?>" disabled="disabled"><?php echo ucfirst( $order_status->name ); ?></option>
320
- <?php } ?>
321
- <?php } ?>
322
- </select>
323
- <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
324
- <p class="description"><?php _e( 'Select the Order Status you want to filter exported Orders by. Default is to include all Order Status options.', 'woocommerce-exporter' ); ?></p>
325
- <hr />
326
- </li>
327
-
328
- <li class="export-options order-options">
329
- <p class="label"><?php _e( 'Payment gateway', 'woocommerce-exporter' ); ?></p>
330
- <select data-placeholder="<?php _e( 'Choose a Payment Gateway...', 'woocommerce-exporter' ); ?>" name="order_filter_payment[]" multiple class="chzn-select" style="width:95%;">
331
- <option value="" selected="selected"><?php _e( 'All', 'woocommerce-exporter' ); ?></option>
332
- </select>
333
- <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
334
- <p class="description"><?php _e( 'Select the Payment Gateways you want to filter exported Orders by. Default is to include all Payment Gateways.', 'woocommerce-exporter' ); ?></p>
335
- <hr />
336
- </li>
337
-
338
- <li class="export-options order-options">
339
- <p class="label"><?php _e( 'Shipping method', 'woocommerce-exporter' ); ?></p>
340
- <select data-placeholder="<?php _e( 'Choose a Shipping Method...', 'woocommerce-exporter' ); ?>" name="order_filter_shipping[]" multiple class="chzn-select" style="width:95%;">
341
- <option value="" selected="selected"><?php _e( 'All', 'woocommerce-exporter' ); ?></option>
342
- </select>
343
- <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
344
- <p class="description"><?php _e( 'Select the Shipping Methods you want to filter exported Orders by. Default is to include all Shipping Methods.', 'woocommerce-exporter' ); ?></p>
345
- <hr />
346
- </li>
347
-
348
- <li class="export-options order-options">
349
- <p class="label"><?php _e( 'Billing country', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></p>
350
- <select data-placeholder="<?php _e( 'Choose a Billing Country...', 'woocommerce-exporter' ); ?>" name="order_filter_billing_country[]" multiple class="chzn-select" style="width:95%;">
351
- <option value="" selected="selected"><?php _e( 'All', 'woocommerce-exporter' ); ?></option>
352
- </select>
353
- <p class="description"><?php _e( 'Filter Orders by Billing Country to be included in the export. Default is to include all Countries.', 'woocommerce-exporter' ); ?></p>
354
- <hr />
355
- </li>
356
-
357
- <li class="export-options order-options">
358
- <p class="label"><?php _e( 'Shipping country', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></p>
359
- <select data-placeholder="<?php _e( 'Choose a Shipping Country...', 'woocommerce-exporter' ); ?>" id="order_filter_shipping_country" name="order_filter_shipping_country" class="chzn-select">
360
- <option value="" selected="selected"><?php _e( 'All', 'woocommerce-exporter' ); ?></option>
361
- </select>
362
- <p class="description"><?php _e( 'Filter Orders by Shipping Country to be included in the export. Default is to include all Countries.', 'woocommerce-exporter' ); ?></p>
363
- </li>
364
-
365
- <li class="export-options category-options tag-options brand-options customer-options user-options coupon-options subscription-options product_vendor-options commission-options shipping_class-options">
366
- <p><?php _e( 'No export filter options are available for this export type.', 'woocommerce-exporter' ); ?></p>
367
- </li>
368
-
369
- </ul>
370
- </td>
371
- </tr>
372
-
373
- <tr>
374
- <th>
375
- <label><?php _e( 'Scheduling', 'woocommerce-exporter' ); ?></label>
376
- </th>
377
- <td>
378
- <p><?php _e( 'How often do you want the export to run?', 'woocommerce-exporter' ); ?></p>
379
- <ul>
380
- <li>
381
- <label><input type="radio" name="auto_schedule" value="custom" disabled="disabled" /> <?php _e( 'Once every ', 'woocommerce-exporter' ); ?></label>
382
- <input name="auto_interval" type="text" id="auto_interval" value="<?php echo esc_attr( $auto_interval ); ?>" size="6" maxlength="6" class="text" disabled="disabled" />
383
- <?php _e( 'minutes', 'woocommerce-exporter' ); ?>
384
- <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
385
- </li>
386
- <li><label><input type="radio" name="auto_schedule" value="daily" disabled="disabled" /> <?php _e( 'Daily', 'woocommerce-exporter' ); ?></label><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
387
- <li><label><input type="radio" name="auto_schedule" value="weekly" disabled="disabled" /> <?php _e( 'Weekly', 'woocommerce-exporter' ); ?></label><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
388
- <li><label><input type="radio" name="auto_schedule" value="monthly" disabled="disabled" /> <?php _e( 'Monthly', 'woocommerce-exporter' ); ?></label><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
389
- <li><label><input type="radio" name="auto_schedule" value="one-time" disabled="disabled" /> <?php _e( 'One time', 'woocommerce-exporter' ); ?></label><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
390
- </ul>
391
- <p class="description"><?php _e( 'Choose how often Store Exporter Deluxe generates new exports. Default is every 1440 minutes (once every 24 hours).', 'woocommerce-exporter' ); ?></p>
392
- <hr />
393
- <p><?php _e( 'When do you want scheduled exports to start?', 'woocommerce-exporter' ); ?></p>
394
- <ul>
395
- <li><label><input type="radio" name="auto_commence" value="now" disabled="disabled" /><?php _e( 'From now', 'woocommerce-exporter' ); ?></label><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
396
- <li><label><input type="radio" name="auto_commence" value="future" disabled="disabled" /><?php _e( 'From the following', 'woocommerce-exporter' ); ?></label>: <input type="text" name="auto_commence_date" size="20" maxlength="20" class="text datetimepicker" value="<?php echo $auto_commence_date; ?>" /><!--, <?php _e( 'at this time', 'woocommerce-exporter' ); ?>: <input type="text" name="auto_interval_time" size="10" maxlength="10" class="text timepicker" />--><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></li>
397
- </ul>
398
- </td>
399
- </tr>
400
-
401
- <tr>
402
- <th>
403
- <label><?php _e( 'Export format', 'woocommerce-exporter' ); ?></label>
404
- </th>
405
- <td>
406
- <ul style="margin-top:0.2em;">
407
- <li><label><input type="radio" name="auto_format" value="csv" disabled="disabled" /> <?php _e( 'CSV', 'woocommerce-exporter' ); ?> <span class="description"><?php _e( '(Comma Separated Values)', 'woocommerce-exporter' ); ?> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></li>
408
- <li><label><input type="radio" name="auto_format" value="xml" disabled="disabled" /> <?php _e( 'XML', 'woocommerce-exporter' ); ?> <span class="description"><?php _e( '(EXtensible Markup Language)', 'woocommerce-exporter' ); ?> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></li>
409
- <li><label><input type="radio" name="auto_format" value="xls" disabled="disabled" /> <?php _e( 'Excel (XLS)', 'woocommerce-exporter' ); ?> <span class="description"><?php _e( '(Excel 97-2003)', 'woocommerce-exporter' ); ?> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></li>
410
- <li><label><input type="radio" name="auto_format" value="xlsx" disabled="disabled" /> <?php _e( 'Excel (XLSX)', 'woocommerce-exporter' ); ?> <span class="description"><?php _e( '(Excel 2007-2013)', 'woocommerce-exporter' ); ?> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></li>
411
- </ul>
412
- <p class="description"><?php _e( 'Adjust the export format to generate different export file formats. Default is CSV.', 'woocommerce-exporter' ); ?></p>
413
- </td>
414
- </tr>
415
- <tr>
416
- <th>
417
- <label for="auto_method"><?php _e( 'Export method', 'woocommerce-exporter' ); ?></label>
418
- </th>
419
- <td>
420
- <select id="auto_method" name="auto_method">
421
- <option value="archive"><?php _e( 'Archive to WordPress Media', 'woocommerce-exporter' ); ?></option>
422
- <option value="email"><?php _e( 'Send as e-mail', 'woocommerce-exporter' ); ?></option>
423
- <option value="post"><?php _e( 'POST to remote URL', 'woocommerce-exporter' ); ?></option>
424
- <option value="ftp"><?php _e( 'Upload to remote FTP', 'woocommerce-exporter' ); ?></option>
425
- </select>
426
  <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
427
- <p class="description"><?php _e( 'Choose what Store Exporter Deluxe does with the generated export. Default is to archive the export to the WordPress Media for archival purposes.', 'woocommerce-exporter' ); ?></p>
428
  </td>
429
  </tr>
430
- <tr class="auto_method_options">
431
- <th>
432
- <label><?php _e( 'Export method options', 'woocommerce-exporter' ); ?></label>
433
- </th>
434
- <td>
435
- <ul>
436
-
437
- <li class="export-options email-options">
438
- <p>
439
- <label for="email_to"><?php _e( 'Default e-mail recipient', 'woocommerce-exporter' ); ?></label><br />
440
- <input name="email_to" type="text" id="email_to" value="<?php echo esc_attr( $email_to ); ?>" class="regular-text code" disabled="disabled" /><br /><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
441
- </p>
442
- <p class="description"><?php _e( 'Set the default recipient of scheduled export e-mails, multiple recipients can be added using the <code><attr title="comma">,</attr></code> separator. This option can be overriden via CRON using the <code>to</code> argument.<br />Default is the Blog Administrator e-mail address set on the WordPress &raquo; Settings screen.', 'woocommerce-exporter' ); ?></p>
443
-
444
- <p>
445
- <label for="email_subject"><?php _e( 'Default e-mail subject', 'woocommerce-exporter' ); ?></label><br />
446
- <input name="email_subject" type="text" id="email_subject" value="<?php echo esc_attr( $email_subject ); ?>" class="large-text code" disabled="disabled" /><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
447
- </p>
448
- <p class="description"><?php _e( 'Set the default subject of scheduled export e-mails, can be overriden via CRON using the <code>subject</code> argument. Tags can be used: <code>%store_name%</code>, <code>%export_type%</code>, <code>%export_filename%</code>.', 'woocommerce-exporter' ); ?></p>
449
- </li>
450
 
451
- <li class="export-options post-options">
452
- <p>
453
- <label for="post_to"><?php _e( 'Default remote POST URL', 'woocommerce-exporter' ); ?></label><br />
454
- <input name="post_to" type="text" id="post_to" value="<?php echo esc_url( $post_to ); ?>" class="large-text code" disabled="disabled" /><br /><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
455
- </p>
456
- <p class="description"><?php printf( __( 'Set the default remote POST address for scheduled exports, can be overriden via CRON using the <code>to</code> argument. Default is empty. See our <a href="%s" target="_blank">Usage</a> document for more information on Default remote POST URL.', 'woocommerce-exporter' ), $troubleshooting_url ); ?></p>
457
- </li>
458
-
459
- <li class="export-options ftp-options">
460
- <label for="ftp_method_host"><?php _e( 'Host', 'woocommerce-exporter' ); ?>:</label> <input type="text" id="ftp_method_host" name="ftp_method_host" size="15" class="regular-text code" value="<?php echo sanitize_text_field( $ftp_method_host ); ?>" disabled="disabled" />&nbsp;
461
- <label for="ftp_method_port" style="width:auto;"><?php _e( 'Port', 'woocommerce-exporter' ); ?>:</label> <input type="text" id="ftp_method_port" name="ftp_method_port" size="5" class="short-text code" value="<?php echo sanitize_text_field( $ftp_method_port ); ?>" disabled="disabled" maxlength="5" /><br />
462
- <label for="ftp_method_protocol"><?php _e( 'Protocol', 'woocommerce-exporter' ); ?></label>
463
- <select name="ftp_method_protocol">
464
- <option><?php _e( 'FTP - File Transfer Protocol', 'woocommerce-exporter' ); ?></option>
465
- <option disabled="disabled"><?php _e( 'SFTP - SSH File Transfer Protocol', 'woocommerce-exporter' ); ?></option>
466
- </select><br />
467
- <label for="ftp_method_user"><?php _e( 'Username', 'woocommerce-exporter' ); ?>:</label> <input type="text" id="ftp_method_user" name="ftp_method_user" size="15" class="regular-text code" value="<?php echo sanitize_text_field( $ftp_method_user ); ?>" disabled="disabled" /><br />
468
- <label for="ftp_method_pass"><?php _e( 'Password', 'woocommerce-exporter' ); ?>:</label> <input type="password" id="ftp_method_pass" name="ftp_method_pass" size="15" class="regular-text code" value="" disabled="disabled" /><?php if( !empty( $ftp_method_pass ) ) { echo ' ' . __( '(password is saved)', 'woocommerce-exporter' ); } ?><br />
469
- <label for="ftp_method_file_path"><?php _e( 'File path', 'woocommerce-exporter' ); ?>:</label> <input type="text" id="ftp_method_file_path" name="ftp_method_path" size="25" class="regular-text code" value="<?php echo sanitize_text_field( $ftp_method_path ); ?>" disabled="disabled" /><br />
470
- <label for="ftp_method_filename"><?php _e( 'Fixed filename', 'woocommerce-exporter' ); ?>:</label> <input type="text" id="ftp_method_filename" name="ftp_method_filename" size="25" class="regular-text code" value="<?php echo sanitize_text_field( $ftp_method_filename ); ?>" disabled="disabled" /><br />
471
- <label for="ftp_method_passive"><?php _e( 'Transfer mode', 'woocommerce-exporter' ); ?>:</label>
472
- <select id="ftp_method_passive" name="ftp_method_passive">
473
- <option value="auto"><?php _e( 'Auto', 'woocommerce-exporter' ); ?></option>
474
- <option value="active" disabled="disabled"><?php _e( 'Active', 'woocommerce-exporter' ); ?></option>
475
- <option value="passive" disabled="disabled"><?php _e( 'Passive', 'woocommerce-exporter' ); ?></option>
476
- </select><br />
477
- <label for="ftp_method_timeout"><?php _e( 'Timeout', 'woocommerce-exporter' ); ?>:</label> <input type="text" id="ftp_method_timeout" name="ftp_method_timeout" size="5" class="short-text code" value="<?php echo sanitize_text_field( $ftp_method_timeout ); ?>" disabled="disabled" /><br />
478
- <p class="description"><?php _e( 'Enter the FTP host (minus <code>ftp://</code>), login details and path of where to save the export file, do not provide the filename, the export filename can be set on General Settings above. For file path example: <code>wp-content/uploads/exports/</code>', 'woocommerce-exporter' ); ?></p>
479
- </li>
480
-
481
- <li class="export-options archive-options">
482
- <p><?php _e( 'No export method options are available for this export method.', 'woocommerce-exporter' ); ?></p>
483
- </li>
484
-
485
- </ul>
486
- </td>
487
- </tr>
488
  <tr>
489
- <th>
490
- <label for="scheduled_fields"><?php _e( 'Export fields', 'woocommerce-exporter' ); ?></label>
491
- </th>
492
  <td>
493
- <ul style="margin-top:0.2em;">
494
- <li><label><input type="radio" id="scheduled_fields" name="scheduled_fields" value="all"<?php checked( $scheduled_fields, 'all' ); ?> /> <?php _e( 'Include all Export Fields for the requested Export Type', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></li>
495
- <li><label><input type="radio" name="scheduled_fields" value="saved"<?php checked( $scheduled_fields, 'saved' ); ?> disabled="disabled" /> <?php _e( 'Use the saved Export Fields preference set on the Export screen for the requested Export Type', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></li>
496
- </ul>
497
- <p class="description"><?php _e( 'Control whether all known export fields are included or only checked fields from the Export Fields section on the Export screen for each Export Type. Default is to include all export fields.', 'woocommerce-exporter' ); ?></p>
498
  </td>
499
  </tr>
500
 
@@ -552,11 +257,11 @@ function woo_ce_export_settings_extend() {
552
  </th>
553
  <td>
554
  <ul>
555
- <li><label><input type="checkbox" name="order_actions_csv" value="1"<?php checked( $order_actions_csv ); ?> /> <?php _e( 'Export to CSV', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></li>
556
- <li><label><input type="checkbox" name="order_actions_tsv" value="1"<?php checked( $order_actions_tsv ); ?> /> <?php _e( 'Export to TSV', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></li>
557
- <li><label><input type="checkbox" name="order_actions_xls" value="1"<?php checked( $order_actions_xls ); ?> /> <?php _e( 'Export to XLS', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></li>
558
- <li><label><input type="checkbox" name="order_actions_xlsx" value="1"<?php checked( $order_actions_xlsx ); ?> /> <?php _e( 'Export to XLSX', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></li>
559
- <li><label><input type="checkbox" name="order_actions_xml" value="1"<?php checked( $order_actions_xml ); ?> /> <?php _e( 'Export to XML', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></li>
560
  </ul>
561
  <p class="description"><?php _e( 'Control the visibility of different Order actions on the WooCommerce &raquo; Orders screen.', 'woocommerce-exporter' ); ?></p>
562
  </td>
@@ -568,7 +273,6 @@ function woo_ce_export_settings_extend() {
568
 
569
  function woo_ce_export_settings_save() {
570
 
571
- // Strip file extension from export filename
572
  $export_filename = strip_tags( $_POST['export_filename'] );
573
  woo_ce_update_option( 'export_filename', $export_filename );
574
  woo_ce_update_option( 'delete_file', absint( $_POST['delete_file'] ) );
@@ -583,8 +287,9 @@ function woo_ce_export_settings_save() {
583
  woo_ce_update_option( 'date_format', sanitize_text_field( $_POST['date_format'] ) );
584
  }
585
 
 
 
586
  $message = __( 'Changes have been saved.', 'woocommerce-exporter' );
587
  woo_ce_admin_notice( $message );
588
 
589
- }
590
- ?>
6
  <li><a href="#rss-settings"><?php _e( 'RSS Settings', 'woocommerce-exporter' ); ?></a> |</li>
7
  <li><a href="#scheduled-exports"><?php _e( 'Scheduled Exports', 'woocommerce-exporter' ); ?></a> |</li>
8
  <li><a href="#cron-exports"><?php _e( 'CRON Exports', 'woocommerce-exporter' ); ?></a> |</li>
9
+ <li><a href="#orders-screen"><?php _e( 'Orders Screen', 'woocommerce-exporter' ); ?></a> |</li>
10
+ <li><a href="#export-triggers"><?php _e( 'Export Triggers', 'woocommerce-exporter' ); ?></a></li>
11
  <?php
12
  ob_end_flush();
13
 
102
  $cron_fields = 'all';
103
 
104
  // Orders Screen
105
+ $order_actions_csv = 0;
106
+ $order_actions_tsv = 0;
107
  $order_actions_xml = 0;
108
+ $order_actions_xls = 0;
109
+ $order_actions_xlsx = 0;
110
 
111
  $troubleshooting_url = 'http://www.visser.com.au/documentation/store-exporter-deluxe/usage/';
112
 
179
  <h3>
180
  <div class="dashicons dashicons-calendar"></div>&nbsp;<?php _e( 'Scheduled Exports', 'woocommerce-exporter' ); ?>
181
  </h3>
182
+ <p class="description"><?php _e( 'Automatically generate exports and apply filters to export just what you need.<br />Adjusting options within the Scheduling sub-section will after clicking Save Changes refresh the scheduled export engine, editing filters, formats, methods, etc. will not affect the scheduling of the current scheduled export.', 'woocommerce-exporter' ); ?></p>
183
  </td>
184
  </tr>
185
  <tr>
186
  <th><label for="enable_auto"><?php _e( 'Enable scheduled exports', 'woocommerce-exporter' ); ?></label></th>
187
  <td>
188
+ <select id="enable_auto" name="enable_auto" disabled="disabled">
189
  <option value="1" disabled="disabled"><?php _e( 'Yes', 'woocommerce-exporter' ); ?></option>
190
  <option value="0" selected="selected"><?php _e( 'No', 'woocommerce-exporter' ); ?></option>
191
  </select>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
192
  <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
193
+ <p class="description"><?php _e( 'Enabling Scheduled Exports will trigger automated exports at the intervals specified under Scheduling within each scheduled export. You can suspend individual scheduled exports by changing the Post Status.', 'woocommerce-exporter' ); ?></p>
194
  </td>
195
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  <tr>
198
+ <th>&nbsp;</th>
 
 
199
  <td>
200
+ <p>
201
+ <a href="<?php echo add_query_arg( array( 'tab' => 'scheduled_export' ) ); ?>"><?php _e( 'View Scheduled Exports', 'woocommerce-exporter' ); ?></a>
202
+ </p>
 
 
203
  </td>
204
  </tr>
205
 
257
  </th>
258
  <td>
259
  <ul>
260
+ <li><label><input type="checkbox" name="order_actions_csv" value="1"<?php checked( $order_actions_csv ); ?> disabled="disabled" /> <?php _e( 'Export to CSV', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></label></li>
261
+ <li><label><input type="checkbox" name="order_actions_tsv" value="1"<?php checked( $order_actions_tsv ); ?> disabled="disabled" /> <?php _e( 'Export to TSV', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></li>
262
+ <li><label><input type="checkbox" name="order_actions_xls" value="1"<?php checked( $order_actions_xls ); ?> disabled="disabled" /> <?php _e( 'Export to XLS', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></li>
263
+ <li><label><input type="checkbox" name="order_actions_xlsx" value="1"<?php checked( $order_actions_xlsx ); ?> disabled="disabled" /> <?php _e( 'Export to XLSX', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></li>
264
+ <li><label><input type="checkbox" name="order_actions_xml" value="1"<?php checked( $order_actions_xml ); ?> disabled="disabled" /> <?php _e( 'Export to XML', 'woocommerce-exporter' ); ?><span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label></li>
265
  </ul>
266
  <p class="description"><?php _e( 'Control the visibility of different Order actions on the WooCommerce &raquo; Orders screen.', 'woocommerce-exporter' ); ?></p>
267
  </td>
273
 
274
  function woo_ce_export_settings_save() {
275
 
 
276
  $export_filename = strip_tags( $_POST['export_filename'] );
277
  woo_ce_update_option( 'export_filename', $export_filename );
278
  woo_ce_update_option( 'delete_file', absint( $_POST['delete_file'] ) );
287
  woo_ce_update_option( 'date_format', sanitize_text_field( $_POST['date_format'] ) );
288
  }
289
 
290
+ // Export Triggers
291
+
292
  $message = __( 'Changes have been saved.', 'woocommerce-exporter' );
293
  woo_ce_admin_notice( $message );
294
 
295
+ }
 
includes/shipping_class.php CHANGED
@@ -17,6 +17,7 @@ if( is_admin() ) {
17
  } else {
18
  $count = $cached;
19
  }
 
20
  return $count;
21
 
22
  }
@@ -87,5 +88,4 @@ function woo_ce_get_shipping_class_fields( $format = 'full' ) {
87
 
88
  }
89
 
90
- }
91
- ?>
17
  } else {
18
  $count = $cached;
19
  }
20
+
21
  return $count;
22
 
23
  }
88
 
89
  }
90
 
91
+ }
 
includes/subscription.php CHANGED
@@ -14,6 +14,7 @@ if( is_admin() ) {
14
  if( class_exists( 'WC_Subscriptions' ) ) {
15
  $count = woo_ce_get_subscription_count();
16
  }
 
17
  return $count;
18
 
19
  }
@@ -386,6 +387,7 @@ function woo_ce_get_subscription_statuses() {
386
  'on-hold' => __( 'On-hold', 'woocommerce-subscriptions' ),
387
  'trash' => __( 'Deleted', 'woocommerce-exporter' ),
388
  );
 
389
  return apply_filters( 'woo_ce_subscription_statuses', $subscription_statuses );
390
 
391
  }
@@ -420,7 +422,7 @@ function woo_ce_get_subscription_products() {
420
  foreach( $product_ids->posts as $product_id )
421
  $products[] = $product_id;
422
  }
 
423
  return $products;
424
 
425
- }
426
- ?>
14
  if( class_exists( 'WC_Subscriptions' ) ) {
15
  $count = woo_ce_get_subscription_count();
16
  }
17
+
18
  return $count;
19
 
20
  }
387
  'on-hold' => __( 'On-hold', 'woocommerce-subscriptions' ),
388
  'trash' => __( 'Deleted', 'woocommerce-exporter' ),
389
  );
390
+
391
  return apply_filters( 'woo_ce_subscription_statuses', $subscription_statuses );
392
 
393
  }
422
  foreach( $product_ids->posts as $product_id )
423
  $products[] = $product_id;
424
  }
425
+
426
  return $products;
427
 
428
+ }
 
includes/tag.php CHANGED
@@ -17,6 +17,7 @@ if( is_admin() ) {
17
  } else {
18
  $count = $cached;
19
  }
 
20
  return $count;
21
 
22
  }
@@ -114,6 +115,7 @@ function woo_ce_override_tag_field_labels( $fields = array() ) {
114
  $fields[$key]['label'] = $labels[$field['name']];
115
  }
116
  }
 
117
  return $fields;
118
 
119
  }
@@ -143,6 +145,7 @@ function woo_ce_get_tag_field( $name = null, $format = 'name' ) {
143
  }
144
  }
145
  }
 
146
  return $output;
147
 
148
  }
@@ -167,7 +170,9 @@ function woo_ce_get_product_tags( $args = array() ) {
167
  if( $tags[$i]->count == 0 )
168
  $tags[$i]->disabled = 1;
169
  }
 
170
  return $tags;
 
171
  }
172
 
173
  }
@@ -210,7 +215,7 @@ function woo_ce_export_dataset_override_tag( $output = null, $export_type = null
210
  }
211
  unset( $tags, $tag );
212
  }
 
213
  return $output;
214
 
215
- }
216
- ?>
17
  } else {
18
  $count = $cached;
19
  }
20
+
21
  return $count;
22
 
23
  }
115
  $fields[$key]['label'] = $labels[$field['name']];
116
  }
117
  }
118
+
119
  return $fields;
120
 
121
  }
145
  }
146
  }
147
  }
148
+
149
  return $output;
150
 
151
  }
170
  if( $tags[$i]->count == 0 )
171
  $tags[$i]->disabled = 1;
172
  }
173
+
174
  return $tags;
175
+
176
  }
177
 
178
  }
215
  }
216
  unset( $tags, $tag );
217
  }
218
+
219
  return $output;
220
 
221
+ }
 
includes/user-extend.php CHANGED
@@ -98,5 +98,4 @@ function woo_ce_extend_user_fields( $fields = array() ) {
98
  return $fields;
99
 
100
  }
101
- add_filter( 'woo_ce_user_fields', 'woo_ce_extend_user_fields' );
102
- ?>
98
  return $fields;
99
 
100
  }
101
+ add_filter( 'woo_ce_user_fields', 'woo_ce_extend_user_fields' );
 
includes/user.php CHANGED
@@ -366,6 +366,4 @@ function woo_ce_format_user_role_label( $user_role = '' ) {
366
  }
367
  return $output;
368
 
369
- }
370
-
371
- ?>
366
  }
367
  return $output;
368
 
369
+ }
 
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://www.visser.com.au/donations/
5
  Tags: woocommerce, export, export products, export sales, export orders, export subscriptions, csv, xml, xls, xlsx, excel, export customers, export coupons, export users, export attributes
6
  Requires at least: 2.9.2
7
  Tested up to: 5.2.2
8
- Stable tag: 2.0.3
9
  License: GPLv2 or later
10
 
11
  Export store details out of WooCommerce into simple formatted files (e.g. CSV, XML, Excel 2007, XLS, etc.).
@@ -87,14 +87,6 @@ This advanced export Plugin maintains compatibility with the latest WooCommerce
87
 
88
  (*) Requires the Pro upgrade to enable additional store export functionality.
89
 
90
- = Upgrade to Store Exporter Deluxe =
91
-
92
- > ** Go Pro **
93
- >
94
- > Unlock the business focused e-commerce features such as scheduled exports, additional export fields and filters by upgrading to Store Exporter Deluxe. [You can get Store Exporter Deluxe here!](https://www.visser.com.au/plugins/store-exporter-deluxe/?platform=wc).
95
- >
96
- > Full documentation and usage of Store Exporter Deluxe is available from the [support section for Store Exporter Deluxe](http://www.visser.com.au/documentation/store-exporter-deluxe/).
97
-
98
  = Native export integration with 110+ WooCommerce Plugins =
99
 
100
  Just a few of the features unlocked in the [Pro upgrade of Store Exporter](https://www.visser.com.au/plugins/store-exporter-deluxe/?platform=wc) include:
@@ -164,6 +156,12 @@ If you have any problems, questions or suggestions please create a topic here on
164
 
165
  == Changelog ==
166
 
 
 
 
 
 
 
167
  = 2.0.3 =
168
  * Changed: Compatibility with WooCommerce 3.7 and WordPress 5.2.2
169
 
5
  Tags: woocommerce, export, export products, export sales, export orders, export subscriptions, csv, xml, xls, xlsx, excel, export customers, export coupons, export users, export attributes
6
  Requires at least: 2.9.2
7
  Tested up to: 5.2.2
8
+ Stable tag: 2.1
9
  License: GPLv2 or later
10
 
11
  Export store details out of WooCommerce into simple formatted files (e.g. CSV, XML, Excel 2007, XLS, etc.).
87
 
88
  (*) Requires the Pro upgrade to enable additional store export functionality.
89
 
 
 
 
 
 
 
 
 
90
  = Native export integration with 110+ WooCommerce Plugins =
91
 
92
  Just a few of the features unlocked in the [Pro upgrade of Store Exporter](https://www.visser.com.au/plugins/store-exporter-deluxe/?platform=wc) include:
156
 
157
  == Changelog ==
158
 
159
+ = 2.1 =
160
+ * Fixed: Order exports failing with date filter
161
+ * Added: Scheduled Exports tab
162
+ * Added: Export Templates tab
163
+ * Changed: Removed legacy Scheduled Export fields from Settings screen
164
+
165
  = 2.0.3 =
166
  * Changed: Compatibility with WooCommerce 3.7 and WordPress 5.2.2
167
 
templates/admin/scheduled_exports-recent_scheduled_exports.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <div id="poststuff" class="recent-scheduled-exports">
3
+
4
+ <p class="pagination">
5
+ <span class="displaying-num"><?php printf( __( '%d items', 'woocommerce-exporter' ), $size ); ?></span>
6
+ <span class="pagination-links"><?php echo $pagination_links; ?></span>
7
+ </p>
8
+
9
+ <div id="recent-scheduled-exports" class="postbox">
10
+ <h3 class="hndle"><?php _e( 'Recent Scheduled Exports' ); ?></h3>
11
+ <div class="inside">
12
+
13
+
14
+ <p><?php _e( 'Ready for your first scheduled export.', 'woocommerce-exporter' ); ?> <strong>:)</strong></p>
15
+
16
+ </div>
17
+ <!-- .inside -->
18
+ <br class="clear" />
19
+ </div>
20
+ <!-- #recent-scheduled-exports -->
21
+
22
+ </div>
23
+ <!-- #poststuff -->
templates/admin/tabs-export_template.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h3>
2
+ <?php _e( 'Export Templates', 'woocommerce-exporter' ); ?>
3
+ <span class="description"> - <?php printf( __( 'available in %s', 'woo_ce' ), $woo_cd_link ); ?></span>
4
+ </h3>
5
+
6
+ <table class="widefat page fixed striped export-templates">
7
+ <thead>
8
+
9
+ <tr>
10
+ <th class="manage-column"><?php _e( 'Name', 'woocommerce-exporter' ); ?></th>
11
+ <th class="manage-column"><?php _e( 'Status', 'woocommerce-exporter' ); ?></th>
12
+ <th class="manage-column"><?php _e( 'Excerpt', 'woocommerce-exporter' ); ?></th>
13
+ </tr>
14
+
15
+ </thead>
16
+ <tbody id="the-list">
17
+
18
+ <tr>
19
+ <td class="colspanchange" colspan="3"><?php _e( 'No export templates found.', 'woocommerce-exporter' ); ?></td>
20
+ </tr>
21
+ </tbody>
22
+
23
+ </table>
24
+ <!-- .export-templates -->
25
+
26
+ <?php if( !empty( $export_templates ) ) { ?>
27
+ <p style="text-align:right;"><?php printf( __( '%d items', 'woocommerce-exporter' ), count( $export_templates ) ); ?></p>
28
+ <?php } ?>
templates/admin/tabs-overview.php CHANGED
@@ -18,7 +18,6 @@
18
  </li>
19
  <li>
20
  <a href="<?php echo esc_url( add_query_arg( 'tab', 'export' ) ); ?>#export-order"><?php _e( 'Export Orders', 'woocommerce-exporter' ); ?></a>
21
- <span class="description">(<?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?>)</span>
22
  </li>
23
  <li>
24
  <a href="<?php echo esc_url( add_query_arg( 'tab', 'export' ) ); ?>#export-customer"><?php _e( 'Export Customers', 'woocommerce-exporter' ); ?></a>
@@ -66,13 +65,13 @@
66
  </ul>
67
 
68
  <h3>
69
- <div class="dashicons dashicons-calendar"></div>&nbsp;<?php _e( 'Scheduled Exports', 'woocommerce-exporter' ); ?>
70
  <span class="description">(<?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?>)</span>
71
  </h3>
72
  <p><?php _e( 'Automatically generate exports and apply filters to export just what you need.', 'woocommerce-exporter' ); ?></p>
73
 
74
  <h3>
75
- <div class="dashicons dashicons-list-view"></div>&nbsp;<?php _e( 'Export Templates', 'woocommerce-exporter' ); ?>
76
  <span class="description">(<?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?>)</span>
77
  </h3>
78
  <p><?php _e( 'Create lists of pre-defined fields which can be applied to exports.', 'woocommerce-exporter' ); ?></p>
@@ -127,7 +126,7 @@
127
  <!-- <span><a href="#"><attr title="<?php _e( 'Dismiss this message', 'woocommerce-exporter' ); ?>"><?php _e( 'Dismiss', 'woocommerce-exporter' ); ?></attr></a></span> -->
128
  <?php _e( 'Upgrade to Pro', 'woocommerce-exporter' ); ?>
129
  </h3>
130
- <p class="clear"><?php _e( 'Upgrade to Store Exporter Deluxe to unlock business focused e-commerce features within Store Exporter, including:', 'woocommerce-exporter' ); ?></p>
131
  <ul class="ul-disc">
132
  <li><?php _e( 'Native export support for 110+ Plugins', 'woocommerce-exporter' ); ?></li>
133
  <li><?php _e( 'Select export date ranges', 'woocommerce-exporter' ); ?></li>
18
  </li>
19
  <li>
20
  <a href="<?php echo esc_url( add_query_arg( 'tab', 'export' ) ); ?>#export-order"><?php _e( 'Export Orders', 'woocommerce-exporter' ); ?></a>
 
21
  </li>
22
  <li>
23
  <a href="<?php echo esc_url( add_query_arg( 'tab', 'export' ) ); ?>#export-customer"><?php _e( 'Export Customers', 'woocommerce-exporter' ); ?></a>
65
  </ul>
66
 
67
  <h3>
68
+ <div class="dashicons dashicons-calendar"></div>&nbsp;<a href="<?php echo esc_url( add_query_arg( 'tab', 'scheduled_export' ) ); ?>"><?php _e( 'Scheduled Exports', 'woocommerce-exporter' ); ?></a>
69
  <span class="description">(<?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?>)</span>
70
  </h3>
71
  <p><?php _e( 'Automatically generate exports and apply filters to export just what you need.', 'woocommerce-exporter' ); ?></p>
72
 
73
  <h3>
74
+ <div class="dashicons dashicons-list-view"></div>&nbsp;<a href="<?php echo esc_url( add_query_arg( 'tab', 'export_template' ) ); ?>"><?php _e( 'Export Templates', 'woocommerce-exporter' ); ?></a>
75
  <span class="description">(<?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?>)</span>
76
  </h3>
77
  <p><?php _e( 'Create lists of pre-defined fields which can be applied to exports.', 'woocommerce-exporter' ); ?></p>
126
  <!-- <span><a href="#"><attr title="<?php _e( 'Dismiss this message', 'woocommerce-exporter' ); ?>"><?php _e( 'Dismiss', 'woocommerce-exporter' ); ?></attr></a></span> -->
127
  <?php _e( 'Upgrade to Pro', 'woocommerce-exporter' ); ?>
128
  </h3>
129
+ <p class="clear"><strong><?php _e( 'Upgrade to Store Exporter Deluxe to unlock business focused e-commerce features, including:', 'woocommerce-exporter' ); ?></strong></p>
130
  <ul class="ul-disc">
131
  <li><?php _e( 'Native export support for 110+ Plugins', 'woocommerce-exporter' ); ?></li>
132
  <li><?php _e( 'Select export date ranges', 'woocommerce-exporter' ); ?></li>
templates/admin/tabs-scheduled_export.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <ul class="subsubsub">
2
+ <li><a href="#scheduled-exports"><?php _e( 'Scheduled Exports', 'woocommerce-exporter' ); ?></a> |</li>
3
+ <li><a href="#recent-scheduled-exports"><?php _e( 'Recent Scheduled Exports', 'woocommerce-exporter' ); ?></a></li>
4
+ <?php do_action( 'woo_ce_scheduled_export_settings_top' ); ?>
5
+ </ul>
6
+ <!-- .subsubsub -->
7
+ <br class="clear" />
8
+
9
+ <?php do_action( 'woo_ce_before_scheduled_exports' ); ?>
10
+
11
+ <h3 id="scheduled-exports">
12
+ <?php _e( 'Scheduled Exports', 'woocommerce-exporter' ); ?>
13
+ <span class="description"> - <?php printf( __( 'available in %s', 'woo_ce' ), $woo_cd_link ); ?></span>
14
+ </h3>
15
+
16
+ <table class="widefat page fixed striped scheduled-exports">
17
+ <thead>
18
+
19
+ <tr>
20
+ <th class="manage-column"><?php _e( 'Name', 'woocommerce-exporter' ); ?></th>
21
+ <th class="manage-column"><?php _e( 'Export Type', 'woocommerce-exporter' ); ?></th>
22
+ <th class="manage-column"><?php _e( 'Export Format', 'woocommerce-exporter' ); ?></th>
23
+ <th class="manage-column"><?php _e( 'Export Method', 'woocommerce-exporter' ); ?></th>
24
+ <th class="manage-column"><?php _e( 'Status', 'woocommerce-exporter' ); ?></th>
25
+ <th class="manage-column"><?php _e( 'Frequency', 'woocommerce-exporter' ); ?></th>
26
+ <th class="manage-column"><?php _e( 'Next run', 'woocommerce-exporter' ); ?></th>
27
+ <th class="manage-column"><?php _e( 'Action', 'woocommerce-exporter' ); ?></th>
28
+ </tr>
29
+
30
+ </thead>
31
+ <tbody id="the-list">
32
+ <tr>
33
+ <td class="colspanchange" colspan="8"><?php _e( 'No scheduled exports found.', 'woocommerce-exporter' ); ?></td>
34
+ </tr>
35
+
36
+ </tbody>
37
+
38
+ </table>
39
+ <!-- .scheduled-exports -->
40
+
41
+ <?php if( !empty( $scheduled_exports ) ) { ?>
42
+ <p style="text-align:right;"><?php printf( __( '%d items', 'woocommerce-exporter' ), count( $scheduled_exports ) ); ?></p>
43
+ <?php } ?>
44
+
45
+ <hr />
46
+
47
+ <?php do_action( 'woo_ce_after_scheduled_exports' ); ?>
templates/admin/tabs.php CHANGED
@@ -3,6 +3,8 @@
3
  <h2 class="nav-tab-wrapper">
4
  <a data-tab-id="overview" class="nav-tab<?php woo_ce_admin_active_tab( 'overview' ); ?>" href="<?php echo esc_url( add_query_arg( array( 'page' => 'woo_ce', 'tab' => 'overview' ), 'admin.php' ) ); ?>"><?php _e( 'Overview', 'woocommerce-exporter' ); ?></a>
5
  <a data-tab-id="export" class="nav-tab<?php woo_ce_admin_active_tab( 'export' ); ?>" href="<?php echo esc_url( add_query_arg( array( 'page' => 'woo_ce', 'tab' => 'export' ), 'admin.php' ) ); ?>"><?php _e( 'Quick Export', 'woocommerce-exporter' ); ?></a>
 
 
6
  <?php if( !woo_ce_get_option( 'hide_archives_tab', 0 ) ) { ?>
7
  <a data-tab-id="archive" class="nav-tab<?php woo_ce_admin_active_tab( 'archive' ); ?>" href="<?php echo esc_url( add_query_arg( array( 'page' => 'woo_ce', 'tab' => 'archive' ), 'admin.php' ) ); ?>"><?php _e( 'Archives', 'woocommerce-exporter' ); ?></a>
8
  <?php } ?>
3
  <h2 class="nav-tab-wrapper">
4
  <a data-tab-id="overview" class="nav-tab<?php woo_ce_admin_active_tab( 'overview' ); ?>" href="<?php echo esc_url( add_query_arg( array( 'page' => 'woo_ce', 'tab' => 'overview' ), 'admin.php' ) ); ?>"><?php _e( 'Overview', 'woocommerce-exporter' ); ?></a>
5
  <a data-tab-id="export" class="nav-tab<?php woo_ce_admin_active_tab( 'export' ); ?>" href="<?php echo esc_url( add_query_arg( array( 'page' => 'woo_ce', 'tab' => 'export' ), 'admin.php' ) ); ?>"><?php _e( 'Quick Export', 'woocommerce-exporter' ); ?></a>
6
+ <a data-tab-id="scheduled-exports" class="nav-tab<?php woo_ce_admin_active_tab( 'scheduled_export' ); ?>" href="<?php echo esc_url( add_query_arg( array( 'page' => 'woo_ce', 'tab' => 'scheduled_export' ), 'admin.php' ) ); ?>"><?php _e( 'Scheduled Exports', 'woocommerce-exporter' ); ?></a>
7
+ <a data-tab-id="export-templates" class="nav-tab<?php woo_ce_admin_active_tab( 'export_template' ); ?>" href="<?php echo esc_url( add_query_arg( array( 'page' => 'woo_ce', 'tab' => 'export_template' ), 'admin.php' ) ); ?>"><?php _e( 'Export Templates', 'woocommerce-exporter' ); ?></a>
8
  <?php if( !woo_ce_get_option( 'hide_archives_tab', 0 ) ) { ?>
9
  <a data-tab-id="archive" class="nav-tab<?php woo_ce_admin_active_tab( 'archive' ); ?>" href="<?php echo esc_url( add_query_arg( array( 'page' => 'woo_ce', 'tab' => 'archive' ), 'admin.php' ) ); ?>"><?php _e( 'Archives', 'woocommerce-exporter' ); ?></a>
10
  <?php } ?>