WooCommerce – Store Exporter - Version 1.9.5

Version Description

  • Added: Notice when number of export fields is over the PHP FORM limit
  • Added: Notice to Overview tab
  • Fixed: Added suggestions to the Custom fields saved notice
  • Changed: Increased padding around export fields on Quick Export screen
  • Changed: Moved Quick Export types into separate template files
Download this release

Release Info

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

Code changes from version 1.9.4 to 1.9.5

exporter.php CHANGED
@@ -2,8 +2,8 @@
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, XML, Excel formats including XLS and XLSX, etc.)
6
- Version: 1.9.4
7
Author: Visser Labs
8
Author URI: http://www.visser.com.au/about/
9
License: GPL2
@@ -12,7 +12,7 @@ Text Domain: woocommerce-exporter
12
Domain Path: /languages/
13
14
WC requires at least: 2.3
15
- WC tested up to: 3.1
16
*/
17
18
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -56,6 +56,8 @@ if( is_admin() ) {
56
57
$action = ( function_exists( 'woo_get_action' ) ? woo_get_action() : false );
58
59
// Now is the time to de-activate Store Exporter if Store Exporter Deluxe is activated
60
if( defined( 'WOO_CD_PREFIX' ) ) {
61
include_once( WOO_CE_PATH . 'includes/install.php' );
@@ -66,8 +68,6 @@ if( is_admin() ) {
66
// An effort to reduce the memory load at export time
67
if( $action <> 'export' ) {
68
69
- $troubleshooting_url = 'https://www.visser.com.au/documentation/store-exporter-deluxe/troubleshooting/';
70
-
71
// Check the User has the activate_plugins capability
72
$user_capability = 'activate_plugins';
73
if( current_user_can( $user_capability ) ) {
@@ -114,7 +114,7 @@ if( is_admin() ) {
114
if( $page != strtolower( WOO_CE_PREFIX ) )
115
return;
116
117
- // Add memory usage to screen footer
118
add_filter( 'admin_footer_text', 'woo_ce_admin_footer_text' );
119
120
}
@@ -150,6 +150,7 @@ if( is_admin() ) {
150
$timeout = woo_ce_get_option( 'timeout', 0 );
151
$safe_mode = ( function_exists( 'safe_mode' ) ? ini_get( 'safe_mode' ) : false );
152
if( !$safe_mode ) {
153
if( function_exists( 'set_time_limit' ) )
154
@set_time_limit( $timeout );
155
if( function_exists( 'ini_set' ) )
@@ -167,21 +168,24 @@ if( is_admin() ) {
167
$export->encoding = woo_ce_get_option( 'encoding', get_option( 'blog_charset', 'UTF-8' ) );
168
// Reset the Encoding if corrupted
169
if( $export->encoding == '' || $export->encoding == false || $export->encoding == 'System default' ) {
170
- woo_ce_error_log( sprintf( 'Warning: %s', __( 'Encoding export option was corrupted, defaulted to UTF-8', 'woocommerce-exporter' ) ) );
171
$export->encoding = 'UTF-8';
172
woo_ce_update_option( 'encoding', 'UTF-8' );
173
}
174
$export->delimiter = woo_ce_get_option( 'delimiter', ',' );
175
// Reset the Delimiter if corrupted
176
if( $export->delimiter == '' || $export->delimiter == false ) {
177
- woo_ce_error_log( sprintf( 'Warning: %s', __( 'Delimiter export option was corrupted, defaulted to ,', 'woocommerce-exporter' ) ) );
178
$export->delimiter = ',';
179
woo_ce_update_option( 'delimiter', ',' );
180
}
181
$export->category_separator = woo_ce_get_option( 'category_separator', '|' );
182
// Reset the Category Separator if corrupted
183
if( $export->category_separator == '' || $export->category_separator == false ) {
184
- woo_ce_error_log( sprintf( 'Warning: %s', __( 'Category Separator export option was corrupted, defaulted to |', 'woocommerce-exporter' ) ) );
185
$export->category_separator = '|';
186
woo_ce_update_option( 'category_separator', '|' );
187
}
@@ -189,14 +193,16 @@ if( is_admin() ) {
189
$export->escape_formatting = woo_ce_get_option( 'escape_formatting', 'all' );
190
// Reset the Escape Formatting if corrupted
191
if( $export->escape_formatting == '' || $export->escape_formatting == false ) {
192
- woo_ce_error_log( sprintf( 'Warning: %s', __( 'Escape Formatting export option was corrupted, defaulted to all.', 'woocommerce-exporter' ) ) );
193
$export->escape_formatting = 'all';
194
woo_ce_update_option( 'escape_formatting', 'all' );
195
}
196
$date_format = woo_ce_get_option( 'date_format', 'd/m/Y' );
197
// Reset the Date Format if corrupted
198
if( $date_format == '1' || $date_format == '' || $date_format == false ) {
199
- woo_ce_error_log( sprintf( 'Warning: %s', __( 'Date Format export option was corrupted, defaulted to d/m/Y', 'woocommerce-exporter' ) ) );
200
$date_format = 'd/m/Y';
201
woo_ce_update_option( 'date_format', $date_format );
202
}
@@ -222,8 +228,8 @@ if( is_admin() ) {
222
$export->export_format = 'csv';
223
224
// Product sorting
225
- $export->product_categories = false;
226
- $export->product_tags = false;
227
$export->product_status = false;
228
$export->product_type = false;
229
$export->product_orderby = false;
@@ -256,8 +262,8 @@ if( is_admin() ) {
256
257
case 'product':
258
// Set up dataset specific options
259
- $export->product_categories = ( isset( $_POST['product_filter_category'] ) ? woo_ce_format_product_filters( array_map( 'absint', $_POST['product_filter_category'] ) ) : false );
260
- $export->product_tags = ( isset( $_POST['product_filter_tag'] ) ? woo_ce_format_product_filters( array_map( 'absint', $_POST['product_filter_tag'] ) ) : false );
261
$export->product_status = ( isset( $_POST['product_filter_status'] ) ? woo_ce_format_product_filters( array_map( 'sanitize_text_field', $_POST['product_filter_status'] ) ) : false );
262
$export->product_type = ( isset( $_POST['product_filter_type'] ) ? woo_ce_format_product_filters( array_map( 'sanitize_text_field', $_POST['product_filter_type'] ) ) : false );
263
$export->product_orderby = ( isset( $_POST['product_orderby'] ) ? sanitize_text_field( $_POST['product_orderby'] ) : false );
@@ -334,8 +340,8 @@ if( is_admin() ) {
334
'offset' => $export->offset,
335
'encoding' => $export->encoding,
336
'date_format' => $date_format,
337
- 'product_categories' => $export->product_categories,
338
- 'product_tags' => $export->product_tags,
339
'product_status' => $export->product_status,
340
'product_type' => $export->product_type,
341
'product_orderby' => $export->product_orderby,
@@ -348,9 +354,15 @@ if( is_admin() ) {
348
'user_order' => $export->user_order
349
);
350
if( empty( $export->fields ) ) {
351
- $message = __( 'No export fields were selected, please try again with at least a single export field.', 'woocommerce-exporter' );
352
- woo_ce_admin_notice( $message, 'error' );
353
- return;
354
}
355
woo_ce_save_fields( $export->type, $export->fields, $export->fields_order );
356
@@ -534,7 +546,7 @@ if( is_admin() ) {
534
case 'update':
535
woo_ce_admin_custom_fields_save();
536
537
- $message = __( 'Custom Fields saved. You can now select those additional fields from the Export Fields list.', 'woocommerce-exporter' );
538
woo_ce_admin_notice_html( $message );
539
woo_ce_manage_form();
540
break;
@@ -559,7 +571,7 @@ if( is_admin() ) {
559
// Check that WC() is available
560
if( !function_exists( 'WC' ) ) {
561
$message = __( 'We couldn\'t load the WooCommerce resource WC(), check that WooCommerce is installed and active. If this persists get in touch with us.', 'woocommerce-exporter' );
562
- woo_cd_admin_notice_html( $message, 'error' );
563
return;
564
}
565
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: 1.9.5
7
Author: Visser Labs
8
Author URI: http://www.visser.com.au/about/
9
License: GPL2
12
Domain Path: /languages/
13
14
WC requires at least: 2.3
15
+ WC tested up to: 3.3
16
*/
17
18
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
56
57
$action = ( function_exists( 'woo_get_action' ) ? woo_get_action() : false );
58
59
+ $troubleshooting_url = 'https://www.visser.com.au/documentation/store-exporter-deluxe/troubleshooting/';
60
+
61
// Now is the time to de-activate Store Exporter if Store Exporter Deluxe is activated
62
if( defined( 'WOO_CD_PREFIX' ) ) {
63
include_once( WOO_CE_PATH . 'includes/install.php' );
68
// An effort to reduce the memory load at export time
69
if( $action <> 'export' ) {
70
71
// Check the User has the activate_plugins capability
72
$user_capability = 'activate_plugins';
73
if( current_user_can( $user_capability ) ) {
114
if( $page != strtolower( WOO_CE_PREFIX ) )
115
return;
116
117
+ // Add memory usage to the screen footer of the WooCommerce > Store Export screen
118
add_filter( 'admin_footer_text', 'woo_ce_admin_footer_text' );
119
120
}
150
$timeout = woo_ce_get_option( 'timeout', 0 );
151
$safe_mode = ( function_exists( 'safe_mode' ) ? ini_get( 'safe_mode' ) : false );
152
if( !$safe_mode ) {
153
+ // Double up, why not.
154
if( function_exists( 'set_time_limit' ) )
155
@set_time_limit( $timeout );
156
if( function_exists( 'ini_set' ) )
168
$export->encoding = woo_ce_get_option( 'encoding', get_option( 'blog_charset', 'UTF-8' ) );
169
// Reset the Encoding if corrupted
170
if( $export->encoding == '' || $export->encoding == false || $export->encoding == 'System default' ) {
171
+ $message = __( 'Encoding export option was corrupted, defaulted to UTF-8', 'woocommerce-exporter' );
172
+ woo_ce_error_log( sprintf( 'Warning: %s', $message ) );
173
$export->encoding = 'UTF-8';
174
woo_ce_update_option( 'encoding', 'UTF-8' );
175
}
176
$export->delimiter = woo_ce_get_option( 'delimiter', ',' );
177
// Reset the Delimiter if corrupted
178
if( $export->delimiter == '' || $export->delimiter == false ) {
179
+ $message = __( 'Delimiter export option was corrupted, defaulted to ,', 'woocommerce-exporter' );
180
+ woo_ce_error_log( sprintf( 'Warning: %s', $message ) );
181
$export->delimiter = ',';
182
woo_ce_update_option( 'delimiter', ',' );
183
}
184
$export->category_separator = woo_ce_get_option( 'category_separator', '|' );
185
// Reset the Category Separator if corrupted
186
if( $export->category_separator == '' || $export->category_separator == false ) {
187
+ $message = __( 'Category Separator export option was corrupted, defaulted to |', 'woocommerce-exporter' );
188
+ woo_ce_error_log( sprintf( 'Warning: %s', $message ) );
189
$export->category_separator = '|';
190
woo_ce_update_option( 'category_separator', '|' );
191
}
193
$export->escape_formatting = woo_ce_get_option( 'escape_formatting', 'all' );
194
// Reset the Escape Formatting if corrupted
195
if( $export->escape_formatting == '' || $export->escape_formatting == false ) {
196
+ $message = __( 'Escape Formatting export option was corrupted, defaulted to all.', 'woocommerce-exporter' );
197
+ woo_ce_error_log( sprintf( 'Warning: %s', $message ) );
198
$export->escape_formatting = 'all';
199
woo_ce_update_option( 'escape_formatting', 'all' );
200
}
201
$date_format = woo_ce_get_option( 'date_format', 'd/m/Y' );
202
// Reset the Date Format if corrupted
203
if( $date_format == '1' || $date_format == '' || $date_format == false ) {
204
+ $message = __( 'Date Format export option was corrupted, defaulted to d/m/Y', 'woocommerce-exporter' );
205
+ woo_ce_error_log( sprintf( 'Warning: %s', $message ) );
206
$date_format = 'd/m/Y';
207
woo_ce_update_option( 'date_format', $date_format );
208
}
228
$export->export_format = 'csv';
229
230
// Product sorting
231
+ $export->product_category = false;
232
+ $export->product_tag = false;
233
$export->product_status = false;
234
$export->product_type = false;
235
$export->product_orderby = false;
262
263
case 'product':
264
// Set up dataset specific options
265
+ $export->product_category = ( isset( $_POST['product_filter_category'] ) ? woo_ce_format_product_filters( array_map( 'absint', $_POST['product_filter_category'] ) ) : false );
266
+ $export->product_tag = ( isset( $_POST['product_filter_tag'] ) ? woo_ce_format_product_filters( array_map( 'absint', $_POST['product_filter_tag'] ) ) : false );
267
$export->product_status = ( isset( $_POST['product_filter_status'] ) ? woo_ce_format_product_filters( array_map( 'sanitize_text_field', $_POST['product_filter_status'] ) ) : false );
268
$export->product_type = ( isset( $_POST['product_filter_type'] ) ? woo_ce_format_product_filters( array_map( 'sanitize_text_field', $_POST['product_filter_type'] ) ) : false );
269
$export->product_orderby = ( isset( $_POST['product_orderby'] ) ? sanitize_text_field( $_POST['product_orderby'] ) : false );
340
'offset' => $export->offset,
341
'encoding' => $export->encoding,
342
'date_format' => $date_format,
343
+ 'product_category' => $export->product_category,
344
+ 'product_tag' => $export->product_tag,
345
'product_status' => $export->product_status,
346
'product_type' => $export->product_type,
347
'product_orderby' => $export->product_orderby,
354
'user_order' => $export->user_order
355
);
356
if( empty( $export->fields ) ) {
357
+ if( function_exists( sprintf( 'woo_ce_get_%s_fields', $export->type ) ) ) {
358
+ $export->fields = call_user_func_array( 'woo_ce_get_' . $export->type . '_fields', array( 'summary' ) );
359
+ $message = __( 'No export fields were selected, defaulted to include all fields for this export type.', 'woocommerce-exporter' );
360
+ woo_ce_admin_notice( $message, 'notice' );
361
+ } else {
362
+ $message = __( 'No export fields were selected, please try again with at least a single export field.', 'woocommerce-exporter' );
363
+ woo_ce_admin_notice( $message, 'error' );
364
+ return;
365
+ }
366
}
367
woo_ce_save_fields( $export->type, $export->fields, $export->fields_order );
368
546
case 'update':
547
woo_ce_admin_custom_fields_save();
548
549
+ $message = __( 'Custom field changes saved. You can now select those additional fields from the Export Fields list.', 'woocommerce-exporter' );
550
woo_ce_admin_notice_html( $message );
551
woo_ce_manage_form();
552
break;
571
// Check that WC() is available
572
if( !function_exists( 'WC' ) ) {
573
$message = __( 'We couldn\'t load the WooCommerce resource WC(), check that WooCommerce is installed and active. If this persists get in touch with us.', 'woocommerce-exporter' );
574
+ woo_ce_admin_notice_html( $message, 'error' );
575
return;
576
}
577
includes/admin.php CHANGED
@@ -89,31 +89,30 @@ function woo_ce_template_footer() { ?>
89
90
}
91
92
- function woo_ce_export_options_export_format() {
93
94
- $woo_cd_url = 'https://www.visser.com.au/plugins/store-exporter-deluxe/?platform=wc';
95
- $woo_cd_link = sprintf( '<a href="%s" target="_blank">' . __( 'Store Exporter Deluxe', 'woocommerce-exporter' ) . '</a>', $woo_cd_url );
96
97
- ob_start(); ?>
98
- <tr>
99
- <th>
100
- <label><?php _e( 'Export format', 'woocommerce-exporter' ); ?></label>
101
- </th>
102
- <td>
103
- <label><input type="radio" name="export_format" value="csv"<?php checked( 'csv', 'csv' ); ?> /> <?php _e( 'CSV', 'woocommerce-exporter' ); ?> <span class="description"><?php _e( '(Comma Separated Values)', 'woocommerce-exporter' ); ?></span></label><br />
104
- <label><input type="radio" name="export_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><br />
105
- <label><input type="radio" name="export_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><br />
106
- <label><input type="radio" name="export_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><br />
107
- <div class="export-options product-options">
108
- <label><input type="radio" name="export_format" value="rss" disabled="disabled" /> <?php _e( 'RSS', 'woocommerce-exporter' ); ?> <span class="description"><?php printf( __( '(<attr title="%s">XML</attr> feed in RSS 2.0 format)', 'woocommerce-exporter' ), __( 'EXtensible Markup Language', 'woocommerce-exporter' ) ); ?> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label>
109
- </div>
110
- <p class="description"><?php _e( 'Adjust the export format to generate different export file formats.', 'woocommerce-exporter' ); ?></p>
111
- </td>
112
- </tr>
113
- <?php
114
- ob_end_flush();
115
116
}
117
118
// Add Export and Docs links to the Plugins screen
119
function woo_ce_add_settings_link( $links, $file ) {
@@ -168,7 +167,7 @@ function woo_ce_admin_menu() {
168
169
$page = add_submenu_page( 'woocommerce', __( 'Store Exporter', 'woocommerce-exporter' ), __( 'Store Export', 'woocommerce-exporter' ), 'view_woocommerce_reports', 'woo_ce', 'woo_ce_html_page' );
170
add_action( 'admin_print_styles-' . $page, 'woo_ce_enqueue_scripts' );
171
- add_action( 'current_screen', 'woo_ce_add_help_tab' );
172
173
}
174
add_action( 'admin_menu', 'woo_ce_admin_menu', 11 );
@@ -187,6 +186,8 @@ function woo_ce_enqueue_scripts() {
187
}
188
189
// Date Picker Addon
190
wp_enqueue_script( 'jquery-ui-datepicker' );
191
wp_enqueue_style( 'jquery-ui-datepicker', plugins_url( '/templates/admin/jquery-ui-datepicker.css', WOO_CE_RELPATH ) );
192
@@ -211,19 +212,28 @@ function woo_ce_enqueue_scripts() {
211
212
}
213
214
- function woo_ce_add_help_tab() {
215
216
$screen = get_current_screen();
217
- if( $screen->id <> 'woocommerce_page_woo_ce' )
218
- return;
219
220
- $screen->add_help_tab( array(
221
- 'id' => 'woo_ce',
222
- 'title' => __( 'Store Exporter', 'woocommerce-exporter' ),
223
- 'content' =>
224
- '<p>' . __( 'Thank you for using Store Exporter :) Should you need help using this Plugin please read the documentation, if an issue persists get in touch with us on the WordPress.org Support tab for this Plugin.', 'woocommerce-exporter' ) . '</p>' .
225
- '<p><a href="' . 'http://www.visser.com.au/documentation/store-exporter/usage/' . '" target="_blank" class="button button-primary">' . __( 'Documentation', 'woocommerce-exporter' ) . '</a> <a href="' . 'http://wordpress.org/support/plugin/woocommerce-exporter' . '" target="_blank" class="button">' . __( 'Forum Support', 'woocommerce-exporter' ) . '</a></p>'
226
- ) );
227
228
}
229
@@ -278,11 +288,29 @@ function woo_ce_tab_template( $tab = '' ) {
278
switch( $tab ) {
279
280
case 'overview':
281
$skip_overview = woo_ce_get_option( 'skip_overview', false );
282
break;
283
284
case 'export':
285
- $export_type = sanitize_text_field( ( isset( $_POST['dataset'] ) ? $_POST['dataset'] : woo_ce_get_option( 'last_export', 'product' ) ) );
286
$export_types = array_keys( woo_ce_get_export_types() );
287
288
// Check if the default export type exists
@@ -305,7 +333,12 @@ function woo_ce_tab_template( $tab = '' ) {
305
$shipping_class = '999';
306
$ticket = '999';
307
308
- add_action( 'woo_ce_export_options', 'woo_ce_export_options_export_format' );
309
if( $product_fields = woo_ce_get_product_fields() ) {
310
foreach( $product_fields as $key => $product_field )
311
$product_fields[$key]['disabled'] = ( isset( $product_field['disabled'] ) ? $product_field['disabled'] : 0 );
@@ -322,21 +355,29 @@ function woo_ce_tab_template( $tab = '' ) {
322
add_action( 'woo_ce_export_options', 'woo_ce_export_options_gallery_format' );
323
add_action( 'woo_ce_export_after_form', 'woo_ce_products_custom_fields' );
324
}
325
if( $category_fields = woo_ce_get_category_fields() ) {
326
foreach( $category_fields as $key => $category_field )
327
$category_fields[$key]['disabled'] = ( isset( $category_field['disabled'] ) ? $category_field['disabled'] : 0 );
328
add_action( 'woo_ce_export_category_options_after_table', 'woo_ce_category_sorting' );
329
}
330
if( $tag_fields = woo_ce_get_tag_fields() ) {
331
foreach( $tag_fields as $key => $tag_field )
332
$tag_fields[$key]['disabled'] = ( isset( $tag_field['disabled'] ) ? $tag_field['disabled'] : 0 );
333
add_action( 'woo_ce_export_tag_options_after_table', 'woo_ce_tag_sorting' );
334
}
335
if( $brand_fields = woo_ce_get_brand_fields() ) {
336
foreach( $brand_fields as $key => $brand_field )
337
$brand_fields[$key]['disabled'] = ( isset( $brand_field['disabled'] ) ? $brand_field['disabled'] : 0 );
338
add_action( 'woo_ce_export_brand_options_before_table', 'woo_ce_brand_sorting' );
339
}
340
if( $order_fields = woo_ce_get_order_fields() ) {
341
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_date' );
342
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_status' );
@@ -348,7 +389,8 @@ function woo_ce_tab_template( $tab = '' ) {
348
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_product' );
349
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_product_category' );
350
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_product_tag' );
351
- add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_product_brand' );
352
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_order_id' );
353
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_payment_gateway' );
354
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_shipping_method' );
@@ -358,34 +400,61 @@ function woo_ce_tab_template( $tab = '' ) {
358
add_action( 'woo_ce_export_options', 'woo_ce_orders_items_types' );
359
add_action( 'woo_ce_export_after_form', 'woo_ce_orders_custom_fields' );
360
}
361
if( $customer_fields = woo_ce_get_customer_fields() ) {
362
add_action( 'woo_ce_export_customer_options_before_table', 'woo_ce_customers_filter_by_status' );
363
add_action( 'woo_ce_export_customer_options_before_table', 'woo_ce_customers_filter_by_user_role' );
364
add_action( 'woo_ce_export_after_form', 'woo_ce_customers_custom_fields' );
365
}
366
if( $user_fields = woo_ce_get_user_fields() ) {
367
foreach( $user_fields as $key => $user_field )
368
$user_fields[$key]['disabled'] = ( isset( $user_field['disabled'] ) ? $user_field['disabled'] : 0 );
369
add_action( 'woo_ce_export_user_options_after_table', 'woo_ce_user_sorting' );
370
add_action( 'woo_ce_export_after_form', 'woo_ce_users_custom_fields' );
371
}
372
if( $coupon_fields = woo_ce_get_coupon_fields() ) {
373
add_action( 'woo_ce_export_coupon_options_before_table', 'woo_ce_coupon_sorting' );
374
}
375
if( $subscription_fields = woo_ce_get_subscription_fields() ) {
376
add_action( 'woo_ce_export_subscription_options_before_table', 'woo_ce_subscriptions_filter_by_subscription_status' );
377
add_action( 'woo_ce_export_subscription_options_before_table', 'woo_ce_subscriptions_filter_by_subscription_product' );
378
}
379
$product_vendor_fields = woo_ce_get_product_vendor_fields();
380
if( $commission_fields = woo_ce_get_commission_fields() ) {
381
add_action( 'woo_ce_export_commission_options_before_table', 'woo_ce_commissions_filter_by_date' );
382
add_action( 'woo_ce_export_commission_options_before_table', 'woo_ce_commissions_filter_by_product_vendor' );
383
add_action( 'woo_ce_export_commission_options_before_table', 'woo_ce_commissions_filter_by_commission_status' );
384
add_action( 'woo_ce_export_commission_options_before_table', 'woo_ce_commission_sorting' );
385
}
386
if( $shipping_class_fields = woo_ce_get_shipping_class_fields() ) {
387
add_action( 'woo_ce_export_shipping_class_options_after_table', 'woo_ce_shipping_class_sorting' );
388
}
389
$attribute_fields = false;
390
391
// Export options
@@ -486,6 +555,388 @@ function woo_ce_tab_template( $tab = '' ) {
486
487
}
488
489
// Display the memory usage in the screen footer
490
function woo_ce_admin_footer_text( $footer_text = '' ) {
491
@@ -494,7 +945,10 @@ function woo_ce_admin_footer_text( $footer_text = '' ) {
494
'woocommerce_page_woo_ce'
495
);
496
// Check to make sure we're on the Export screen
497
- if ( isset( $current_screen->id ) && apply_filters( 'woo_ce_display_admin_footer_text', in_array( $current_screen->id, $pages ) ) ) {
498
$memory_usage = woo_ce_current_memory_usage( false );
499
$memory_limit = absint( ini_get( 'memory_limit' ) );
500
$memory_percent = absint( $memory_usage / $memory_limit * 100 );
@@ -504,6 +958,7 @@ function woo_ce_admin_footer_text( $footer_text = '' ) {
504
if( $memory_percent > 90 )
505
$memory_color = 'font-weight:bold; color:red;';
506
$footer_text .= ' | ' . sprintf( __( 'Memory: %s of %s MB (%s)', 'woocommerce-exporter' ), $memory_usage, $memory_limit, sprintf( '<span style="%s">%s</span>', $memory_color, $memory_percent . '%' ) );
507
}
508
return $footer_text;
509
89
90
}
91
92
+ function woo_ce_quick_export_in_process() {
93
94
+ $notice_timeout = apply_filters( 'woo_ce_quick_export_in_process_notice_timeout', 10 );
95
+ $message = sprintf( __( 'Your Quick Export is now running and a export download will be delivered in a moment. This notice will hide automatically in %d seconds.', 'woocommerce-exporter' ), $notice_timeout );
96
97
+ // Allow Plugin/Theme authors to adjust this message
98
+ $message = apply_filters( 'woo_ce_quick_export_in_process_message', $message );
99
+
100
+ echo '<div id="messages-quick_export">';
101
+
102
+ woo_ce_admin_notice_html( $message, false, false, 'quick_export' );
103
+
104
+ if( !woo_ce_get_option( 'dismiss_max_input_vars_prompt', 0 ) ) {
105
+ $troubleshooting_url = 'https://www.visser.com.au/documentation/store-exporter-deluxe/troubleshooting/';
106
+
107
+ $message = '<strong>It looks like you have more HTML FORM fields on this screen than your hosting server can process.</strong><br /><br />Just a heads up this PHP configration option <code>max_input_vars</code> limitation may affect export generation and/or saving changes to Scheduled Exports and Export Templates.';
108
+ $message .= sprintf( ' <a href="%s" target="_blank">%s</a>', $troubleshooting_url . '#unable-to-edit-or-save-export-field-changes-on-the-edit-export-template-screen-or-the-quick-export-screen-just-refreshes', __( 'Need help?', 'woocommerce-exporter' ) );
109
+ woo_ce_admin_notice_html( $message, 'error', false, 'max_input_vars' );
110
+ }
111
+
112
+ echo '</div>';
113
114
}
115
+ add_action( 'woo_ce_export_before_options', 'woo_ce_quick_export_in_process' );
116
117
// Add Export and Docs links to the Plugins screen
118
function woo_ce_add_settings_link( $links, $file ) {
167
168
$page = add_submenu_page( 'woocommerce', __( 'Store Exporter', 'woocommerce-exporter' ), __( 'Store Export', 'woocommerce-exporter' ), 'view_woocommerce_reports', 'woo_ce', 'woo_ce_html_page' );
169
add_action( 'admin_print_styles-' . $page, 'woo_ce_enqueue_scripts' );
170
+ add_action( 'current_screen', 'woo_ce_admin_current_screen' );
171
172
}
173
add_action( 'admin_menu', 'woo_ce_admin_menu', 11 );
186
}
187
188
// Date Picker Addon
189
+ wp_enqueue_script( 'jquery' );
190
+ wp_enqueue_script( 'jquery-ui' );
191
wp_enqueue_script( 'jquery-ui-datepicker' );
192
wp_enqueue_style( 'jquery-ui-datepicker', plugins_url( '/templates/admin/jquery-ui-datepicker.css', WOO_CE_RELPATH ) );
193
212
213
}
214
215
+ function woo_ce_admin_current_screen() {
216
217
$screen = get_current_screen();
218
+ switch( $screen->id ) {
219
+
220
+ case 'woocommerce_page_woo_ce':
221
+
222
+ $troubleshooting_url = 'http://www.visser.com.au/documentation/store-exporter-deluxe/';
223
224
+ $screen->add_help_tab( array(
225
+ 'id' => 'woo_ce',
226
+ 'title' => __( 'Store Exporter', 'woocommerce-exporter' ),
227
+ 'content' =>
228
+ '<p>' . __( 'Thank you for using Store Exporter :) Should you need help using this Plugin please read the documentation, if an issue persists get in touch with us on the WordPress.org Support tab for this Plugin.', 'woocommerce-exporter' ) . '</p>' .
229
+ '<p><a href="' . $troubleshooting_url . '" target="_blank" class="button button-primary">' . __( 'Documentation', 'woocommerce-exporter' ) . '</a> <a href="' . 'http://wordpress.org/support/plugin/woocommerce-exporter' . '" target="_blank" class="button">' . __( 'Forum Support', 'woocommerce-exporter' ) . '</a></p>'
230
+ ) );
231
+
232
+ // This function only runs on the Quick Export screen
233
+ add_action( 'admin_footer', 'woo_ce_admin_export_footer_javascript' );
234
+ break;
235
+
236
+ }
237
238
}
239
288
switch( $tab ) {
289
290
case 'overview':
291
+
292
+ // Welcome notice for Overview screen
293
+ if( !woo_ce_get_option( 'dismiss_overview_prompt', 0 ) ) {
294
+ $dismiss_url = esc_url( add_query_arg( array( 'action' => 'dismiss_overview_prompt', '_wpnonce' => wp_create_nonce( 'woo_ce_dismiss_overview_prompt' ) ) ) );
295
+ $message = '<span style="float:right;"><a href="' . $dismiss_url . '">' . __( 'Dismiss', 'woocommerce-exporter' ) . '</a></span>' . '<strong>' . __( 'Welcome aboard!', 'woocommerce-exporter' ) . '</strong> ';
296
+ $message .= sprintf( __( 'Jump over to the <a href="%s">Quick Export screen</a> to create your first export.', 'woocommerce-exporter' ), add_query_arg( array( 'tab' => 'export' ) ) );
297
+ woo_ce_admin_notice_html( $message, 'notice' );
298
+ }
299
+
300
$skip_overview = woo_ce_get_option( 'skip_overview', false );
301
break;
302
303
case 'export':
304
+
305
+ // Welcome notice for Quick Export screen
306
+ if( !woo_ce_get_option( 'dismiss_quick_export_prompt', 0 ) ) {
307
+ $dismiss_url = esc_url( add_query_arg( array( 'action' => 'dismiss_quick_export_prompt', '_wpnonce' => wp_create_nonce( 'woo_ce_dismiss_quick_export_prompt' ) ) ) );
308
+ $message = '<span style="float:right;"><a href="' . $dismiss_url . '">' . __( 'Dismiss', 'woocommerce-exporter' ) . '</a></span>' . '<strong>' . __( 'This is where the magic happens...', 'woocommerce-exporter' ) . '</strong> ';
309
+ $message .= '<br /><br />' . __( 'Select an export type from the list below to expand the list of available export fields and filters, try switching between different export types to see the different options. When you are ready select the fields you would like to export and click the Export button below, Store Exporter will create an export file for you to save to your computer.', 'woocommerce-exporter' );
310
+ woo_ce_admin_notice_html( $message, 'notice' );
311
+ }
312
+
313
+ $export_type = ( isset( $_GET['type'] ) ? sanitize_text_field( $_GET['type'] ) : '' );
314
$export_types = array_keys( woo_ce_get_export_types() );
315
316
// Check if the default export type exists
333
$shipping_class = '999';
334
$ticket = '999';
335
336
+ // Start loading the Quick Export screen
337
+
338
+ add_action( 'woo_ce_export_before_options', 'woo_ce_export_export_types' );
339
+ add_action( 'woo_ce_export_after_options', 'woo_ce_export_export_options' );
340
+
341
+ // Products
342
if( $product_fields = woo_ce_get_product_fields() ) {
343
foreach( $product_fields as $key => $product_field )
344
$product_fields[$key]['disabled'] = ( isset( $product_field['disabled'] ) ? $product_field['disabled'] : 0 );
355
add_action( 'woo_ce_export_options', 'woo_ce_export_options_gallery_format' );
356
add_action( 'woo_ce_export_after_form', 'woo_ce_products_custom_fields' );
357
}
358
+
359
+ // Categories
360
if( $category_fields = woo_ce_get_category_fields() ) {
361
foreach( $category_fields as $key => $category_field )
362
$category_fields[$key]['disabled'] = ( isset( $category_field['disabled'] ) ? $category_field['disabled'] : 0 );
363
add_action( 'woo_ce_export_category_options_after_table', 'woo_ce_category_sorting' );
364
}
365
+
366
+ // Product Tags
367
if( $tag_fields = woo_ce_get_tag_fields() ) {
368
foreach( $tag_fields as $key => $tag_field )
369
$tag_fields[$key]['disabled'] = ( isset( $tag_field['disabled'] ) ? $tag_field['disabled'] : 0 );
370
add_action( 'woo_ce_export_tag_options_after_table', 'woo_ce_tag_sorting' );
371
}
372
+
373
+ // Brands
374
if( $brand_fields = woo_ce_get_brand_fields() ) {
375
foreach( $brand_fields as $key => $brand_field )
376
$brand_fields[$key]['disabled'] = ( isset( $brand_field['disabled'] ) ? $brand_field['disabled'] : 0 );
377
add_action( 'woo_ce_export_brand_options_before_table', 'woo_ce_brand_sorting' );
378
}
379
+
380
+ // Orders
381
if( $order_fields = woo_ce_get_order_fields() ) {
382
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_date' );
383
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_status' );
389
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_product' );
390
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_product_category' );
391
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_product_tag' );
392
+ if( function_exists( 'woo_ce_orders_filter_by_product_brand' ) )
393
+ add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_product_brand' );
394
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_order_id' );
395
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_payment_gateway' );
396
add_action( 'woo_ce_export_order_options_before_table', 'woo_ce_orders_filter_by_shipping_method' );
400
add_action( 'woo_ce_export_options', 'woo_ce_orders_items_types' );
401
add_action( 'woo_ce_export_after_form', 'woo_ce_orders_custom_fields' );
402
}
403
+
404
+ // Customers
405
if( $customer_fields = woo_ce_get_customer_fields() ) {
406
add_action( 'woo_ce_export_customer_options_before_table', 'woo_ce_customers_filter_by_status' );
407
add_action( 'woo_ce_export_customer_options_before_table', 'woo_ce_customers_filter_by_user_role' );
408
add_action( 'woo_ce_export_after_form', 'woo_ce_customers_custom_fields' );
409
}
410
+
411
+ // Users
412
if( $user_fields = woo_ce_get_user_fields() ) {
413
foreach( $user_fields as $key => $user_field )
414
$user_fields[$key]['disabled'] = ( isset( $user_field['disabled'] ) ? $user_field['disabled'] : 0 );
415
add_action( 'woo_ce_export_user_options_after_table', 'woo_ce_user_sorting' );
416
add_action( 'woo_ce_export_after_form', 'woo_ce_users_custom_fields' );
417
}
418
+
419
+ // Reviews
420
+ if( $review_fields = ( function_exists( 'woo_ce_get_review_fields' ) ? woo_ce_get_review_fields() : false ) ) {
421
+
422
+ }
423
+
424
+ // Coupons
425
if( $coupon_fields = woo_ce_get_coupon_fields() ) {
426
add_action( 'woo_ce_export_coupon_options_before_table', 'woo_ce_coupon_sorting' );
427
}
428
+
429
+ // Subscriptions
430
if( $subscription_fields = woo_ce_get_subscription_fields() ) {
431
add_action( 'woo_ce_export_subscription_options_before_table', 'woo_ce_subscriptions_filter_by_subscription_status' );
432
add_action( 'woo_ce_export_subscription_options_before_table', 'woo_ce_subscriptions_filter_by_subscription_product' );
433
}
434
+
435
+ // Product Vendors
436
$product_vendor_fields = woo_ce_get_product_vendor_fields();
437
+
438
+ // Commissions
439
if( $commission_fields = woo_ce_get_commission_fields() ) {
440
add_action( 'woo_ce_export_commission_options_before_table', 'woo_ce_commissions_filter_by_date' );
441
add_action( 'woo_ce_export_commission_options_before_table', 'woo_ce_commissions_filter_by_product_vendor' );
442
add_action( 'woo_ce_export_commission_options_before_table', 'woo_ce_commissions_filter_by_commission_status' );
443
add_action( 'woo_ce_export_commission_options_before_table', 'woo_ce_commission_sorting' );
444
}
445
+
446
+ // Shipping Classes
447
if( $shipping_class_fields = woo_ce_get_shipping_class_fields() ) {
448
add_action( 'woo_ce_export_shipping_class_options_after_table', 'woo_ce_shipping_class_sorting' );
449
}
450
+
451
+ // Tickets
452
+
453
+
454
+ // Bookings
455
+
456
+
457
+ // Attributes
458
$attribute_fields = false;
459
460
// Export options
555
556
}
557
558
+ function woo_ce_export_export_types() {
559
+
560
+ $woo_cd_url = 'https://www.visser.com.au/plugins/store-exporter-deluxe/?platform=wc';
561
+ $woo_cd_link = sprintf( '<a href="%s" target="_blank">' . __( 'Store Exporter Deluxe', 'woocommerce-exporter' ) . '</a>', $woo_cd_url );
562
+
563
+ $export_type = sanitize_text_field( ( isset( $_POST['dataset'] ) ? $_POST['dataset'] : woo_ce_get_option( 'last_export', 'product' ) ) );
564
+ $product = woo_ce_get_export_type_count( 'product' );
565
+ $category = woo_ce_get_export_type_count( 'category' );
566
+ $tag = woo_ce_get_export_type_count( 'tag' );
567
+ $brand = '999';
568
+ $order = '999';
569
+ $customer = '999';
570
+ $user = woo_ce_get_export_type_count( 'user' );
571
+ $review = '999';
572
+ $coupon = '999';
573
+ $attribute = '999';
574
+ $subscription = '999';
575
+ $product_vendor = '999';
576
+ $commission = '999';
577
+ $shipping_class = '999';
578
+ $ticket = '999';
579
+
580
+ ob_start();
581
+ ?>
582
+ <div id="export-type">
583
+ <h3>
584
+ <?php _e( 'Export Types', 'woocommerce-exporter' ); ?>
585
+ <img class="help_tip" data-tip="<?php _e( 'Select the data type you want to export. Export Type counts are refreshed hourly and can be manually refreshed by clicking the <em>Refresh counts</em> link.', 'woocommerce-exporter' ); ?>" src="<?php echo WC()->plugin_url(); ?>/assets/images/help.png" height="16" width="16" />
586
+ </h3>
587
+ <div class="inside">
588
+ <table class="form-table widefat striped">
589
+ <thead>
590
+
591
+ <tr>
592
+ <th width="1%">&nbsp;</th>
593
+ <th class="column_export-type"><?php _e( 'Export Type', 'woocommerce-exporter' ); ?></th>
594
+ <th class="column_records">
595
+ <?php _e( 'Records', 'woocommerce-exporter' ); ?>
596
+ (<a href="<?php echo esc_url( add_query_arg( array( 'action' => 'refresh_export_type_counts', '_wpnonce' => wp_create_nonce( 'woo_ce_refresh_export_type_counts' ) ) ) ); ?>"><?php _e( 'Refresh counts', 'woocommerce-exporter' ); ?></a>)
597
+ </th>
598
+ <th width="1%"><attr title="<?php _e( 'Actions', 'woocommerce-exporter' ); ?>">...</attr></th>
599
+ </tr>
600
+
601
+ </thead>
602
+ <tbody>
603
+
604
+ <tr>
605
+ <td width="1%" class="sort">
606
+ <input type="radio" id="product" name="dataset" value="product"<?php disabled( $product, 0 ); ?><?php checked( ( empty( $product ) ? '' : $export_type ), 'product' ); ?> />
607
+ </td>
608
+ <td class="name">
609
+ <label for="product"><?php _e( 'Products', 'woocommerce-exporter' ); ?></label>
610
+ </td>
611
+ <td>
612
+ <?php echo $product; ?>
613
+ </td>
614
+ <td width="1%" class="actions">
615
+ </td>
616
+ </tr>
617
+
618
+ <tr>
619
+ <td width="1%" class="sort">
620
+ <input type="radio" id="category" name="dataset" value="category"<?php disabled( $category, 0 ); ?><?php checked( ( empty( $category ) ? '' : $export_type ), 'category' ); ?> />
621
+ </td>
622
+ <td class="name">
623
+ <label for="category"><?php _e( 'Categories', 'woocommerce-exporter' ); ?></label>
624
+ </td>
625
+ <td>
626
+ <?php echo $category; ?>
627
+ </td>
628
+ <td width="1%" class="actions">
629
+ </td>
630
+ </tr>
631
+
632
+ <tr>
633
+ <td width="1%" class="sort">
634
+ <input type="radio" id="tag" name="dataset" value="tag"<?php disabled( $tag, 0 ); ?><?php checked( ( empty( $tag ) ? '' : $export_type ), 'tag' ); ?> />
635
+ </td>
636
+ <td class="name">
637
+ <label for="tag"><?php _e( 'Tags', 'woocommerce-exporter' ); ?></label>
638
+ </td>
639
+ <td>
640
+ <?php echo $tag; ?>
641
+ </td>
642
+ <td width="1%" class="actions">
643
+ </td>
644
+ </tr>
645
+
646
+ <tr>
647
+ <td width="1%" class="sort">
648
+ <input type="radio" id="brand" name="dataset" value="brand"<?php disabled( $brand, 0 ); ?><?php checked( ( empty( $brand ) ? '' : $export_type ), 'brand' ); ?> />
649
+ </td>
650
+ <td class="name">
651
+ <label for="brand"><?php _e( 'Brands', 'woocommerce-exporter' ); ?></label>
652
+ </td>
653
+ <td>
654
+ <span class="description"><?php echo ( $brand = 999 ? 'N/A' : $brand ); ?></span>
655
+ <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
656
+ </td>
657
+ <td width="1%" class="actions">
658
+ </td>
659
+ </tr>
660
+
661
+ <tr>
662
+ <td width="1%" class="sort">
663
+ <input type="radio" id="order" name="dataset" value="order"<?php disabled( $order, 0 ); ?><?php checked( ( empty( $order ) ? '' : $export_type ), 'order' ); ?>/>
664
+ </td>
665
+ <td class="name">
666
+ <label for="order"><?php _e( 'Orders', 'woocommerce-exporter' ); ?></label>
667
+ </td>
668
+ <td>
669
+ <span class="description"><?php echo ( $order = 999 ? 'N/A' : $order ); ?></span>
670
+ <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
671
+ </td>
672
+ <td width="1%" class="actions">
673
+ </td>
674
+ </tr>
675
+
676
+ <tr>
677
+ <td width="1%" class="sort">
678
+ <input type="radio" id="customer" name="dataset" value="customer"<?php disabled( $customer, 0 ); ?><?php checked( ( empty( $customer ) ? '' : $export_type ), 'customer' ); ?>/>
679
+ </td>
680
+ <td class="name">
681
+ <label for="customer"><?php _e( 'Customers', 'woocommerce-exporter' ); ?></label>
682
+ </td>
683
+ <td>
684
+ <span class="description"><?php echo ( $customer = 999 ? 'N/A' : $customer ); ?></span>
685
+ <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
686
+ </td>
687
+ <td width="1%" class="actions">
688
+ </td>
689
+ </tr>
690
+
691
+ <tr>
692
+ <td width="1%" class="sort">
693
+ <input type="radio" id="user" name="dataset" value="user"<?php disabled( $user, 0 ); ?><?php checked( ( empty( $user ) ? '' : $export_type ), 'user' ); ?>/>
694
+ </td>
695
+ <td class="name">
696
+ <label for="user"><?php _e( 'Users', 'woocommerce-exporter' ); ?></label>
697
+ </td>
698
+ <td>
699
+ <?php echo $user; ?>
700
+ </td>
701
+ <td width="1%" class="actions">
702
+ </td>
703
+ </tr>
704
+
705
+ <tr>
706
+ <td width="1%" class="sort">
707
+ <input type="radio" id="review" name="dataset" value="review"<?php disabled( $review, 0 ); ?><?php checked( ( empty( $review ) ? '' : $export_type ), 'review' ); ?>/>
708
+ </td>
709
+ <td class="name">
710
+ <label for="review"><?php _e( 'Reviews', 'woocommerce-exporter' ); ?></label>
711
+ </td>
712
+ <td>
713
+ <span class="description"><?php echo ( $review = 999 ? 'N/A' : $review ); ?></span>
714
+ <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
715
+ </td>
716
+ <td width="1%" class="actions">
717
+ </td>
718
+ </tr>
719
+
720
+ <tr>
721
+ <td width="1%" class="sort">
722
+ <input type="radio" id="coupon" name="dataset" value="coupon"<?php disabled( $coupon, 0 ); ?><?php checked( ( empty( $coupon ) ? '' : $export_type ), 'coupon' ); ?> />
723
+ </td>
724
+ <td class="name">
725
+ <label for="coupon"><?php _e( 'Coupons', 'woocommerce-exporter' ); ?></label>
726
+ </td>
727
+ <td>
728
+ <span class="description"><?php echo ( $coupon = 999 ? 'N/A' : $coupon ); ?></span>
729
+ <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
730
+ </td>
731
+ <td width="1%" class="actions">
732
+ </td>
733
+ </tr>
734
+
735
+ <tr>
736
+ <td width="1%" class="sort">
737
+ <input type="radio" id="subscription" name="dataset" value="subscription"<?php disabled( $subscription, 0 ); ?><?php checked( ( empty( $subscription ) ? '' : $export_type ), 'subscription' ); ?> />
738
+ </td>
739
+ <td class="name">
740
+ <label for="subscription"><?php _e( 'Subscriptions', 'woocommerce-exporter' ); ?></label>
741
+ </td>
742
+ <td>
743
+ <span class="description"><?php echo ( $subscription = 999 ? 'N/A' : $subscription ); ?></span>
744
+ <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
745
+ </td>
746
+ <td width="1%" class="actions">
747
+ </td>
748
+ </tr>
749
+
750
+ <tr>
751
+ <td width="1%" class="sort">
752
+ <input type="radio" id="product_vendor" name="dataset" value="product_vendor"<?php disabled( $product_vendor, 0 ); ?><?php checked( ( empty( $product_vendor ) ? '' : $export_type ), 'product_vendor' ); ?> />
753
+ </td>
754
+ <td class="name">
755
+ <label for="product_vendor"><?php _e( 'Product Vendors', 'woocommerce-exporter' ); ?></label>
756
+ </td>
757
+ <td>
758
+ <span class="description"><?php echo ( $product_vendor = 999 ? 'N/A' : $product_vendor ); ?></span>
759
+ <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
760
+ </td>
761
+ <td width="1%" class="actions">
762
+ </td>
763
+ </tr>
764
+
765
+ <tr>
766
+ <td width="1%" class="sort">
767
+ <input type="radio" id="commission" name="dataset" value="commission"<?php disabled( $commission, 0 ); ?><?php checked( ( empty( $commission ) ? '' : $export_type ), 'commission' ); ?> />
768
+ </td>
769
+ <td class="name">
770
+ <label for="commission"><?php _e( 'Commissions', 'woocommerce-exporter' ); ?></label>
771
+ </td>
772
+ <td>
773
+ <span class="description"><?php echo ( $commission = 999 ? 'N/A' : $commission ); ?></span>
774
+ <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
775
+ </td>
776
+ <td width="1%" class="actions">
777
+ </td>
778
+ </tr>
779
+
780
+ <tr>
781
+ <td width="1%" class="sort">
782
+ <input type="radio" id="shipping_class" name="dataset" value="shipping_class"<?php disabled( $shipping_class, 0 ); ?><?php checked( ( empty( $shipping_class ) ? '' : $export_type ), 'shipping_class' ); ?> />
783
+ </td>
784
+ <td class="name">
785
+ <label for="shipping_class"><?php _e( 'Shipping Classes', 'woocommerce-exporter' ); ?></label>
786
+ </td>
787
+ <td>
788
+ <span class="description"><?php echo ( $shipping_class = 999 ? 'N/A' : $shipping_class ); ?></span>
789
+ <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
790
+ </td>
791
+ <td width="1%" class="actions">
792
+ </td>
793
+ </tr>
794
+
795
+ <!--
796
+ <tr>
797
+ <td width="1%" class="sort">
798
+ <input type="radio" id="attribute" name="dataset" value="attribute"<?php disabled( $attribute, 0 ); ?><?php checked( ( empty( $attribute ) ? '' : $export_type ), 'attribute' ); ?> />
799
+ </td>
800
+ <td class="name">
801
+ <label for="attribute"><?php _e( 'Attributes', 'woocommerce-exporter' ); ?></label>
802
+ </td>
803
+ <td>
804
+ <span class="description"><?php echo ( $attribute = 999 ? 'N/A' : $attribute ); ?></span>
805
+ <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
806
+ </td>
807
+ <td width="1%" class="actions">
808
+ </td>
809
+ </tr>
810
+ -->
811
+ </tbody>
812
+ </table>
813
+ <!-- .form-table -->
814
+ </div>
815
+ <!-- .inside -->
816
+ </div>
817
+ <!-- .postbox -->
818
+
819
+ <hr />
820
+
821
+ <?php
822
+ ob_end_flush();
823
+
824
+ }
825
+
826
+ function woo_ce_export_export_options() {
827
+
828
+ ob_start();
829
+
830
+ $template = 'quick_export.php';
831
+ if( file_exists( WOO_CE_PATH . 'includes/admin/' . $template ) ) {
832
+
833
+ include_once( WOO_CE_PATH . 'includes/admin/' . $template );
834
+
835
+ add_action( 'woo_ce_export_options', 'woo_ce_export_options_export_format' );
836
+ add_action( 'woo_ce_export_options', 'woo_ce_export_options_troubleshooting' );
837
+ add_action( 'woo_ce_export_options', 'woo_ce_export_options_limit_volume' );
838
+ add_action( 'woo_ce_export_options', 'woo_ce_export_options_volume_offset' );
839
+
840
+ } else {
841
+
842
+ $message = sprintf( __( 'We couldn\'t load the template file <code>%s</code> within <code>%s</code>, this file should be present.', 'woocommerce-exporter' ), $template, WOO_CE_PATH . 'includes/admin/...' );
843
+ ?>
844
+ <p><strong><?php echo $message; ?></strong></p>
845
+ <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-exporter' ); ?>:</p>
846
+ <ul class="ul-disc">
847
+ <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-exporter' ); ?></li>
848
+ <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-exporter' ); ?></li>
849
+ <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-exporter' ); ?></li>
850
+ </ul>
851
+ <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>
852
+ <?php
853
+
854
+ }
855
+ ?>
856
+ <div class="postbox" id="export-options">
857
+ <h3 class="hndle"><?php _e( 'Export Options', 'woocommerce-exporter' ); ?></h3>
858
+ <div class="inside">
859
+ <p class="description"><?php _e( 'Use this section to customise your export file to suit your needs, export options change based on the selected export type. You can find additional export options under the Settings tab at the top of this screen.', 'woocommerce-exporter' ); ?></p>
860
+
861
+ <?php do_action( 'woo_ce_export_options_before' ); ?>
862
+
863
+ <table class="form-table">
864
+
865
+ <?php do_action( 'woo_ce_export_options' ); ?>
866
+
867
+ <?php do_action( 'woo_ce_export_options_table_after' ); ?>
868
+
869
+ </table>
870
+ <p class="description"><?php _e( 'Click the Export button above to apply these changes and generate your export file.', 'woocommerce-exporter' ); ?></p>
871
+
872
+ <?php do_action( 'woo_ce_export_options_after' ); ?>
873
+
874
+ </div>
875
+ </div>
876
+ <!-- .postbox -->
877
+
878
+ <?php
879
+ ob_end_flush();
880
+
881
+ }
882
+ // This function only runs on the Quick Export screen
883
+ function woo_ce_admin_export_footer_javascript() {
884
+
885
+ // Limit this only to the Quick Export tab
886
+ $tab = ( isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : false );
887
+ if( !isset( $_GET['tab'] ) && woo_ce_get_option( 'skip_overview', false ) )
888
+ $tab = 'export';
889
+ if( $tab <> 'export' )
890
+ return;
891
+
892
+ $notice_timeout = apply_filters( 'woo_ce_quick_export_in_process_notice_timeout', 10 );
893
+ $notice_timeout = ( !empty( $notice_timeout ) ? $notice_timeout * 1000 : 0 );
894
+
895
+ $total = false;
896
+ // Displays a notice where the maximum PHP FORM limit is below the number of detected FORM elements
897
+ if( !woo_ce_get_option( 'dismiss_max_input_vars_prompt', 0 ) ) {
898
+ if( function_exists( 'ini_get' ) )
899
+ $total = ini_get( 'max_input_vars' );
900
+ }
901
+
902
+ // In-line javascript
903
+ ob_start(); ?>
904
+ <script type="text/javascript">
905
+ jQuery(document).ready( function($) {
906
+
907
+ // This shows the Quick export in progress... notice
908
+ <?php if( !empty( $notice_timeout ) ) { ?>
909
+ $j("#postform").on("submit", function(){
910
+ $j('#message.error').fadeOut('slow');
911
+ $j('#message-quick_export').fadeIn().delay(<?php echo $notice_timeout; ?>).fadeOut('slow');
912
+ scroll(0,0);
913
+ });
914
+ <?php } ?>
915
+
916
+ <?php if( $total && !woo_ce_get_option( 'dismiss_max_input_vars_prompt', 0 ) ) { ?>
917
+ // Check that the number of FORM fields is below the PHP FORM limit
918
+ var current_fields = jQuery('#postform').find('input, textarea, select').length;
919
+ var max_fields = '<?php echo $total; ?>';
920
+ if( current_fields && max_fields ) {
921
+ if( current_fields > max_fields ) {
922
+ jQuery('#message-max_input_vars').fadeIn();
923
+ }
924
+ }
925
+ <?php } ?>
926
+
927
+ // This triggers the Quick Export button from the admin menu bar
928
+ jQuery("li#wp-admin-bar-quick-export .ab-item").on( "click", function() {
929
+ jQuery('#quick_export').trigger('click');
930
+ return false;
931
+ });
932
+
933
+ });
934
+ </script>
935
+ <?php
936
+ ob_end_flush();
937
+
938
+ }
939
+
940
// Display the memory usage in the screen footer
941
function woo_ce_admin_footer_text( $footer_text = '' ) {
942
945
'woocommerce_page_woo_ce'
946
);
947
// Check to make sure we're on the Export screen
948
+ if(
949
+ isset( $current_screen->id ) &&
950
+ apply_filters( 'woo_ce_display_admin_footer_text', in_array( $current_screen->id, $pages ) )
951
+ ) {
952
$memory_usage = woo_ce_current_memory_usage( false );
953
$memory_limit = absint( ini_get( 'memory_limit' ) );
954
$memory_percent = absint( $memory_usage / $memory_limit * 100 );
958
if( $memory_percent > 90 )
959
$memory_color = 'font-weight:bold; color:red;';
960
$footer_text .= ' | ' . sprintf( __( 'Memory: %s of %s MB (%s)', 'woocommerce-exporter' ), $memory_usage, $memory_limit, sprintf( '<span style="%s">%s</span>', $memory_color, $memory_percent . '%' ) );
961
+ $footer_text .= ' | ' . sprintf( __( 'Stopwatch: %s seconds', 'woocommerce-exporter' ), timer_stop(0, 3) );
962
}
963
return $footer_text;
964
includes/admin/quick_export.php ADDED
@@ -0,0 +1,79 @@
1
+ <?php
2
+ function woo_ce_export_options_export_format() {
3
+
4
+ $woo_cd_url = 'https://www.visser.com.au/plugins/store-exporter-deluxe/?platform=wc';
5
+ $woo_cd_link = sprintf( '<a href="%s" target="_blank">' . __( 'Store Exporter Deluxe', 'woocommerce-exporter' ) . '</a>', $woo_cd_url );
6
+
7
+ ob_start(); ?>
8
+ <tr>
9
+ <th>
10
+ <label><?php _e( 'Export format', 'woocommerce-exporter' ); ?></label>
11
+ </th>
12
+ <td>
13
+ <label><input type="radio" name="export_format" value="csv"<?php checked( 'csv', 'csv' ); ?> /> <?php _e( 'CSV', 'woocommerce-exporter' ); ?> <span class="description"><?php _e( '(Comma Separated Values)', 'woocommerce-exporter' ); ?></span></label><br />
14
+ <label><input type="radio" name="export_format" value="tsv"<?php checked( 'tsv', 'tsv' ); ?> /> <?php _e( 'TSV', 'woocommerce-exporter' ); ?> <span class="description"><?php _e( '(Tab Separated Values)', 'woocommerce-exporter' ); ?></span></label><br />
15
+ <label><input type="radio" name="export_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><br />
16
+ <label><input type="radio" name="export_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><br />
17
+ <label><input type="radio" name="export_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><br />
18
+ <div class="export-options product-options">
19
+ <label><input type="radio" name="export_format" value="rss" disabled="disabled" /> <?php _e( 'RSS', 'woocommerce-exporter' ); ?> <span class="description"><?php printf( __( '(<attr title="%s">XML</attr> feed in RSS 2.0 format)', 'woocommerce-exporter' ), __( 'EXtensible Markup Language', 'woocommerce-exporter' ) ); ?> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span></label>
20
+ </div>
21
+ <p class="description"><?php _e( 'Adjust the export format to generate different export file formats.', 'woocommerce-exporter' ); ?></p>
22
+ </td>
23
+ </tr>
24
+ <?php
25
+ ob_end_flush();
26
+
27
+ }
28
+
29
+ function woo_ce_export_options_troubleshooting() {
30
+
31
+ ob_start(); ?>
32
+ <tr>
33
+ <th>&nbsp;</th>
34
+ <td>
35
+ <p class="description">
36
+ <?php _e( 'Having difficulty downloading your exports in one go? Use our batch export function - Limit Volume and Volume Offset - to create smaller exports.', 'woocommerce-exporter' ); ?><br />
37
+ <?php _e( 'Set the first text field (Volume limit) to the number of records to export each batch (e.g. 200), set the second field (Volume offset) to the starting record (e.g. 0). After each successful export increment only the Volume offset field (e.g. 201, 401, 601, 801, etc.) to export the next batch of records.', 'woocommerce-exporter' ); ?>
38
+ </p>
39
+ </td>
40
+ </tr>
41
+ <?php
42
+ ob_end_flush();
43
+
44
+ }
45
+
46
+ function woo_ce_export_options_limit_volume() {
47
+
48
+ $limit_volume = woo_ce_get_option( 'limit_volume' );
49
+
50
+ ob_start(); ?>
51
+ <tr>
52
+ <th><label for="limit_volume"><?php _e( 'Limit volume', 'woocommerce-exporter' ); ?></label></th>
53
+ <td>
54
+ <input type="text" size="3" id="limit_volume" name="limit_volume" value="<?php echo esc_attr( $limit_volume ); ?>" size="5" class="text" title="<?php _e( 'Limit volume', 'woocommerce-exporter' ); ?>" />
55
+ <p class="description"><?php _e( 'Limit the number of records to be exported. By default this is not used and is left empty.', 'woocommerce-exporter' ); ?></p>
56
+ </td>
57
+ </tr>
58
+ <?php
59
+ ob_end_flush();
60
+
61
+ }
62
+
63
+ function woo_ce_export_options_volume_offset() {
64
+
65
+ $offset = woo_ce_get_option( 'offset' );
66
+
67
+ ob_start(); ?>
68
+ <tr>
69
+ <th><label for="offset"><?php _e( 'Volume offset', 'woocommerce-exporter' ); ?></label></th>
70
+ <td>
71
+ <input type="text" size="3" id="offset" name="offset" value="<?php echo esc_attr( $offset ); ?>" size="5" class="text" title="<?php _e( 'Volume offset', 'woocommerce-exporter' ); ?>" />
72
+ <p class="description"><?php _e( 'Set the number of records to be skipped in this export. By default this is not used and is left empty.', 'woocommerce-exporter' ); ?></p>
73
+ </td>
74
+ </tr>
75
+ <?php
76
+ ob_end_flush();
77
+
78
+ }
79
+ ?>
includes/attribute.php ADDED
File without changes
includes/booking.php ADDED
File without changes
includes/brand.php CHANGED
@@ -60,6 +60,14 @@ function woo_ce_get_brand_fields( $format = 'full' ) {
60
'name' => 'image',
61
'label' => __( 'Brand Image', 'woocommerce-exporter' )
62
);
63
64
/*
65
$fields[] = array(
60
'name' => 'image',
61
'label' => __( 'Brand Image', 'woocommerce-exporter' )
62
);
63
+ $fields[] = array(
64
+ 'name' => 'image_embed',
65
+ 'label' => __( 'Brand Image (Embed)', 'woocommerce-exporter' )
66
+ );
67
+ $fields[] = array(
68
+ 'name' => 'count',
69
+ 'label' => __( 'Count', 'woocommerce-exporter' )
70
+ );
71
72
/*
73
$fields[] = array(
includes/category.php CHANGED
@@ -38,19 +38,58 @@ function woo_ce_get_category_fields( $format = 'full' ) {
38
);
39
$fields[] = array(
40
'name' => 'name',
41
- 'label' => __( 'Category Name', 'woocommerce-exporter' )
42
);
43
$fields[] = array(
44
'name' => 'slug',
45
- 'label' => __( 'Category Slug', 'woocommerce-exporter' )
46
);
47
$fields[] = array(
48
'name' => 'parent_id',
49
'label' => __( 'Parent Term ID', 'woocommerce-exporter' )
50
);
51
$fields[] = array(
52
'name' => 'description',
53
- 'label' => __( 'Category Description', 'woocommerce-exporter' )
54
);
55
$fields[] = array(
56
'name' => 'display_type',
@@ -58,7 +97,17 @@ function woo_ce_get_category_fields( $format = 'full' ) {
58
);
59
$fields[] = array(
60
'name' => 'image',
61
- 'label' => __( 'Category Image', 'woocommerce-exporter' )
62
);
63
64
/*
@@ -174,7 +223,11 @@ function woo_ce_get_product_categories( $args = array() ) {
174
if( !empty( $categories ) && is_wp_error( $categories ) == false ) {
175
foreach( $categories as $key => $category ) {
176
$categories[$key]->description = woo_ce_format_description_excerpt( $category->description );
177
$categories[$key]->parent_name = '';
178
if( $categories[$key]->parent_id = $category->parent ) {
179
if( $parent_category = get_term( $categories[$key]->parent_id, $term_taxonomy ) ) {
180
$categories[$key]->parent_name = $parent_category->name;
@@ -183,6 +236,7 @@ function woo_ce_get_product_categories( $args = array() ) {
183
} else {
184
$categories[$key]->parent_id = '';
185
}
186
$categories[$key]->image = woo_ce_get_category_thumbnail_url( $category->term_id );
187
$categories[$key]->display_type = get_woocommerce_term_meta( $category->term_id, 'display_type', true );
188
}
38
);
39
$fields[] = array(
40
'name' => 'name',
41
+ 'label' => __( 'Name', 'woocommerce-exporter' )
42
);
43
$fields[] = array(
44
'name' => 'slug',
45
+ 'label' => __( 'Slug', 'woocommerce-exporter' )
46
+ );
47
+ $fields[] = array(
48
+ 'name' => 'term_url',
49
+ 'label' => __( 'Term URI', 'woocommerce-exporter' )
50
);
51
$fields[] = array(
52
'name' => 'parent_id',
53
'label' => __( 'Parent Term ID', 'woocommerce-exporter' )
54
);
55
+ $fields[] = array(
56
+ 'name' => 'category_level_1',
57
+ 'label' => __( 'Category: Level 1', 'woocommerce-exporter' ),
58
+ 'disabled' => 1
59
+ );
60
+ $fields[] = array(
61
+ 'name' => 'category_level_2',
62
+ 'label' => __( 'Category: Level 2', 'woocommerce-exporter' ),
63
+ 'disabled' => 1
64
+ );
65
+ $fields[] = array(
66
+ 'name' => 'category_level_3',
67
+ 'label' => __( 'Category: Level 3', 'woocommerce-exporter' ),
68
+ 'disabled' => 1
69
+ );
70
+ $fields[] = array(
71
+ 'name' => 'category_level_4',
72
+ 'label' => __( 'Category: Level 4', 'woocommerce-exporter' ),
73
+ 'disabled' => 1
74
+ );
75
+ $fields[] = array(
76
+ 'name' => 'category_level_5',
77
+ 'label' => __( 'Category: Level 5', 'woocommerce-exporter' ),
78
+ 'disabled' => 1
79
+ );
80
+ $fields[] = array(
81
+ 'name' => 'category_level_6',
82
+ 'label' => __( 'Category: Level 6', 'woocommerce-exporter' ),
83
+ 'disabled' => 1
84
+ );
85
+ $fields[] = array(
86
+ 'name' => 'category_level_7',
87
+ 'label' => __( 'Category: Level 7', 'woocommerce-exporter' ),
88
+ 'disabled' => 1
89
+ );
90
$fields[] = array(
91
'name' => 'description',
92
+ 'label' => __( 'Description', 'woocommerce-exporter' )
93
);
94
$fields[] = array(
95
'name' => 'display_type',
97
);
98
$fields[] = array(
99
'name' => 'image',
100
+ 'label' => __( 'Image', 'woocommerce-exporter' )
101
+ );
102
+ $fields[] = array(
103
+ 'name' => 'image_embed',
104
+ 'label' => __( 'Image (Embed)', 'woocommerce-exporter' ),
105
+ 'disabled' => 1
106
+ );
107
+ $fields[] = array(
108
+ 'name' => 'count',
109
+ 'label' => __( 'Count', 'woocommerce-exporter' ),
110
+ 'disabled' => 1
111
);
112
113
/*
223
if( !empty( $categories ) && is_wp_error( $categories ) == false ) {
224
foreach( $categories as $key => $category ) {
225
$categories[$key]->description = woo_ce_format_description_excerpt( $category->description );
226
+ $categories[$key]->term_url = get_term_link( $category, $term_taxonomy );
227
+
228
+ // Category heirachy
229
$categories[$key]->parent_name = '';
230
+ // Term
231
if( $categories[$key]->parent_id = $category->parent ) {
232
if( $parent_category = get_term( $categories[$key]->parent_id, $term_taxonomy ) ) {
233
$categories[$key]->parent_name = $parent_category->name;
236
} else {
237
$categories[$key]->parent_id = '';
238
}
239
+
240
$categories[$key]->image = woo_ce_get_category_thumbnail_url( $category->term_id );
241
$categories[$key]->display_type = get_woocommerce_term_meta( $category->term_id, 'display_type', true );
242
}
includes/coupon.php CHANGED
@@ -52,18 +52,30 @@ function woo_ce_get_coupon_fields( $format = 'full' ) {
52
'name' => 'individual_use',
53
'label' => __( 'Individual Use', 'woocommerce-exporter' )
54
);
55
$fields[] = array(
56
'name' => 'apply_before_tax',
57
- 'label' => __( 'Apply before tax', 'woocommerce-exporter' )
58
);
59
$fields[] = array(
60
'name' => 'exclude_sale_items',
61
- 'label' => __( 'Exclude sale items', 'woocommerce-exporter' )
62
);
63
$fields[] = array(
64
'name' => 'minimum_amount',
65
'label' => __( 'Minimum Amount', 'woocommerce-exporter' )
66
);
67
$fields[] = array(
68
'name' => 'product_ids',
69
'label' => __( 'Products', 'woocommerce-exporter' )
@@ -82,7 +94,7 @@ function woo_ce_get_coupon_fields( $format = 'full' ) {
82
);
83
$fields[] = array(
84
'name' => 'customer_email',
85
- 'label' => __( 'Customer e-mails', 'woocommerce-exporter' )
86
);
87
$fields[] = array(
88
'name' => 'usage_limit',
@@ -92,6 +104,22 @@ function woo_ce_get_coupon_fields( $format = 'full' ) {
92
'name' => 'expiry_date',
93
'label' => __( 'Expiry Date', 'woocommerce-exporter' )
94
);
95
96
/*
97
$fields[] = array(
@@ -123,7 +151,7 @@ function woo_ce_get_coupon_fields( $format = 'full' ) {
123
124
case 'full':
125
default:
126
- $sorting = woo_ce_get_option( $export_type . '_sorting', array() );
127
$size = count( $fields );
128
for( $i = 0; $i < $size; $i++ ) {
129
$fields[$i]['reset'] = $i;
@@ -139,6 +167,7 @@ function woo_ce_get_coupon_fields( $format = 'full' ) {
139
140
}
141
142
function woo_ce_override_coupon_field_labels( $fields = array() ) {
143
144
$labels = woo_ce_get_option( 'coupon_labels', array() );
52
'name' => 'individual_use',
53
'label' => __( 'Individual Use', 'woocommerce-exporter' )
54
);
55
+ $fields[] = array(
56
+ 'name' => 'post_date',
57
+ 'label' => __( 'Coupon Published', 'woocommerce-exporter' )
58
+ );
59
+ $fields[] = array(
60
+ 'name' => 'post_modified',
61
+ 'label' => __( 'Coupon Modified', 'woocommerce-exporter' )
62
+ );
63
$fields[] = array(
64
'name' => 'apply_before_tax',
65
+ 'label' => __( 'Apply Before Tax', 'woocommerce-exporter' )
66
);
67
$fields[] = array(
68
'name' => 'exclude_sale_items',
69
+ 'label' => __( 'Exclude Sale Items', 'woocommerce-exporter' )
70
);
71
$fields[] = array(
72
'name' => 'minimum_amount',
73
'label' => __( 'Minimum Amount', 'woocommerce-exporter' )
74
);
75
+ $fields[] = array(
76
+ 'name' => 'maximum_amount',
77
+ 'label' => __( 'Maximum Amount', 'woocommerce-exporter' )
78
+ );
79
$fields[] = array(
80
'name' => 'product_ids',
81
'label' => __( 'Products', 'woocommerce-exporter' )
94
);
95
$fields[] = array(
96
'name' => 'customer_email',
97
+ 'label' => __( 'Customer E-mails', 'woocommerce-exporter' )
98
);
99
$fields[] = array(
100
'name' => 'usage_limit',
104
'name' => 'expiry_date',
105
'label' => __( 'Expiry Date', 'woocommerce-exporter' )
106
);
107
+ $fields[] = array(
108
+ 'name' => 'usage_count',
109
+ 'label' => __( 'Usage Count', 'woocommerce-exporter' )
110
+ );
111
+ $fields[] = array(
112
+ 'name' => 'usage_cost',
113
+ 'label' => __( 'Usage Cost', 'woocommerce-exporter' )
114
+ );
115
+ $fields[] = array(
116
+ 'name' => 'used_by',
117
+ 'label' => __( 'Used By', 'woocommerce-exporter' )
118
+ );
119
+ $fields[] = array(
120
+ 'name' => 'used_in',
121
+ 'label' => __( 'Used In', 'woocommerce-exporter' )
122
+ );
123
124
/*
125
$fields[] = array(
151
152
case 'full':
153
default:
154
+ $sorting = woo_ce_get_option( sprintf( '%s_sorting', $export_type ), array() );
155
$size = count( $fields );
156
for( $i = 0; $i < $size; $i++ ) {
157
$fields[$i]['reset'] = $i;
167
168
}
169
170
+ // Check if we should override field labels from the Field Editor
171
function woo_ce_override_coupon_field_labels( $fields = array() ) {
172
173
$labels = woo_ce_get_option( 'coupon_labels', array() );
includes/customer.php CHANGED
@@ -99,7 +99,15 @@ function woo_ce_get_customer_fields( $format = 'full' ) {
99
);
100
$fields[] = array(
101
'name' => 'billing_address',
102
- 'label' => __( 'Billing: Street Address', 'woocommerce-exporter' )
103
);
104
$fields[] = array(
105
'name' => 'billing_city',
@@ -147,7 +155,15 @@ function woo_ce_get_customer_fields( $format = 'full' ) {
147
);
148
$fields[] = array(
149
'name' => 'shipping_address',
150
- 'label' => __( 'Shipping: Street Address', 'woocommerce-exporter' )
151
);
152
$fields[] = array(
153
'name' => 'shipping_city',
99
);
100
$fields[] = array(
101
'name' => 'billing_address',
102
+ 'label' => __( 'Billing: Street Address (Full)', 'woocommerce-exporter' )
103
+ );
104
+ $fields[] = array(
105
+ 'name' => 'billing_address_1',
106
+ 'label' => __( 'Billing: Street Address 1', 'woocommerce-exporter' )
107
+ );
108
+ $fields[] = array(
109
+ 'name' => 'billing_address_2',
110
+ 'label' => __( 'Billing: Street Address 2', 'woocommerce-exporter' )
111
);
112
$fields[] = array(
113
'name' => 'billing_city',
155
);
156
$fields[] = array(
157
'name' => 'shipping_address',
158
+ 'label' => __( 'Shipping: Street Address (Full)', 'woocommerce-exporter' )
159
+ );
160
+ $fields[] = array(
161
+ 'name' => 'shipping_address_1',
162
+ 'label' => __( 'Shipping: Street Address 1', 'woocommerce-exporter' )
163
+ );
164
+ $fields[] = array(
165
+ 'name' => 'shipping_address_2',
166
+ 'label' => __( 'Shipping: Street Address 2', 'woocommerce-exporter' )
167
);
168
$fields[] = array(
169
'name' => 'shipping_city',
includes/functions.php CHANGED
@@ -11,11 +11,15 @@ function woo_ce_load_export_types() {
11
include_once( WOO_CE_PATH . 'includes/customer.php' );
12
include_once( WOO_CE_PATH . 'includes/user.php' );
13
include_once( WOO_CE_PATH . 'includes/user-extend.php' );
14
include_once( WOO_CE_PATH . 'includes/coupon.php' );
15
include_once( WOO_CE_PATH . 'includes/subscription.php' );
16
include_once( WOO_CE_PATH . 'includes/product_vendor.php' );
17
include_once( WOO_CE_PATH . 'includes/commission.php' );
18
include_once( WOO_CE_PATH . 'includes/shipping_class.php' );
19
20
// Load the export type resources first
21
include_once( WOO_CE_PATH . 'includes/admin/product.php' );
@@ -142,6 +146,28 @@ if( is_admin() ) {
142
}
143
break;
144
145
case 'dismiss_archives_prompt':
146
// We need to verify the nonce.
147
if( !empty( $_GET ) && check_admin_referer( 'woo_ce_dismiss_archives_prompt' ) ) {
@@ -243,17 +269,20 @@ if( is_admin() ) {
243
// Displays a HTML notice when a WordPress or Store Exporter error is encountered
244
function woo_ce_admin_fail_notices() {
245
246
- $troubleshooting_url = 'http://www.visser.com.au/documentation/store-exporter/usage/';
247
248
// If the failed flag is set then prepare for an error notice
249
if( isset( $_GET['failed'] ) ) {
250
$message = '';
251
if( isset( $_GET['message'] ) )
252
$message = urldecode( $_GET['message'] );
253
- if( $message )
254
$message = sprintf( __( 'A WordPress or server error caused the exporter to fail, the exporter was provided with a reason: <em>%s</em>', 'woocommerce-exporter' ), $message ) . ' (<a href="' . $troubleshooting_url . '" target="_blank">' . __( 'Need help?', 'woocommerce-exporter' ) . '</a>)';
255
- else
256
$message = __( 'A WordPress or server error caused the exporter to fail, no reason was provided, if this persists please get in touch so we can reproduce and resolve this with you.', 'woocommerce-exporter' ) . ' (<a href="' . $troubleshooting_url . '" target="_blank">' . __( 'Need help?', 'woocommerce-exporter' ) . '</a>)';
257
woo_ce_admin_notice_html( $message, 'error' );
258
}
259
@@ -478,22 +507,6 @@ if( is_admin() ) {
478
}
479
add_action( 'edit_form_after_editor', 'woo_ce_read_export_file' );
480
481
- // Returns label of Export type slug used on Store Exporter screen
482
- function woo_ce_export_type_label( $export_type = '', $echo = false ) {
483
-
484
- $output = '';
485
- if( !empty( $export_type ) ) {
486
- $export_types = woo_ce_get_export_types();
487
- if( array_key_exists( $export_type, $export_types ) )
488
- $output = $export_types[$export_type];
489
- }
490
- if( $echo )
491
- echo $output;
492
- else
493
- return $output;
494
-
495
- }
496
-
497
// Returns a list of archived exports
498
function woo_ce_get_archive_files() {
499
@@ -979,16 +992,55 @@ function woo_ce_fatal_error() {
979
}
980
981
// List of Export types used on Store Exporter screen
982
- function woo_ce_get_export_types() {
983
984
- $types = array(
985
- 'product' => __( 'Products', 'woocommerce-exporter' ),
986
- 'category' => __( 'Categories', 'woocommerce-exporter' ),
987
- 'tag' => __( 'Tags', 'woocommerce-exporter' ),
988
- 'user' => __( 'Users', 'woocommerce-exporter' )
989
- );
990
- $types = apply_filters( 'woo_ce_export_types', $types );
991
- return $types;
992
993
}
994
@@ -1005,7 +1057,7 @@ function woo_ce_save_file_attachment( $filename = '', $post_mime_type = 'text/cs
1005
);
1006
$post_ID = wp_insert_attachment( $args, $filename );
1007
if( is_wp_error( $post_ID ) )
1008
- woo_ce_error_log( sprintf( 'save_file_attachment() - $s: %s', $filename, $result->get_error_message() ) );
1009
else
1010
return $post_ID;
1011
}
@@ -1345,6 +1397,13 @@ function woo_ce_modules_list( $module_status = false ) {
1345
'url' => 'http://www.woothemes.com/products/woocommerce-checkout-field-editor/',
1346
'function' => 'woocommerce_init_checkout_field_editor'
1347
);
1348
$modules[] = array(
1349
'name' => 'checkout_field_manager',
1350
'title' => __( 'Checkout Field Manager', 'woocommerce-exporter' ),
@@ -1751,7 +1810,7 @@ function woo_ce_modules_list( $module_status = false ) {
1751
'description' => __( 'Allows running fully multilingual e-Commerce sites with WooCommerce and WPML.', 'woocommerce-exporter' ),
1752
'url' => 'https://wordpress.org/plugins/woocommerce-multilingual/',
1753
'slug' => 'woocommerce-multilingual',
1754
- 'function' => 'wpml_wcml_startup'
1755
);
1756
$modules[] = array(
1757
'name' => 'wootabs',
@@ -1937,6 +1996,52 @@ function woo_ce_modules_list( $module_status = false ) {
1937
'slug' => 'woocommerce-gateway-stripe',
1938
'class' => 'WC_Stripe'
1939
);
1940
1941
// Ship to Multiple Addresses - WC_Ship_Multiple
1942
11
include_once( WOO_CE_PATH . 'includes/customer.php' );
12
include_once( WOO_CE_PATH . 'includes/user.php' );
13
include_once( WOO_CE_PATH . 'includes/user-extend.php' );
14
+ include_once( WOO_CE_PATH . 'includes/review.php' );
15
include_once( WOO_CE_PATH . 'includes/coupon.php' );
16
include_once( WOO_CE_PATH . 'includes/subscription.php' );
17
include_once( WOO_CE_PATH . 'includes/product_vendor.php' );
18
include_once( WOO_CE_PATH . 'includes/commission.php' );
19
include_once( WOO_CE_PATH . 'includes/shipping_class.php' );
20
+ include_once( WOO_CE_PATH . 'includes/ticket.php' );
21
+ include_once( WOO_CE_PATH . 'includes/attribute.php' );
22
+ include_once( WOO_CE_PATH . 'includes/booking.php' );
23
24
// Load the export type resources first
25
include_once( WOO_CE_PATH . 'includes/admin/product.php' );
146
}
147
break;
148
149
+ case 'dismiss_overview_prompt':
150
+ // We need to verify the nonce.
151
+ if( !empty( $_GET ) && check_admin_referer( 'woo_ce_dismiss_overview_prompt' ) ) {
152
+ // Remember that we've dismissed this notice
153
+ woo_ce_update_option( 'dismiss_overview_prompt', 1 );
154
+ $url = add_query_arg( array( 'action' => null, '_wpnonce' => null ) );
155
+ wp_redirect( $url );
156
+ exit();
157
+ }
158
+ break;
159
+
160
+ case 'dismiss_quick_export_prompt':
161
+ // We need to verify the nonce.
162
+ if( !empty( $_GET ) && check_admin_referer( 'woo_ce_dismiss_quick_export_prompt' ) ) {
163
+ // Remember that we've dismissed this notice
164
+ woo_ce_update_option( 'dismiss_quick_export_prompt', 1 );
165
+ $url = add_query_arg( array( 'action' => null, '_wpnonce' => null ) );
166
+ wp_redirect( $url );
167
+ exit();
168
+ }
169
+ break;
170
+
171
case 'dismiss_archives_prompt':
172
// We need to verify the nonce.
173
if( !empty( $_GET ) && check_admin_referer( 'woo_ce_dismiss_archives_prompt' ) ) {
269
// Displays a HTML notice when a WordPress or Store Exporter error is encountered
270
function woo_ce_admin_fail_notices() {
271
272
+ $troubleshooting_url = 'https://www.visser.com.au/documentation/store-exporter-deluxe/troubleshooting/';
273
274
// If the failed flag is set then prepare for an error notice
275
if( isset( $_GET['failed'] ) ) {
276
$message = '';
277
if( isset( $_GET['message'] ) )
278
$message = urldecode( $_GET['message'] );
279
+ if( $message ) {
280
$message = sprintf( __( 'A WordPress or server error caused the exporter to fail, the exporter was provided with a reason: <em>%s</em>', 'woocommerce-exporter' ), $message ) . ' (<a href="' . $troubleshooting_url . '" target="_blank">' . __( 'Need help?', 'woocommerce-exporter' ) . '</a>)';
281
+ $message .= ' (<a href="' . $troubleshooting_url . '" target="_blank">' . __( 'Need help?', 'woocommerce-exporter' ) . '</a>)';
282
+ } else {
283
$message = __( 'A WordPress or server error caused the exporter to fail, no reason was provided, if this persists please get in touch so we can reproduce and resolve this with you.', 'woocommerce-exporter' ) . ' (<a href="' . $troubleshooting_url . '" target="_blank">' . __( 'Need help?', 'woocommerce-exporter' ) . '</a>)';
284
+ $message .= ' (<a href="' . $troubleshooting_url . '" target="_blank">' . __( 'Need help?', 'woocommerce-exporter' ) . '</a>)';
285
+ }
286
woo_ce_admin_notice_html( $message, 'error' );
287
}
288
507
}
508
add_action( 'edit_form_after_editor', 'woo_ce_read_export_file' );
509
510
// Returns a list of archived exports
511
function woo_ce_get_archive_files() {
512
992
}
993
994
// List of Export types used on Store Exporter screen
995
+ function woo_ce_get_export_types( $plural = true ) {
996
+
997
+ $export_types = array(
998
+ 'product' => ( $plural ? __( 'Products', 'woocommerce-exporter' ) : __( 'Product', 'woocommerce-exporter' ) ),
999
+ 'category' => ( $plural ? __( 'Categories', 'woocommerce-exporter' ) : __( 'Category', 'woocommerce-exporter' ) ),
1000
+ 'tag' => ( $plural ? __( 'Tags', 'woocommerce-exporter' ) : __( 'Tag', 'woocommerce-exporter' ) ),
1001
+ 'brand' => ( $plural ? __( 'Brands', 'woocommerce-exporter' ) : __( 'Brand', 'woocommerce-exporter' ) ),
1002
+ 'order' => ( $plural ? __( 'Orders', 'woocommerce-exporter' ) : __( 'Order', 'woocommerce-exporter' ) ),
1003
+ 'customer' => ( $plural ? __( 'Customers', 'woocommerce-exporter' ) : __( 'Customer', 'woocommerce-exporter' ) ),
1004
+ 'user' => ( $plural ? __( 'Users', 'woocommerce-exporter' ) : __( 'User', 'woocommerce-exporter' ) ),
1005
+ 'review' => ( $plural ? __( 'Reviews', 'woocommerce-exporter' ) : __( 'Review', 'woocommerce-exporter' ) ),
1006
+ 'coupon' => ( $plural ? __( 'Coupons', 'woocommerce-exporter' ) : __( 'Coupon', 'woocommerce-exporter' ) ),
1007
+ 'subscription' => ( $plural ? __( 'Subscriptions', 'woocommerce-exporter' ) : __( 'Subscription', 'woocommerce-exporter' ) ),
1008
+ 'product_vendor' => ( $plural ? __( 'Product Vendors', 'woocommerce-exporter' ) : __( 'Product Vendor', 'woocommerce-exporter' ) ),
1009
+ 'commission' => ( $plural ? __( 'Commissions', 'woocommerce-exporter' ) : __( 'Commission', 'woocommerce-exporter' ) ),
1010
+ 'shipping_class' => ( $plural ? __( 'Shipping Classes', 'woocommerce-exporter' ) : __( 'Shipping Class', 'woocommerce-exporter' ) ),
1011
+ 'ticket' => ( $plural ? __( 'Tickets', 'woocommerce-exporter' ) : __( 'Ticket', 'woocommerce-exporter' ) ),
1012
+ 'booking' => ( $plural ? __( 'Bookings', 'woocommerce-exporter' ) : __( 'Booking', 'woocommerce-exporter' ) ),
1013
+ 'attribute' => ( $plural ? __( 'Attributes', 'woocommerce-exporter' ) : __( 'Attribute', 'woocommerce-exporter' ) )
1014
+ );
1015
+ return $export_types;
1016
1017
+ }
1018
+
1019
+ // Returns label of Export type slug used on Store Exporter screen
1020
+ function woo_ce_export_type_label( $export_type = '', $echo = false, $plural = true ) {
1021
+
1022
+ $output = '';
1023
+ if( !empty( $export_type ) ) {
1024
+ $export_types = woo_ce_get_export_types( $plural );
1025
+ if( array_key_exists( $export_type, $export_types ) )
1026
+ $output = $export_types[$export_type];
1027
+ }
1028
+ if( $echo )
1029
+ echo $output;
1030
+ else
1031
+ return $output;
1032
+
1033
+ }
1034
+
1035
+ function woo_ce_get_export_type_label( $export_type = '', $plural = true ) {
1036
+
1037
+ $output = $export_type;
1038
+ if( !empty( $export_type ) ) {
1039
+ $export_types = woo_ce_get_export_types( $plural );
1040
+ // Check our export type exists
1041
+ $output = ( isset( $export_types[$export_type] ) ? $export_types[$export_type] : $output );
1042
+ }
1043
+ return $output;
1044
1045
}
1046
1057
);
1058
$post_ID = wp_insert_attachment( $args, $filename );
1059
if( is_wp_error( $post_ID ) )
1060
+ woo_ce_error_log( sprintf( 'Warning: %s', sprintf( 'save_file_attachment() - $s: %s', $filename, $result->get_error_message() ) ) );
1061
else
1062
return $post_ID;
1063
}
1397
'url' => 'http://www.woothemes.com/products/woocommerce-checkout-field-editor/',
1398
'function' => 'woocommerce_init_checkout_field_editor'
1399
);
1400
+ $modules[] = array(
1401
+ 'name' => 'checkout_field_editor_pro',
1402
+ 'title' => __( 'Checkout Field Editor Pro', 'woocommerce-exporter' ),
1403
+ 'description' => __( 'Design woocommerce checkout form in your own way, customize checkout fields (Add, Edit, Delete and re arrange fields).', 'woocommerce-exporter' ),
1404
+ 'url' => 'https://www.themehigh.com/product/woocommerce-checkout-field-editor-pro/',
1405
+ 'class' => 'WCFE_Checkout_Field_Editor'
1406
+ );
1407
$modules[] = array(
1408
'name' => 'checkout_field_manager',
1409
'title' => __( 'Checkout Field Manager', 'woocommerce-exporter' ),
1810
'description' => __( 'Allows running fully multilingual e-Commerce sites with WooCommerce and WPML.', 'woocommerce-exporter' ),
1811
'url' => 'https://wordpress.org/plugins/woocommerce-multilingual/',
1812
'slug' => 'woocommerce-multilingual',
1813
+ 'class' => 'woocommerce_wpml'
1814
);
1815
$modules[] = array(
1816
'name' => 'wootabs',
1996
'slug' => 'woocommerce-gateway-stripe',
1997
'class' => 'WC_Stripe'
1998
);
1999
+ $modules[] = array(
2000
+ 'name' => 'yith_ywpi',
2001
+ 'title' => __( 'YITH WooCommerce PDF Invoice and Shipping List', 'woocommerce-exporter' ),
2002
+ 'description' => __( 'Generate PDF invoices for WooCommerce orders. Set manual or automatic invoice generation and shipping list document.', 'woocommerce-exporter' ),
2003
+ 'url' => 'https://wordpress.org/plugins/yith-woocommerce-pdf-invoice/',
2004
+ 'slug' => 'yith-woocommerce-pdf-invoice',
2005
+ 'function' => 'yith_ywpi_init'
2006
+ );
2007
+ $modules[] = array(
2008
+ 'name' => 'alg_con',
2009
+ 'title' => __( 'Custom Order Numbers for WooCommerce', 'woocommerce-exporter' ),
2010
+ 'description' => __( 'Custom order numbers for WooCommerce.', 'woocommerce-exporter' ),
2011
+ 'url' => 'https://wordpress.org/plugins/custom-order-numbers-for-woocommerce/',
2012
+ 'slug' => 'custom-order-numbers-for-woocommerce',
2013
+ 'class' => 'Alg_WC_Custom_Order_Numbers'
2014
+ );
2015
+ $modules[] = array(
2016
+ 'name' => 'ign_gift_certs',
2017
+ 'title' => __( 'WooCommerce Gift Certificates Pro', 'woocommerce-exporter' ),
2018
+ 'description' => __( 'WooCommerce Gift Certificates Pro allows you to sell gift certificates / store credits / coupon codes as products in your store.', 'woocommerce-exporter' ),
2019
+ 'url' => 'https://ignitewoo.com/woocommerce-extensions-plugins-themes/woocommerce-gift-certificates-pro/',
2020
+ 'class' => 'Ignite_Gift_Certs'
2021
+ );
2022
+ $modules[] = array(
2023
+ 'name' => 'wc_fields_factory',
2024
+ 'title' => __( 'WC Fields Factory', 'woocommerce-exporter' ),
2025
+ 'description' => __( 'Sell your products with customized, personalised options. Add custom fields or fields group to your products, your admin screens and customize everything.', 'woocommerce-exporter' ),
2026
+ 'url' => 'https://wordpress.org/plugins/wc-fields-factory/',
2027
+ 'slug' => 'wc-fields-factory',
2028
+ 'class' => 'wcff'
2029
+ );
2030
+ $modules[] = array(
2031
+ 'name' => 'wc_upload_files',
2032
+ 'title' => __( 'WooCommerce Upload Files', 'woocommerce-exporter' ),
2033
+ 'description' => __( 'WCUF plugin allows your customers to attach files to their orders according to the purchased products.', 'woocommerce-exporter' ),
2034
+ 'url' => 'https://codecanyon.net/item/woocommerce-upload-files/11442983',
2035
+ 'function' => 'wcuf_init'
2036
+ );
2037
+ $modules[] = array(
2038
+ 'name' => 'wc_ecr_gcr',
2039
+ 'title' => __( 'Google Customer Reviews for WooCommerce', 'woocommerce-exporter' ),
2040
+ 'description' => __( 'Integrates Google Merchant Center\'s Google Customer Reviews survey opt-in and badge into your WooCommerce store.', 'woocommerce-exporter' ),
2041
+ 'url' => 'https://wordpress.org/plugins/ecr-google-customer-reviews/',
2042
+ 'slug' => 'ecr-google-customer-reviews',
2043
+ 'function' => 'ecr_gcr_missing_wc_notice'
2044
+ );
2045
2046
// Ship to Multiple Addresses - WC_Ship_Multiple
2047
includes/order.php CHANGED
@@ -163,6 +163,18 @@ function woo_ce_get_order_fields( $format = 'full', $post_ID = 0 ) {
163
'name' => 'order_key',
164
'label' => __( 'Order Key', 'woocommerce-exporter' )
165
);
166
$fields[] = array(
167
'name' => 'purchase_date',
168
'label' => __( 'Order Date', 'woocommerce-exporter' )
@@ -443,10 +455,18 @@ function woo_ce_get_order_fields( $format = 'full', $post_ID = 0 ) {
443
'name' => 'order_items_stock',
444
'label' => __( 'Order Items: Stock', 'woocommerce-exporter' )
445
);
446
$fields[] = array(
447
'name' => 'order_items_tax',
448
'label' => __( 'Order Items: Tax', 'woocommerce-exporter' )
449
);
450
$fields[] = array(
451
'name' => 'order_items_tax_subtotal',
452
'label' => __( 'Order Items: Tax Subtotal', 'woocommerce-exporter' )
163
'name' => 'order_key',
164
'label' => __( 'Order Key', 'woocommerce-exporter' )
165
);
166
+ $fields[] = array(
167
+ 'name' => 'transaction_id',
168
+ 'label' => __( 'Transaction ID', 'woocommerce-exporter' )
169
+ );
170
+ $fields[] = array(
171
+ 'name' => 'created_via',
172
+ 'label' => __( 'Created Via', 'woocommerce-exporter' )
173
+ );
174
+ $fields[] = array(
175
+ 'name' => 'cart_hash',
176
+ 'label' => __( 'Cart Hash', 'woocommerce-exporter' )
177
+ );
178
$fields[] = array(
179
'name' => 'purchase_date',
180
'label' => __( 'Order Date', 'woocommerce-exporter' )
455
'name' => 'order_items_stock',
456
'label' => __( 'Order Items: Stock', 'woocommerce-exporter' )
457
);
458
+ $fields[] = array(
459
+ 'name' => 'order_items_shipping_class',
460
+ 'label' => __( 'Order Items: Shipping Class', 'woocommerce-exporter' )
461
+ );
462
$fields[] = array(
463
'name' => 'order_items_tax',
464
'label' => __( 'Order Items: Tax', 'woocommerce-exporter' )
465
);
466
+ $fields[] = array(
467
+ 'name' => 'order_items_tax_percentage',
468
+ 'label' => __( 'Order Items: Tax Percentage', 'woocommerce-exporter' )
469
+ );
470
$fields[] = array(
471
'name' => 'order_items_tax_subtotal',
472
'label' => __( 'Order Items: Tax Subtotal', 'woocommerce-exporter' )
includes/product.php CHANGED
@@ -334,6 +334,18 @@ function woo_ce_get_product_fields( $format = 'full' ) {
334
'name' => 'menu_order',
335
'label' => __( 'Sort Order', 'woocommerce-exporter' )
336
);
337
338
/*
339
$fields[] = array(
@@ -443,8 +455,8 @@ function woo_ce_get_products( $args = array() ) {
443
444
$limit_volume = -1;
445
$offset = 0;
446
- $product_categories = false;
447
- $product_tags = false;
448
$product_status = false;
449
$product_type = false;
450
$orderby = 'ID';
@@ -452,10 +464,10 @@ function woo_ce_get_products( $args = array() ) {
452
if( $args ) {
453
$limit_volume = ( isset( $args['limit_volume'] ) ? $args['limit_volume'] : false );
454
$offset = ( isset( $args['offset'] ) ? $args['offset'] : false );
455
- if( !empty( $args['product_categories'] ) )
456
- $product_categories = $args['product_categories'];
457
- if( !empty( $args['product_tags'] ) )
458
- $product_tags = $args['product_tags'];
459
if( !empty( $args['product_status'] ) )
460
$product_status = $args['product_status'];
461
if( !empty( $args['product_type'] ) )
@@ -477,7 +489,7 @@ function woo_ce_get_products( $args = array() ) {
477
'suppress_filters' => false
478
);
479
// Filter Products by Product Category
480
- if( $product_categories ) {
481
$term_taxonomy = 'product_cat';
482
// Check if tax_query has been created
483
if( !isset( $args['tax_query'] ) )
@@ -486,12 +498,13 @@ function woo_ce_get_products( $args = array() ) {
486
array(
487
'taxonomy' => $term_taxonomy,
488
'field' => 'id',
489
- 'terms' => $product_categories
490
)
491
);
492
}
493
// Filter Products by Product Tag
494
- if( $product_tags ) {
495
$term_taxonomy = 'product_tag';
496
// Check if tax_query has been created
497
if( !isset( $args['tax_query'] ) )
@@ -500,7 +513,7 @@ function woo_ce_get_products( $args = array() ) {
500
array(
501
'taxonomy' => $term_taxonomy,
502
'field' => 'id',
503
- 'terms' => $product_tags
504
)
505
);
506
}
@@ -568,8 +581,8 @@ function woo_ce_get_product_data( $product_id = 0, $args = array() ) {
568
569
$product = get_post( $product_id );
570
$_product = ( function_exists( 'wc_get_product' ) ? wc_get_product( $product_id ) : false );
571
- // Check for corrupt Products
572
- if( $_product == false )
573
return false;
574
575
$product->parent_id = '';
@@ -588,6 +601,8 @@ function woo_ce_get_product_data( $product_id = 0, $args = array() ) {
588
$product->permalink = get_permalink( $product_id );
589
$product->product_url = ( method_exists( $_product, 'get_permalink' ) ? $_product->get_permalink() : get_permalink( $product_id ) );
590
$product->slug = $product->post_name;
591
$product->description = woo_ce_format_description_excerpt( $product->post_content );
592
$product->excerpt = woo_ce_format_description_excerpt( $product->post_excerpt );
593
$product->regular_price = get_post_meta( $product_id, '_regular_price', true );
@@ -614,11 +629,14 @@ function woo_ce_get_product_data( $product_id = 0, $args = array() ) {
614
// Override the Product Type for Variations
615
$product->type = __( 'Variation', 'woocommerce-exporter' );
616
}
617
- if( version_compare( woo_get_woo_version(), '3.0', '>=' ) )
618
$product->visibility = woo_ce_format_product_visibility( $product_id );
619
- else
620
$product->visibility = woo_ce_format_product_visibility( $product_id, get_post_meta( $product_id, '_visibility', true ) );
621
- $product->featured = woo_ce_format_switch( get_post_meta( $product_id, '_featured', true ) );
622
$product->virtual = woo_ce_format_switch( get_post_meta( $product_id, '_virtual', true ) );
623
$product->downloadable = woo_ce_format_switch( get_post_meta( $product_id, '_downloadable', true ) );
624
$product->weight = get_post_meta( $product_id, '_weight', true );
334
'name' => 'menu_order',
335
'label' => __( 'Sort Order', 'woocommerce-exporter' )
336
);
337
+ $fields[] = array(
338
+ 'name' => 'post_author',
339
+ 'label' => __( 'Post Author', 'woocommerce-exporter' )
340
+ );
341
+ $fields[] = array(
342
+ 'name' => 'user_name',
343
+ 'label' => __( 'Username', 'woocommerce-exporter' )
344
+ );
345
+ $fields[] = array(
346
+ 'name' => 'user_role',
347
+ 'label' => __( 'User Role', 'woocommerce-exporter' )
348
+ );
349
350
/*
351
$fields[] = array(
455
456
$limit_volume = -1;
457
$offset = 0;
458
+ $product_category = false;
459
+ $product_tag = false;
460
$product_status = false;
461
$product_type = false;
462
$orderby = 'ID';
464
if( $args ) {
465
$limit_volume = ( isset( $args['limit_volume'] ) ? $args['limit_volume'] : false );
466
$offset = ( isset( $args['offset'] ) ? $args['offset'] : false );
467
+ if( !empty( $args['product_category'] ) )
468
+ $product_category = $args['product_category'];
469
+ if( !empty( $args['product_tag'] ) )
470
+ $product_tag = $args['product_tag'];
471
if( !empty( $args['product_status'] ) )
472
$product_status = $args['product_status'];
473
if( !empty( $args['product_type'] ) )
489
'suppress_filters' => false
490
);
491
// Filter Products by Product Category
492
+ if( $product_category ) {
493
$term_taxonomy = 'product_cat';
494
// Check if tax_query has been created
495
if( !isset( $args['tax_query'] ) )
498
array(
499
'taxonomy' => $term_taxonomy,
500
'field' => 'id',
501
+ 'terms' => $product_category
502
)
503
);
504
}
505
+
506
// Filter Products by Product Tag
507
+ if( $product_tag ) {
508
$term_taxonomy = 'product_tag';
509
// Check if tax_query has been created
510
if( !isset( $args['tax_query'] ) )
513
array(
514
'taxonomy' => $term_taxonomy,
515
'field' => 'id',
516
+ 'terms' => $product_tag
517
)
518
);
519
}
581
582
$product = get_post( $product_id );
583
$_product = ( function_exists( 'wc_get_product' ) ? wc_get_product( $product_id ) : false );
584
+ // Check for corrupt Products, and old school WooCommerce...
585
+ if( !version_compare( woo_get_woo_version(), '2.2', '<' ) && $_product == false )
586
return false;
587
588
$product->parent_id = '';
601
$product->permalink = get_permalink( $product_id );
602
$product->product_url = ( method_exists( $_product, 'get_permalink' ) ? $_product->get_permalink() : get_permalink( $product_id ) );
603
$product->slug = $product->post_name;
604
+ $product->user_name = woo_ce_get_username( $product->post_author );
605
+ $product->user_role = woo_ce_format_user_role_label( woo_ce_get_user_role( $product->post_author ) );
606
$product->description = woo_ce_format_description_excerpt( $product->post_content );
607
$product->excerpt = woo_ce_format_description_excerpt( $product->post_excerpt );
608
$product->regular_price = get_post_meta( $product_id, '_regular_price', true );
629
// Override the Product Type for Variations
630
$product->type = __( 'Variation', 'woocommerce-exporter' );
631
}
632
+ if( version_compare( woo_get_woo_version(), '3.0', '>=' ) ) {
633
$product->visibility = woo_ce_format_product_visibility( $product_id );
634
+ $term_taxonomy = 'product_visibility';
635
+ $product->featured = woo_ce_format_switch( has_term( 'featured', $term_taxonomy, $product_id ) );
636
+ } else {
637
$product->visibility = woo_ce_format_product_visibility( $product_id, get_post_meta( $product_id, '_visibility', true ) );
638
+ $product->featured = woo_ce_format_switch( get_post_meta( $product_id, '_featured', true ) );
639
+ }
640
$product->virtual = woo_ce_format_switch( get_post_meta( $product_id, '_virtual', true ) );
641
$product->downloadable = woo_ce_format_switch( get_post_meta( $product_id, '_downloadable', true ) );
642
$product->weight = get_post_meta( $product_id, '_weight', true );
includes/review.php ADDED
@@ -0,0 +1,88 @@
1
+ <?php
2
+ // Returns a list of Review export columns
3
+ function woo_ce_get_review_fields( $format = 'full' ) {
4
+
5
+ $export_type = 'review';
6
+
7
+ $fields = array();
8
+ $fields[] = array(
9
+ 'name' => 'comment_ID',
10
+ 'label' => __( 'Review ID', 'woocommerce-exporter' )
11
+ );
12
+ $fields[] = array(
13
+ 'name' => 'comment_post_ID',
14
+ 'label' => __( 'Product ID', 'woocommerce-exporter' )
15
+ );
16
+ $fields[] = array(
17
+ 'name' => 'sku',
18
+ 'label' => __( 'Product SKU', 'woocommerce-exporter' )
19
+ );
20
+ $fields[] = array(
21
+ 'name' => 'product_name',
22
+ 'label' => __( 'Product Name', 'woocommerce-exporter' )
23
+ );
24
+ $fields[] = array(
25
+ 'name' => 'comment_author',
26
+ 'label' => __( 'Reviewer', 'woocommerce-exporter' )
27
+ );
28
+ $fields[] = array(
29
+ 'name' => 'comment_author_email',
30
+ 'label' => __( 'E-mail', 'woocommerce-exporter' )
31
+ );
32
+ $fields[] = array(
33
+ 'name' => 'comment_content',
34
+ 'label' => __( 'Content', 'woocommerce-exporter' )
35
+ );
36
+ $fields[] = array(
37
+ 'name' => 'comment_date',
38
+ 'label' => __( 'Review Date', 'woocommerce-exporter' )
39
+ );
40
+ $fields[] = array(
41
+ 'name' => 'rating',
42
+ 'label' => __( 'Rating', 'woocommerce-exporter' )
43
+ );
44
+ $fields[] = array(
45
+ 'name' => 'verified',
46
+ 'label' => __( 'Verified', 'woocommerce-exporter' )
47
+ );
48
+ $fields[] = array(
49
+ 'name' => 'comment_author_IP',
50
+ 'label' => __( 'IP Address', 'woocommerce-exporter' )
51
+ );
52
+
53
+ /*
54
+ $fields[] = array(
55
+ 'name' => '',
56
+ 'label' => __( '', 'woocommerce-exporter' )
57
+ );
58
+ */
59
+
60
+ switch( $format ) {
61
+
62
+ case 'summary':
63
+ $output = array();
64
+ $size = count( $fields );
65
+ for( $i = 0; $i < $size; $i++ ) {
66
+ if( isset( $fields[$i] ) )
67
+ $output[$fields[$i]['name']] = 'on';
68
+ }
69
+ return $output;
70
+ break;
71
+
72
+ case 'full':
73
+ default:
74
+ $sorting = woo_ce_get_option( sprintf( '%s_sorting', $export_type ), array() );
75
+ $size = count( $fields );
76
+ for( $i = 0; $i < $size; $i++ ) {
77
+ $fields[$i]['reset'] = $i;
78
+ $fields[$i]['order'] = ( isset( $sorting[$fields[$i]['name']] ) ? $sorting[$fields[$i]['name']] : $i );
79
+ }
80
+ // Check if we are using PHP 5.3 and above
81
+ if( version_compare( phpversion(), '5.3' ) >= 0 )
82
+ usort( $fields, woo_ce_sort_fields( 'order' ) );
83
+ return $fields;
84
+ break;
85
+
86
+ }
87
+ }
88
+ ?>
includes/settings.php CHANGED
@@ -102,6 +102,7 @@ function woo_ce_export_settings_extend() {
102
103
// Orders Screen
104
$order_actions_csv = 1;
105
$order_actions_xml = 0;
106
$order_actions_xls = 1;
107
$order_actions_xlsx = 1;
@@ -117,7 +118,7 @@ function woo_ce_export_settings_extend() {
117
</tr>
118
<tr>
119
<th>
120
- <label><?php _e( 'Attribute display', 'woocommerce-exporter' ); ?></label>
121
</th>
122
<td>
123
<ul>
@@ -169,6 +170,7 @@ function woo_ce_export_settings_extend() {
169
<p class="description"><?php _e( 'A description of your data feed.', 'woocommerce-exporter' ); ?></p>
170
</td>
171
</tr>
172
173
<tr id="scheduled-exports">
174
<td colspan="2" style="padding:0;">
@@ -180,9 +182,7 @@ function woo_ce_export_settings_extend() {
180
</td>
181
</tr>
182
<tr>
183
- <th>
184
- <label for="enable_auto"><?php _e( 'Enable scheduled exports', 'woocommerce-exporter' ); ?></label>
185
- </th>
186
<td>
187
<select id="enable_auto" name="enable_auto">
188
<option value="1" disabled="disabled"><?php _e( 'Yes', 'woocommerce-exporter' ); ?></option>
@@ -548,14 +548,15 @@ function woo_ce_export_settings_extend() {
548
</tr>
549
<tr>
550
<th>
551
- <label><?php _e( 'Actions display', 'woocommerce-exporter' ); ?></label>
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_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>
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
</ul>
560
<p class="description"><?php _e( 'Control the visibility of different Order actions on the WooCommerce &raquo; Orders screen.', 'woocommerce-exporter' ); ?></p>
561
</td>
@@ -568,18 +569,19 @@ function woo_ce_export_settings_extend() {
568
function woo_ce_export_settings_save() {
569
570
// Strip file extension from export filename
571
- $export_filename = strip_tags( (string)$_POST['export_filename'] );
572
woo_ce_update_option( 'export_filename', $export_filename );
573
- woo_ce_update_option( 'delete_file', sanitize_text_field( absint( $_POST['delete_file'] ) ) );
574
- woo_ce_update_option( 'encoding', sanitize_text_field( (string)$_POST['encoding'] ) );
575
- woo_ce_update_option( 'delimiter', sanitize_text_field( (string)$_POST['delimiter'] ) );
576
- woo_ce_update_option( 'category_separator', sanitize_text_field( (string)$_POST['category_separator'] ) );
577
woo_ce_update_option( 'bom', absint( $_POST['bom'] ) );
578
- woo_ce_update_option( 'escape_formatting', sanitize_text_field( (string)$_POST['escape_formatting'] ) );
579
- if( $_POST['date_format'] == 'custom' && !empty( $_POST['date_format_custom'] ) )
580
- woo_ce_update_option( 'date_format', sanitize_text_field( (string)$_POST['date_format_custom'] ) );
581
- else
582
- woo_ce_update_option( 'date_format', sanitize_text_field( (string)$_POST['date_format'] ) );
583
584
$message = __( 'Changes have been saved.', 'woocommerce-exporter' );
585
woo_ce_admin_notice( $message );
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;
118
</tr>
119
<tr>
120
<th>
121
+ <?php _e( 'Attribute display', 'woocommerce-exporter' ); ?>
122
</th>
123
<td>
124
<ul>
170
<p class="description"><?php _e( 'A description of your data feed.', 'woocommerce-exporter' ); ?></p>
171
</td>
172
</tr>
173
+ <!-- #rss-settings -->
174
175
<tr id="scheduled-exports">
176
<td colspan="2" style="padding:0;">
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>
548
</tr>
549
<tr>
550
<th>
551
+ <?php _e( 'Actions display', 'woocommerce-exporter' ); ?>
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>
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'] ) );
575
+ woo_ce_update_option( 'encoding', sanitize_text_field( $_POST['encoding'] ) );
576
+ woo_ce_update_option( 'delimiter', sanitize_text_field( $_POST['delimiter'] ) );
577
+ woo_ce_update_option( 'category_separator', sanitize_text_field( $_POST['category_separator'] ) );
578
woo_ce_update_option( 'bom', absint( $_POST['bom'] ) );
579
+ woo_ce_update_option( 'escape_formatting', sanitize_text_field( $_POST['escape_formatting'] ) );
580
+ if( $_POST['date_format'] == 'custom' && !empty( $_POST['date_format_custom'] ) ) {
581
+ woo_ce_update_option( 'date_format', sanitize_text_field( $_POST['date_format_custom'] ) );
582
+ } else {
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 );
includes/subscription.php CHANGED
@@ -84,22 +84,27 @@ if( is_admin() ) {
84
85
}
86
87
function woo_ce_get_subscription_fields( $format = 'full' ) {
88
89
$export_type = 'subscription';
90
91
$fields = array();
92
$fields[] = array(
93
- 'name' => 'key',
94
- 'label' => __( 'Subscription Key', 'woocommerce-exporter' )
95
);
96
$fields[] = array(
97
'name' => 'status',
98
'label' => __( 'Subscription Status', 'woocommerce-exporter' )
99
);
100
$fields[] = array(
101
- 'name' => 'name',
102
- 'label' => __( 'Subscription Name', 'woocommerce-exporter' )
103
);
104
$fields[] = array(
105
'name' => 'user',
@@ -109,14 +114,6 @@ function woo_ce_get_subscription_fields( $format = 'full' ) {
109
'name' => 'user_id',
110
'label' => __( 'User ID', 'woocommerce-exporter' )
111
);
112
- $fields[] = array(
113
- 'name' => 'email',
114
- 'label' => __( 'E-mail Address', 'woocommerce-exporter' )
115
- );
116
- $fields[] = array(
117
- 'name' => 'order_id',
118
- 'label' => __( 'Order ID', 'woocommerce-exporter' )
119
- );
120
$fields[] = array(
121
'name' => 'order_status',
122
'label' => __( 'Order Status', 'woocommerce-exporter' )
@@ -130,12 +127,12 @@ function woo_ce_get_subscription_fields( $format = 'full' ) {
130
);
131
}
132
$fields[] = array(
133
- 'name' => 'start_date',
134
- 'label' => __( 'Start Date', 'woocommerce-exporter' )
135
);
136
$fields[] = array(
137
- 'name' => 'expiration',
138
- 'label' => __( 'Expiration', 'woocommerce-exporter' )
139
);
140
$fields[] = array(
141
'name' => 'end_date',
@@ -154,25 +151,190 @@ function woo_ce_get_subscription_fields( $format = 'full' ) {
154
'label' => __( 'Next Payment', 'woocommerce-exporter' )
155
);
156
$fields[] = array(
157
- 'name' => 'renewals',
158
- 'label' => __( 'Renewals', 'woocommerce-exporter' )
159
);
160
$fields[] = array(
161
- 'name' => 'product_id',
162
- 'label' => __( 'Product ID', 'woocommerce-exporter' )
163
);
164
$fields[] = array(
165
- 'name' => 'product_sku',
166
- 'label' => __( 'Product SKU', 'woocommerce-exporter' )
167
);
168
$fields[] = array(
169
- 'name' => 'variation_id',
170
- 'label' => __( 'Variation ID', 'woocommerce-exporter' )
171
);
172
$fields[] = array(
173
'name' => 'coupon',
174
'label' => __( 'Coupon Code', 'woocommerce-exporter' )
175
);