WooCommerce – Store Exporter - Version 2.0

Version Description

  • Added: Quick Export button to the Export Types section
  • Added: Quick Export button to the Admin bar
  • Changed: Moved the donation link to the right of the Store Export tabs
Download this release

Release Info

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

Code changes from version 1.9.6 to 2.0

exporter.php CHANGED
@@ -3,7 +3,7 @@
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.6
7
Author: Visser Labs
8
Author URI: http://www.visser.com.au/about/
9
License: GPL2
@@ -500,7 +500,6 @@ if( is_admin() ) {
500
501
$title = apply_filters( 'woo_ce_template_header', __( 'Store Exporter', 'woocommerce-exporter' ) );
502
woo_ce_template_header( $title );
503
- woo_ce_support_donate();
504
$action = ( function_exists( 'woo_get_action' ) ? woo_get_action() : false );
505
switch( $action ) {
506
3
Plugin Name: WooCommerce - Store Exporter
4
Plugin URI: http://www.visser.com.au/woocommerce/plugins/exporter/
5
Description: Export store details out of WooCommerce into simple formatted files (e.g. CSV, TSV, Excel formats including XLS and XLSX, XML, etc.)
6
+ Version: 2.0
7
Author: Visser Labs
8
Author URI: http://www.visser.com.au/about/
9
License: GPL2
500
501
$title = apply_filters( 'woo_ce_template_header', __( 'Store Exporter', 'woocommerce-exporter' ) );
502
woo_ce_template_header( $title );
503
$action = ( function_exists( 'woo_get_action' ) ? woo_get_action() : false );
504
switch( $action ) {
505
includes/admin.php CHANGED
@@ -218,6 +218,25 @@ function woo_ce_enqueue_scripts() {
218
219
}
220
221
function woo_ce_admin_current_screen() {
222
223
$screen = get_current_screen();
@@ -235,6 +254,8 @@ function woo_ce_admin_current_screen() {
235
'<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>'
236
) );
237
238
// This function only runs on the Quick Export screen
239
add_action( 'admin_footer', 'woo_ce_admin_export_footer_javascript' );
240
break;
@@ -658,6 +679,7 @@ function woo_ce_export_export_types() {
658
<?php echo $product; ?>
659
</td>
660
<td width="1%" class="actions">
661
</td>
662
</tr>
663
@@ -672,6 +694,7 @@ function woo_ce_export_export_types() {
672
<?php echo $category; ?>
673
</td>
674
<td width="1%" class="actions">
675
</td>
676
</tr>
677
@@ -686,6 +709,7 @@ function woo_ce_export_export_types() {
686
<?php echo $tag; ?>
687
</td>
688
<td width="1%" class="actions">
689
</td>
690
</tr>
691
@@ -701,6 +725,7 @@ function woo_ce_export_export_types() {
701
<span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
702
</td>
703
<td width="1%" class="actions">
704
</td>
705
</tr>
706
@@ -715,6 +740,7 @@ function woo_ce_export_export_types() {
715
<?php echo $order; ?>
716
</td>
717
<td width="1%" class="actions">
718
</td>
719
</tr>
720
@@ -730,6 +756,7 @@ function woo_ce_export_export_types() {
730
<span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
731
</td>
732
<td width="1%" class="actions">
733
</td>
734
</tr>
735
@@ -744,6 +771,7 @@ function woo_ce_export_export_types() {
744
<?php echo $user; ?>
745
</td>
746
<td width="1%" class="actions">
747
</td>
748
</tr>
749
@@ -759,6 +787,7 @@ function woo_ce_export_export_types() {
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
@@ -774,6 +803,7 @@ function woo_ce_export_export_types() {
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
@@ -789,6 +819,7 @@ function woo_ce_export_export_types() {
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
@@ -804,6 +835,7 @@ function woo_ce_export_export_types() {
804
<span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
805
</td>
806
<td width="1%" class="actions">
807
</td>
808
</tr>
809
@@ -819,6 +851,7 @@ function woo_ce_export_export_types() {
819
<span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
820
</td>
821
<td width="1%" class="actions">
822
</td>
823
</tr>
824
@@ -834,6 +867,7 @@ function woo_ce_export_export_types() {
834
<span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
835
</td>
836
<td width="1%" class="actions">
837
</td>
838
</tr>
839
@@ -850,12 +884,16 @@ function woo_ce_export_export_types() {
850
<span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
851
</td>
852
<td width="1%" class="actions">
853
</td>
854
</tr>
855
-->
856
</tbody>
857
</table>
858
<!-- .form-table -->
859
</div>
860
<!-- .inside -->
861
</div>
@@ -878,6 +916,7 @@ function woo_ce_export_export_options() {
878
include_once( WOO_CE_PATH . 'includes/admin/' . $template );
879
880
add_action( 'woo_ce_export_options', 'woo_ce_export_options_export_format' );
881
add_action( 'woo_ce_export_options', 'woo_ce_export_options_troubleshooting' );
882
add_action( 'woo_ce_export_options', 'woo_ce_export_options_limit_volume' );
883
add_action( 'woo_ce_export_options', 'woo_ce_export_options_volume_offset' );
@@ -1048,6 +1087,9 @@ function woo_ce_modules_status_label( $status = 'inactive' ) {
1048
// HTML template for header prompt on Store Exporter screen
1049
function woo_ce_support_donate() {
1050
1051
$output = '';
1052
$show = true;
1053
if( function_exists( 'woo_vl_we_love_your_plugins' ) ) {
@@ -1059,7 +1101,7 @@ function woo_ce_support_donate() {
1059
$rate_url = 'http://wordpress.org/support/view/plugin-reviews/' . WOO_CE_DIRNAME;
1060
$output = '
1061
<div id="support-donate_rate" class="support-donate_rate">
1062
- <p>' . sprintf( __( '<strong>Like this Plugin?</strong> %s and %s.', 'woocommerce-exporter' ), '<a href="' . $donate_url . '" target="_blank">' . __( 'Donate to support this Plugin', 'woocommerce-exporter' ) . '</a>', '<a href="' . esc_url( add_query_arg( array( 'rate' => '5' ), $rate_url ) ) . '#postform" target="_blank">rate / review us on WordPress.org</a>' ) . '</p>
1063
</div>
1064
';
1065
}
218
219
}
220
221
+ function woo_ce_admin_export_bar_menu( $admin_bar ) {
222
+
223
+ // Limit this only to the Quick Export tab
224
+ $tab = ( isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : false );
225
+ if( !isset( $_GET['tab'] ) && woo_ce_get_option( 'skip_overview', false ) )
226
+ $tab = 'export';
227
+
228
+ if( $tab <> 'export' )
229
+ return;
230
+
231
+ $args = array(
232
+ 'id' => 'quick-export',
233
+ 'title' => __( 'Quick Export', 'woocommerce-exporter' ),
234
+ 'href' => '#'
235
+ );
236
+ $admin_bar->add_menu( $args );
237
+
238
+ }
239
+
240
function woo_ce_admin_current_screen() {
241
242
$screen = get_current_screen();
254
'<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>'
255
) );
256
257
+ add_action( 'admin_bar_menu', 'woo_ce_admin_export_bar_menu', 100 );
258
+
259
// This function only runs on the Quick Export screen
260
add_action( 'admin_footer', 'woo_ce_admin_export_footer_javascript' );
261
break;
679
<?php echo $product; ?>
680
</td>
681
<td width="1%" class="actions">
682
+ <span class="dashicons dashicons-no-alt"></span>
683
</td>
684
</tr>
685
694
<?php echo $category; ?>
695
</td>
696
<td width="1%" class="actions">
697
+ <span class="dashicons dashicons-no-alt"></span>
698
</td>
699
</tr>
700
709
<?php echo $tag; ?>
710
</td>
711
<td width="1%" class="actions">
712
+ <span class="dashicons dashicons-no-alt"></span>
713
</td>
714
</tr>
715
725
<span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
726
</td>
727
<td width="1%" class="actions">
728
+ <span class="dashicons dashicons-no-alt"></span>
729
</td>
730
</tr>
731
740
<?php echo $order; ?>
741
</td>
742
<td width="1%" class="actions">
743
+ <span class="dashicons dashicons-no-alt"></span>
744
</td>
745
</tr>
746
756
<span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
757
</td>
758
<td width="1%" class="actions">
759
+ <span class="dashicons dashicons-no-alt"></span>
760
</td>
761
</tr>
762
771
<?php echo $user; ?>
772
</td>
773
<td width="1%" class="actions">
774
+ <span class="dashicons dashicons-no-alt"></span>
775
</td>
776
</tr>
777
787
<span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
788
</td>
789
<td width="1%" class="actions">
790
+ <span class="dashicons dashicons-no-alt"></span>
791
</td>
792
</tr>
793
803
<span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
804
</td>
805
<td width="1%" class="actions">
806
+ <span class="dashicons dashicons-no-alt"></span>
807
</td>
808
</tr>
809
819
<span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
820
</td>
821
<td width="1%" class="actions">
822
+ <span class="dashicons dashicons-no-alt"></span>
823
</td>
824
</tr>
825
835
<span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
836
</td>
837
<td width="1%" class="actions">
838
+ <span class="dashicons dashicons-no-alt"></span>
839
</td>
840
</tr>
841
851
<span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
852
</td>
853
<td width="1%" class="actions">
854
+ <span class="dashicons dashicons-no-alt"></span>
855
</td>
856
</tr>
857
867
<span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
868
</td>
869
<td width="1%" class="actions">
870
+ <span class="dashicons dashicons-no-alt"></span>
871
</td>
872
</tr>
873
884
<span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
885
</td>
886
<td width="1%" class="actions">
887
+ <span class="dashicons dashicons-no-alt"></span>
888
</td>
889
</tr>
890
-->
891
</tbody>
892
</table>
893
<!-- .form-table -->
894
+ <p>
895
+ <input id="quick_export" type="button" value="<?php _e( 'Quick Export', 'woocommerce-exporter' ); ?>" class="button" />
896
+ </p>
897
</div>
898
<!-- .inside -->
899
</div>
916
include_once( WOO_CE_PATH . 'includes/admin/' . $template );
917
918
add_action( 'woo_ce_export_options', 'woo_ce_export_options_export_format' );
919
+ add_action( 'woo_ce_export_options', 'woo_ce_export_options_export_template' );
920
add_action( 'woo_ce_export_options', 'woo_ce_export_options_troubleshooting' );
921
add_action( 'woo_ce_export_options', 'woo_ce_export_options_limit_volume' );
922
add_action( 'woo_ce_export_options', 'woo_ce_export_options_volume_offset' );
1087
// HTML template for header prompt on Store Exporter screen
1088
function woo_ce_support_donate() {
1089
1090
+ $woo_cd_url = 'https://www.visser.com.au/plugins/store-exporter-deluxe/?platform=wc';
1091
+ $woo_cd_link = sprintf( '<a href="%s" target="_blank">' . __( 'Upgrade to Store Exporter Deluxe', 'woocommerce-exporter' ) . '</a>', $woo_cd_url );
1092
+
1093
$output = '';
1094
$show = true;
1095
if( function_exists( 'woo_vl_we_love_your_plugins' ) ) {
1101
$rate_url = 'http://wordpress.org/support/view/plugin-reviews/' . WOO_CE_DIRNAME;
1102
$output = '
1103
<div id="support-donate_rate" class="support-donate_rate">
1104
+ <p>' . sprintf( __( '<strong>Like this Plugin?</strong> %s and %s.', 'woocommerce-exporter' ), $woo_cd_link, '<a href="' . esc_url( add_query_arg( array( 'rate' => '5' ), $rate_url ) ) . '#postform" target="_blank">rate / review us on WordPress.org</a>' ) . '</p>
1105
</div>
1106
';
1107
}
includes/admin/quick_export.php CHANGED
@@ -15,9 +15,7 @@ function woo_ce_export_options_export_format() {
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>
@@ -26,6 +24,29 @@ function woo_ce_export_options_export_format() {
26
27
}
28
29
function woo_ce_export_options_troubleshooting() {
30
31
ob_start(); ?>
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
+ <label><input type="radio" name="export_format" value="rss" disabled="disabled" /> <?php _e( 'RSS 2.0', '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>
19
<p class="description"><?php _e( 'Adjust the export format to generate different export file formats.', 'woocommerce-exporter' ); ?></p>
20
</td>
21
</tr>
24
25
}
26
27
+ function woo_ce_export_options_export_template() {
28
+
29
+ // Store Exporter Deluxe
30
+ $woo_cd_url = 'https://www.visser.com.au/plugins/store-exporter-deluxe/?platform=wc';
31
+ $woo_cd_link = sprintf( '<a href="%s" target="_blank">' . __( 'Store Exporter Deluxe', 'woocommerce-exporter' ) . '</a>', $woo_cd_url );
32
+
33
+ ob_start(); ?>
34
+ <tr id="export-template">
35
+ <th>
36
+ <label><?php _e( 'Export template', 'woocommerce-exporter' ); ?></label>
37
+ </th>
38
+ <td>
39
+ <select id="export_template" name="export_template" disabled="disabled" class="select short">
40
+ <option><?php _e( 'Choose a Export Template...', 'woocommerce-exporter' ); ?></option>
41
+ </select>
42
+ <span class="description"> - <?php printf( __( 'available in %s', 'woocommerce-exporter' ), $woo_cd_link ); ?></span>
43
+ </td>
44
+ </tr>
45
+ <?php
46
+ ob_end_flush();
47
+
48
+ }
49
+
50
function woo_ce_export_options_troubleshooting() {
51
52
ob_start(); ?>
includes/functions.php CHANGED
@@ -227,7 +227,7 @@ if( is_admin() ) {
227
);
228
foreach( $transients as $transient ) {
229
// Delete the existing count Transients
230
- delete_transient( WOO_CE_PREFIX . '_' . $transient . '_count' );
231
// Refresh the count Transients
232
woo_ce_get_export_type_count( $transient );
233
}
@@ -290,10 +290,10 @@ if( is_admin() ) {
290
if( isset( $_GET['message'] ) )
291
$message = urldecode( $_GET['message'] );
292
if( $message ) {
293
- $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>)';
294
$message .= ' (<a href="' . $troubleshooting_url . '" target="_blank">' . __( 'Need help?', 'woocommerce-exporter' ) . '</a>)';
295
} else {
296
- $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>)';
297
$message .= ' (<a href="' . $troubleshooting_url . '" target="_blank">' . __( 'Need help?', 'woocommerce-exporter' ) . '</a>)';
298
}
299
woo_ce_admin_notice_html( $message, 'error' );
@@ -301,12 +301,22 @@ if( is_admin() ) {
301
302
// Displays a notice where the maximum execution time cannot be set
303
if( !woo_ce_get_option( 'dismiss_execution_time_prompt', 0 ) ) {
304
- $max_execution_time = absint( ini_get( 'max_execution_time' ) );
305
- $response = @ini_set( 'max_execution_time', 120 );
306
- if( $response == false || ( $response != $max_execution_time ) ) {
307
- $dismiss_url = esc_url( add_query_arg( array( 'action' => 'dismiss_execution_time_prompt', '_wpnonce' => wp_create_nonce( 'woo_ce_dismiss_execution_time_prompt' ) ) ) );
308
- $message = '<span style="float:right;"><a href="' . $dismiss_url . '">' . __( 'Dismiss', 'woocommerce-exporter' ) . '</a></span>' . sprintf( __( 'We could not override the PHP configuration option <code>max_execution_time</code>, this will limit the size of possible exports. See: <a href="%s" target="_blank">Increasing PHP max_execution_time configuration option</a>', 'woocommerce-exporter' ), $troubleshooting_url );
309
- woo_ce_admin_notice_html( $message );
310
}
311
}
312
@@ -324,21 +334,23 @@ if( is_admin() ) {
324
// Displays a notice if PHP 5.2 or lower is installed
325
if( version_compare( phpversion(), '5.3', '<' ) && !woo_ce_get_option( 'dismiss_php_legacy', 0 ) ) {
326
$dismiss_url = esc_url( add_query_arg( array( 'action' => 'dismiss_php_legacy', '_wpnonce' => wp_create_nonce( 'woo_ce_dismiss_php_legacy' ) ) ) );
327
- $message = '<span style="float:right;"><a href="' . $dismiss_url . '">' . __( 'Dismiss', 'woocommerce-exporter' ) . '</a></span>' . sprintf( __( 'Your PHP version (%s) is not supported and is very much out of date, since 2010 all users are strongly encouraged to upgrade to PHP 5.3+ and above. Contact your hosting provider to make this happen. See: <a href="%s" target="_blank">Migrating from PHP 5.2 to 5.3</a>', 'woocommerce-exporter' ), phpversion(), $troubleshooting_url );
328
woo_ce_admin_notice_html( $message, 'error' );
329
}
330
331
// Displays notice if there are more than 2500 Subscriptions
332
if( !woo_ce_get_option( 'dismiss_subscription_prompt', 0 ) ) {
333
if( class_exists( 'WC_Subscriptions' ) ) {
334
- $wcs_version = woo_ce_get_wc_subscriptions_version();
335
if( version_compare( $wcs_version, '2.0.1', '<' ) ) {
336
if( method_exists( 'WC_Subscriptions', 'is_large_site' ) ) {
337
// Does this store have roughly more than 3000 Subscriptions
338
if( WC_Subscriptions::is_large_site() ) {
339
$dismiss_url = esc_url( add_query_arg( array( 'action' => 'dismiss_subscription_prompt', '_wpnonce' => wp_create_nonce( 'woo_ce_dismiss_subscription_prompt' ) ) ) );
340
- $message = '<span style="float:right;"><a href="' . $dismiss_url . '">' . __( 'Dismiss', 'woocommerce-exporter' ) . '</a></span>' . __( 'We\'ve detected the <em>is_large_site</em> flag has been set within WooCommerce Subscriptions. Please get in touch if exports are incomplete as we need to spin up an alternative export process to export Subscriptions from large stores.', 'woocommerce-exporter' ) . ' (<a href="' . $troubleshooting_url . '" target="_blank">' . __( 'Need help?', 'woocommerce-exporter' ) . '</a>)';
341
- woo_ce_admin_notice_html( $message, 'error' );
342
}
343
}
344
}
@@ -347,28 +359,46 @@ if( is_admin() ) {
347
348
// If the export failed the WordPress Transient will still exist
349
if( get_transient( WOO_CE_PREFIX . '_running' ) ) {
350
- $message = __( 'A WordPress or server error caused the exporter to fail with a blank screen, this is either a memory or timeout issue, please get in touch so we can reproduce and resolve this.', 'woocommerce-exporter' ) . ' (<a href="' . $troubleshooting_url . '" target="_blank">' . __( 'Need help?', 'woocommerce-exporter' ) . '</a>)';
351
- woo_ce_admin_notice_html( $message, 'error' );
352
- delete_transient( WOO_CE_PREFIX . '_running' );
353
}
354
- // Displays a notice if Archives is disabled and the Archives tab is opened
355
- if(
356
- woo_ce_get_option( 'delete_file', '1' ) == 1
357
- && ( isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : '' ) == 'archive'
358
- && ( !woo_ce_get_option( 'dismiss_archives_prompt', 0 ) )
359
- ) {
360
- $dismiss_url = esc_url( add_query_arg( array( 'action' => 'dismiss_archives_prompt', '_wpnonce' => wp_create_nonce( 'woo_ce_dismiss_archives_prompt' ) ) ) );
361
- $override_url = esc_url( add_query_arg( array( 'action' => 'hide_archives_tab', '_wpnonce' => wp_create_nonce( 'woo_ce_hide_archives_tab' ) ) ) );
362
- $message = '<span style="float:right;"><a href="' . $dismiss_url . '">' . __( 'Dismiss', 'woocommerce-exporter' ) . '</a></span>' . __( 'It looks like the saving of export archives is disabled from the Enabled Archives option on the Settings tab, would you like to hide the Archives tab aswell?', 'woocommerce-exporter' ) . '<br /><br /><a href="' . $override_url . '" class="button-primary">' . __( 'Hide Archives tab', 'woocommerce-exporter' ) . '</a>';
363
- woo_ce_admin_notice_html( $message );
364
}
365
366
// Displays a notice if Archives are detected without a Post Status of private
367
if( woo_ce_get_unprotected_archives( array( 'count' => true ) ) && !woo_ce_get_option( 'dismiss_archives_privacy_prompt', 0 ) ) {
368
$dismiss_url = esc_url( add_query_arg( array( 'action' => 'dismiss_archives_privacy_prompt', '_wpnonce' => wp_create_nonce( 'woo_ce_dismiss_archives_privacy_prompt' ) ) ) );
369
$override_url = esc_url( add_query_arg( array( 'action' => 'override_archives_privacy', '_wpnonce' => wp_create_nonce( 'woo_ce_override_archives_privacy' ) ) ) );
370
- $message = '<span style="float:right;"><a href="' . $dismiss_url . '">' . __( 'Dismiss', 'woocommerce-exporter' ) . '</a></span>' . __( 'It looks like some archived exports require updating, would you like to hide these archived exports now?', 'woocommerce-exporter' ) . '<br /><br /><a href="' . $override_url . '" class="button-primary">' . __( 'Update export archives', 'woocommerce-exporter' ) . '</a>';
371
- woo_ce_admin_notice_html( $message );
372
}
373
374
}
@@ -860,6 +890,7 @@ function woo_ce_fatal_error() {
860
861
$error = error_get_last();
862
if( $error !== null ) {
863
$message = '';
864
$notice = sprintf( __( 'Refer to the following error and contact us on http://wordpress.org/plugins/woocommerce-exporter/ for further assistance. Error: <code>%s</code>', 'woocommerce-exporter' ), $error['message'] );
865
if ( substr( $error['message'], 0, 22 ) === 'Maximum execution time' ) {
227
);
228
foreach( $transients as $transient ) {
229
// Delete the existing count Transients
230
+ delete_transient( WOO_CE_PREFIX . sprintf( '_%s_count', $transient ) );
231
// Refresh the count Transients
232
woo_ce_get_export_type_count( $transient );
233
}
290
if( isset( $_GET['message'] ) )
291
$message = urldecode( $_GET['message'] );
292
if( $message ) {
293
+ $message = sprintf( __( 'A WordPress or server error caused the export to fail, the exporter was provided with a reason: <em>%s</em>', 'woocommerce-exporter' ), $message );
294
$message .= ' (<a href="' . $troubleshooting_url . '" target="_blank">' . __( 'Need help?', 'woocommerce-exporter' ) . '</a>)';
295
} else {
296
+ $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' );
297
$message .= ' (<a href="' . $troubleshooting_url . '" target="_blank">' . __( 'Need help?', 'woocommerce-exporter' ) . '</a>)';
298
}
299
woo_ce_admin_notice_html( $message, 'error' );
301
302
// Displays a notice where the maximum execution time cannot be set
303
if( !woo_ce_get_option( 'dismiss_execution_time_prompt', 0 ) ) {
304
+ $max_execution_time = ini_get( 'max_execution_time' );
305
+ // Check if max_execution is unlimited
306
+ if( $max_execution_time == false || $max_execution_time > 0 ) {
307
+ $response = ( function_exists( 'ini_set' ) ? @ini_set( 'max_execution_time', 120 ) : false );
308
+ if( $response === false || ( $response != absint( $max_execution_time ) ) ) {
309
+ $dismiss_url = esc_url( add_query_arg( array( 'action' => 'dismiss_execution_time_prompt', '_wpnonce' => wp_create_nonce( 'woo_ce_dismiss_execution_time_prompt' ) ) ) );
310
+ if( $max_execution_time == false && $max_execution_time == false ) {
311
+ $message = '<span style="float:right;"><a href="' . $dismiss_url . '">' . __( 'Dismiss', 'woocommerce-exporter' ) . '</a></span>' . __( 'We could not detect or override the PHP configuration option <code>max_execution_time</code>, this is not an indicatative of an issue but may limit the size of large exports.', 'woocommerce-exporter' );
312
+ $message .= __( ' If exports fail after a period of loading/inactivity then this limit has likely been reached and may need to be increased by contacting your hosting provider.', 'woocommerce-exporter' );
313
+ } else {
314
+ $message = '<span style="float:right;"><a href="' . $dismiss_url . '">' . __( 'Dismiss', 'woocommerce-exporter' ) . '</a></span>' . sprintf( __( 'We could not override the PHP configuration option <code>max_execution_time</code> which is set at %d seconds, this is typical of most hosting providers and is not an indicatation of an issue but may limit the size of large exports.', 'woocommerce-exporter' ), $max_execution_time );
315
+ $message .= sprintf( __( ' If exports fail after %d seconds of loading/inactivity then this limit has likely been reached and may need to be increased by contacting your hosting provider.', 'woocommerce-exporter' ), $max_execution_time );
316
+ }
317
+ $message .= sprintf( __( ' See: <a href="%s" target="_blank">Increasing the PHP max_execution_time configuration option</a>', 'woocommerce-exporter' ), $troubleshooting_url );
318
+ woo_ce_admin_notice_html( $message, 'notice' );
319
+ }
320
}
321
}
322
334
// Displays a notice if PHP 5.2 or lower is installed
335
if( version_compare( phpversion(), '5.3', '<' ) && !woo_ce_get_option( 'dismiss_php_legacy', 0 ) ) {
336
$dismiss_url = esc_url( add_query_arg( array( 'action' => 'dismiss_php_legacy', '_wpnonce' => wp_create_nonce( 'woo_ce_dismiss_php_legacy' ) ) ) );
337
+ $message = '<span style="float:right;"><a href="' . $dismiss_url . '">' . __( 'Dismiss', 'woocommerce-exporter' ) . '</a></span>' . sprintf( __( 'Your PHP version (%s) is not supported and is very much out of date, since 2010 all users are strongly encouraged to upgrade to PHP 5.3+ and above. Contact your hosting provider to make this happen. See: <a href="%s" target="_blank">Migrating from PHP 5.2 to 5.3</a>', 'woocommerce-exporter' ), phpversion(), $troubleshooting_url . '#General_troubleshooting' );
338
woo_ce_admin_notice_html( $message, 'error' );
339
}
340
341
// Displays notice if there are more than 2500 Subscriptions
342
if( !woo_ce_get_option( 'dismiss_subscription_prompt', 0 ) ) {
343
if( class_exists( 'WC_Subscriptions' ) ) {
344
+ $wcs_version = ( function_exists( 'woo_ce_get_wc_subscriptions_version' ) ? woo_ce_get_wc_subscriptions_version() : false );
345
if( version_compare( $wcs_version, '2.0.1', '<' ) ) {
346
if( method_exists( 'WC_Subscriptions', 'is_large_site' ) ) {
347
// Does this store have roughly more than 3000 Subscriptions
348
if( WC_Subscriptions::is_large_site() ) {
349
$dismiss_url = esc_url( add_query_arg( array( 'action' => 'dismiss_subscription_prompt', '_wpnonce' => wp_create_nonce( 'woo_ce_dismiss_subscription_prompt' ) ) ) );
350
+ $message = '<span style="float:right;"><a href="' . $dismiss_url . '">' . __( 'Dismiss', 'woocommerce-exporter' ) . '</a></span>';
351
+ $message .= __( 'We\'ve detected the <em>is_large_site</em> flag has been set within WooCommerce Subscriptions. Please get in touch if exports are incomplete as we need to spin up an alternative export process to export Subscriptions from large stores.', 'woocommerce-exporter' );
352
+ $message .= ' (<a href="' . $troubleshooting_url . '" target="_blank">' . __( 'Need help?', 'woocommerce-exporter' ) . '</a>)';
353
+ woo_ce_admin_notice_html( $message, 'notice' );
354
}
355
}
356
}
359
360
// If the export failed the WordPress Transient will still exist
361
if( get_transient( WOO_CE_PREFIX . '_running' ) ) {
362
+ // Check if a fatal PHP error has been detected
363
+ if( get_transient( WOO_CE_PREFIX . '_crashed' ) ) {
364
+ $message = __( 'A WordPress or server error caused the exporter to fail with a blank screen, this is usually isolated to a memory or timeout issue, if this persists please get in touch so we can reproduce and resolve this.', 'woocommerce-exporter' );
365
+ $message .= ' (<a href="' . $troubleshooting_url . '" target="_blank">' . __( 'Need help?', 'woocommerce-exporter' ) . '</a>)';
366
+ woo_ce_admin_notice_html( $message, 'error' );
367
+ delete_transient( WOO_CE_PREFIX . '_crashed' );
368
+ delete_transient( WOO_CE_PREFIX . '_running' );
369
+ } else {
370
+ $dismiss_url = esc_url( add_query_arg( array( 'action' => 'dismiss_export_running_prompt', '_wpnonce' => wp_create_nonce( 'woo_ce_dismiss_export_running_prompt' ) ) ) );
371
+ $message = '<span style="float:right;"><a href="' . $dismiss_url . '">' . __( 'Dismiss', 'woocommerce-exporter' ) . '</a></span>';
372
+ $message .= __( 'It looks like an export is currently running in the background. Unfortunately we cannot tell if the background export has completed just that it hasn\'t yet finished. If you are confident there are no background exports running click Dismiss to hide this notice.', 'woocommerce-exporter' );
373
+ $message .= ' (<a href="' . $troubleshooting_url . '" target="_blank">' . __( 'Need help?', 'woocommerce-exporter' ) . '</a>)';
374
+ woo_cd_admin_notice_html( $message, 'notice' );
375
+ }
376
}
377
+
378
+ // Archives
379
+ if( ( isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : '' ) == 'archive' ) {
380
+
381
+ // Displays a notice if Archives is disabled and the Archives tab is opened
382
+ if(
383
+ woo_ce_get_option( 'delete_file', '1' ) == 1
384
+ && ( !woo_ce_get_option( 'dismiss_archives_prompt', 0 ) )
385
+ ) {
386
+ $dismiss_url = esc_url( add_query_arg( array( 'action' => 'dismiss_archives_prompt', '_wpnonce' => wp_create_nonce( 'woo_ce_dismiss_archives_prompt' ) ) ) );
387
+ $override_url = esc_url( add_query_arg( array( 'action' => 'hide_archives_tab', '_wpnonce' => wp_create_nonce( 'woo_ce_hide_archives_tab' ) ) ) );
388
+ $message = '<span style="float:right;"><a href="' . $dismiss_url . '">' . __( 'Dismiss', 'woocommerce-exporter' ) . '</a></span>';
389
+ $message .= __( 'It looks like the saving of export archives is disabled from the Enabled Archives option on the Settings tab, would you like to hide the Archives tab aswell?', 'woocommerce-exporter' ) . '<br /><br /><a href="' . $override_url . '" class="button-primary">' . __( 'Hide Archives tab', 'woocommerce-exporter' ) . '</a>';
390
+ woo_ce_admin_notice_html( $message, 'notice' );
391
+ }
392
+
393
}
394
395
// Displays a notice if Archives are detected without a Post Status of private
396
if( woo_ce_get_unprotected_archives( array( 'count' => true ) ) && !woo_ce_get_option( 'dismiss_archives_privacy_prompt', 0 ) ) {
397
$dismiss_url = esc_url( add_query_arg( array( 'action' => 'dismiss_archives_privacy_prompt', '_wpnonce' => wp_create_nonce( 'woo_ce_dismiss_archives_privacy_prompt' ) ) ) );
398
$override_url = esc_url( add_query_arg( array( 'action' => 'override_archives_privacy', '_wpnonce' => wp_create_nonce( 'woo_ce_override_archives_privacy' ) ) ) );
399
+ $message = '<span style="float:right;"><a href="' . $dismiss_url . '">' . __( 'Dismiss', 'woocommerce-exporter' ) . '</a></span>';
400
+ $message .= __( 'It looks like some archived exports require updating, would you like to update these archived exports now?', 'woocommerce-exporter' ) . '<br /><br /><a href="' . $override_url . '" class="button-primary">' . __( 'Update export archives', 'woocommerce-exporter' ) . '</a>';
401
+ woo_ce_admin_notice_html( $message, 'notice' );
402
}
403
404
}
890
891
$error = error_get_last();
892
if( $error !== null ) {
893
+ set_transient( WOO_CE_PREFIX . '_crashed', 1, woo_ce_get_option( 'timeout', HOUR_IN_SECONDS ) );
894
$message = '';
895
$notice = sprintf( __( 'Refer to the following error and contact us on http://wordpress.org/plugins/woocommerce-exporter/ for further assistance. Error: <code>%s</code>', 'woocommerce-exporter' ), $error['message'] );
896
if ( substr( $error['message'], 0, 22 ) === 'Maximum execution time' ) {
includes/order-extend.php CHANGED
@@ -1385,7 +1385,7 @@ function woo_ce_get_gravity_forms_fields() {
1385
}
1386
1387
// Can we use the existing Transient?
1388
- if ( false === ( $fields = get_transient( WOO_CD_PREFIX . '_gravity_forms_fields' ) ) ) {
1389
1390
$fields = array();
1391
if( $gf_products = woo_ce_get_gravity_forms_products() ) {
@@ -1416,7 +1416,7 @@ function woo_ce_get_gravity_forms_fields() {
1416
}
1417
1418
// Save as Transient
1419
- set_transient( WOO_CD_PREFIX . '_gravity_forms_fields', $fields, HOUR_IN_SECONDS );
1420
1421
}
1422
1385
}
1386
1387
// Can we use the existing Transient?
1388
+ if ( false === ( $fields = get_transient( WOO_CE_PREFIX . '_gravity_forms_fields' ) ) ) {
1389
1390
$fields = array();
1391
if( $gf_products = woo_ce_get_gravity_forms_products() ) {
1416
}
1417
1418
// Save as Transient
1419
+ set_transient( WOO_CE_PREFIX . '_gravity_forms_fields', $fields, HOUR_IN_SECONDS );
1420
1421
}
1422
readme.txt CHANGED
@@ -2,10 +2,10 @@
2
3
Contributors: visser, visser.labs
4
Donate link: https://www.visser.com.au/donations/
5
- Tags: e-commerce, woocommerce, shop, cart, ecommerce, export, export to csv, export to xml, xls, xlsx, export to excel, export customers, export products, export sales, export orders, export coupons, users, attributes, export subscriptions
6
Requires at least: 2.9.2
7
Tested up to: 4.9.6
8
- Stable tag: 1.9.6
9
License: GPLv2 or later
10
11
Export store details out of WooCommerce into simple formatted files (e.g. CSV, XML, Excel 2007, XLS, etc.).
@@ -164,6 +164,11 @@ If you have any problems, questions or suggestions please create a topic here on
164
165
== Changelog ==
166
167
= 1.9.6 =
168
* Added: Dismiss option to PHP FORM limit notice
169
* Added: Order export support
2
3
Contributors: visser, visser.labs
4
Donate link: https://www.visser.com.au/donations/
5
+ Tags: woocommerce, export, export products, export sales, export orders, export subscriptions, csv, xml, xls, xlsx, excel, export customers, export coupons, export users, export attributes
6
Requires at least: 2.9.2
7
Tested up to: 4.9.6
8
+ Stable tag: 2.0
9
License: GPLv2 or later
10
11
Export store details out of WooCommerce into simple formatted files (e.g. CSV, XML, Excel 2007, XLS, etc.).
164
165
== Changelog ==
166
167
+ = 2.0 =
168
+ * Added: Quick Export button to the Export Types section
169
+ * Added: Quick Export button to the Admin bar
170
+ * Changed: Moved the donation link to the right of the Store Export tabs
171
+
172
= 1.9.6 =
173
* Added: Dismiss option to PHP FORM limit notice
174
* Added: Order export support
templates/admin/export.css CHANGED
@@ -1,11 +1,12 @@
1
/* Tabbed navigation */
2
3
#woo-ce h2 .nav-tab {
4
- font-size: 16px;
5
margin-right:0;
6
}
7
#woo-ce h2.nav-tab-wrapper {
8
padding-left:7px;
9
}
10
11
/* Overview */
@@ -148,9 +149,12 @@ body.post-type-export_template div#message-max_input_vars {
148
149
#woo-ce .support-donate_rate {
150
display:block;
151
}
152
#woo-ce .support-donate_rate p {
153
- margin-top:16px;
154
}
155
#woo-ce .support-donate_rate .star {
156
vertical-align:bottom;
1
/* Tabbed navigation */
2
3
#woo-ce h2 .nav-tab {
4
+ font-size:16px;
5
margin-right:0;
6
}
7
#woo-ce h2.nav-tab-wrapper {
8
padding-left:7px;
9
+ margin-bottom:0.5em;
10
}
11
12
/* Overview */
149
150
#woo-ce .support-donate_rate {
151
display:block;
152
+ float:right;
153
+ width:50%;
154
+ text-align:right;
155
}
156
#woo-ce .support-donate_rate p {
157
+ margin:0;
158
}
159
#woo-ce .support-donate_rate .star {
160
vertical-align:bottom;
templates/admin/export.js CHANGED
@@ -6,6 +6,11 @@ $j(function() {
6
$j('#skip_overview_form').submit();
7
});
8
9
// Date Picker
10
if( $j.isFunction($j.fn.datepicker) ) {
11
$j('.datepicker').datepicker({
6
$j('#skip_overview_form').submit();
7
});
8
9
+ // Controls the Quick Export button on the Export screen
10
+ $j('#quick_export').click(function(){
11
+ $j('#postform').submit();
12
+ });
13
+
14
// Date Picker
15
if( $j.isFunction($j.fn.datepicker) ) {
16
$j('.datepicker').datepicker({
templates/admin/tabs.php CHANGED
@@ -8,6 +8,7 @@
8
<?php } ?>
9
<a data-tab-id="settings" class="nav-tab<?php woo_ce_admin_active_tab( 'settings' ); ?>" href="<?php echo esc_url( add_query_arg( array( 'page' => 'woo_ce', 'tab' => 'settings' ), 'admin.php' ) ); ?>"><?php _e( 'Settings', 'woocommerce-exporter' ); ?></a>
10
<a data-tab-id="tools" class="nav-tab<?php woo_ce_admin_active_tab( 'tools' ); ?>" href="<?php echo esc_url( add_query_arg( array( 'page' => 'woo_ce', 'tab' => 'tools' ), 'admin.php' ) ); ?>"><?php _e( 'Tools', 'woocommerce-exporter' ); ?></a>
11
</h2>
12
<?php woo_ce_tab_template( $tab ); ?>
13
8
<?php } ?>
9
<a data-tab-id="settings" class="nav-tab<?php woo_ce_admin_active_tab( 'settings' ); ?>" href="<?php echo esc_url( add_query_arg( array( 'page' => 'woo_ce', 'tab' => 'settings' ), 'admin.php' ) ); ?>"><?php _e( 'Settings', 'woocommerce-exporter' ); ?></a>
10
<a data-tab-id="tools" class="nav-tab<?php woo_ce_admin_active_tab( 'tools' ); ?>" href="<?php echo esc_url( add_query_arg( array( 'page' => 'woo_ce', 'tab' => 'tools' ), 'admin.php' ) ); ?>"><?php _e( 'Tools', 'woocommerce-exporter' ); ?></a>
11
+ <?php woo_ce_support_donate(); ?>
12
</h2>
13
<?php woo_ce_tab_template( $tab ); ?>
14