Version Description
- 2018-11-14 =
- Fixed bug - "total weight" and "count of unique products" were empty
- Fixed bug - message "wrong Select2 loaded"
- Fixed bug - UI issues after switching formats (CSV-XML-CSV)
- Shows some instructions if user gets popup with empty error message
- Shows warning if XML can not be built (PHP extension is not installed)
Download this release
Release Info
Developer | algol.plus |
Plugin | Advanced Order Export For WooCommerce |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.0 to 2.0.1
- assets/css/export.css +4 -2
- assets/js/settings-form.js +52 -25
- classes/admin/class-wc-order-export-labels.php +21 -21
- classes/admin/class-wc-order-export-manage.php +308 -307
- classes/class-wc-order-export-admin.php +39 -37
- classes/core/class-wc-order-export-data-extractor-ui.php +135 -113
- classes/core/class-wc-order-export-data-extractor.php +74 -48
- classes/core/class-wc-order-export-engine.php +43 -38
- classes/formats/abstract-class-woe-formatter-plain-format.php +101 -75
- classes/formats/abstract-class-woe-formatter-sv.php +13 -4
- classes/formats/abstract-class-woe-formatter.php +12 -3
- classes/formats/class-woe-formatter-json.php +20 -8
- classes/formats/class-woe-formatter-tsv.php +10 -1
- classes/formats/class-woe-formatter-xls.php +49 -26
- classes/formats/class-woe-formatter-xml.php +24 -9
- classes/formats/trait-woe-plain-format.php +59 -49
- i18n/languages/woo-order-export-lite.pot +782 -782
- readme.txt +10 -3
- view/settings-form.php +895 -616
- view/tab/export.php +17 -5
- view/tab/help.php +19 -12
- view/tab/tools.php +64 -52
- woo-order-export-lite.php +22 -18
assets/css/export.css
CHANGED
@@ -583,13 +583,15 @@ input.date{
|
|
583 |
}
|
584 |
|
585 |
#d-schedule-3 .block,
|
586 |
-
#d-schedule-4 .block
|
|
|
587 |
margin-left: 20px;
|
588 |
margin-right: 5px;
|
589 |
}
|
590 |
|
591 |
#d-schedule-3 .block.disabled,
|
592 |
-
#d-schedule-4 .block.disabled
|
|
|
593 |
pointer-events: none;
|
594 |
opacity: 0.7;
|
595 |
}
|
583 |
}
|
584 |
|
585 |
#d-schedule-3 .block,
|
586 |
+
#d-schedule-4 .block,
|
587 |
+
#d-schedule-5 .block {
|
588 |
margin-left: 20px;
|
589 |
margin-right: 5px;
|
590 |
}
|
591 |
|
592 |
#d-schedule-3 .block.disabled,
|
593 |
+
#d-schedule-4 .block.disabled,
|
594 |
+
#d-schedule-5 .block.disabled {
|
595 |
pointer-events: none;
|
596 |
opacity: 0.7;
|
597 |
}
|
assets/js/settings-form.js
CHANGED
@@ -155,42 +155,47 @@ jQuery( document ).ready( function( $ ) {
|
|
155 |
}
|
156 |
|
157 |
|
158 |
-
$( '#schedule-1,#schedule-2,#schedule-3,#schedule-4' ).change( function() {
|
159 |
if ( $( '#schedule-1' ).is( ':checked' ) && $( '#schedule-1' ).val() == 'schedule-1' ) {
|
160 |
$( '#d-schedule-2 input:not(input[type=radio])' ).attr( 'disabled', true )
|
161 |
$( '#d-schedule-2 select' ).attr( 'disabled', true )
|
162 |
$( '#d-schedule-1 input:not(input[type=radio])' ).attr( 'disabled', false )
|
163 |
$( '#d-schedule-1 select' ).attr( 'disabled', false )
|
164 |
$( '#d-schedule-3 .block' ).addClass( 'disabled' );
|
165 |
-
|
|
|
166 |
} else if( $( '#schedule-2' ).is( ':checked' ) && $( '#schedule-2' ).val() == 'schedule-2' ) {
|
167 |
$( '#d-schedule-1 input:not(input[type=radio])' ).attr( 'disabled', true )
|
168 |
$( '#d-schedule-1 select' ).attr( 'disabled', true )
|
169 |
$( '#d-schedule-2 select' ).attr( 'disabled', false )
|
170 |
$( '#d-schedule-2 input:not(input[type=radio]) ' ).attr( 'disabled', false )
|
171 |
$( '#d-schedule-3 .block' ).addClass( 'disabled' );
|
172 |
-
|
|
|
173 |
} else if( $( '#schedule-3' ).is( ':checked' ) && $( '#schedule-3' ).val() == 'schedule-3' ) {
|
174 |
$( '#d-schedule-1 input:not(input[type=radio])' ).attr( 'disabled', true )
|
175 |
$( '#d-schedule-1 select' ).attr( 'disabled', true )
|
176 |
-
|
177 |
$( '#d-schedule-2 input:not(input[type=radio])' ).attr( 'disabled', true )
|
178 |
$( '#d-schedule-2 select' ).attr( 'disabled', true )
|
179 |
-
|
180 |
$( '#d-schedule-3 .block' ).removeClass( 'disabled' );
|
181 |
-
|
182 |
-
|
183 |
} else if( $( '#schedule-4' ).is( ':checked' ) && $( '#schedule-4' ).val() == 'schedule-4' ) {
|
184 |
-
|
185 |
-
$( '#d-schedule-1 input:not(input[type=radio])' ).attr( 'disabled', true )
|
186 |
$( '#d-schedule-1 select' ).attr( 'disabled', true )
|
187 |
-
|
188 |
$( '#d-schedule-2 input:not(input[type=radio])' ).attr( 'disabled', true )
|
189 |
$( '#d-schedule-2 select' ).attr( 'disabled', true )
|
190 |
-
|
191 |
-
$( '#d-schedule-3 .block' ).addClass( 'disabled' );
|
192 |
-
|
193 |
$( '#d-schedule-4 .block' ).removeClass( 'disabled' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
}
|
195 |
} );
|
196 |
$( '#schedule-1' ).change()
|
@@ -290,7 +295,8 @@ jQuery( document ).ready( function( $ ) {
|
|
290 |
if (window.location.hash.indexOf('segment') !== -1) {
|
291 |
$('.segment_choice[href="'+ window.location.hash +'"]').click()
|
292 |
} else {
|
293 |
-
$('.segment_choice').first().
|
|
|
294 |
}
|
295 |
}, 1000 );
|
296 |
|
@@ -334,7 +340,8 @@ function make_repeat_options( index ) {
|
|
334 |
});
|
335 |
|
336 |
var duplicate_settings = window.duplicated_fields_settings[index] || {};
|
337 |
-
|
|
|
338 |
|
339 |
// rows options
|
340 |
if ( index === 'products' ) {
|
@@ -813,12 +820,16 @@ jQuery( document ).ready( function( $ ) {
|
|
813 |
var data = 'json=' + makeJsonVar( $( '#export_job_settings' ) );
|
814 |
var estimate_data = data + "&action=order_exporter&method=estimate&mode=" + mode + "&id=" + job_id;
|
815 |
$.post( ajaxurl, estimate_data, function( response ) {
|
816 |
-
if ( response.total
|
817 |
-
|
818 |
-
|
819 |
}
|
|
|
|
|
820 |
}, "json"
|
821 |
-
)
|
|
|
|
|
822 |
|
823 |
function showPreview( response ) {
|
824 |
var id = 'output_preview';
|
@@ -889,12 +900,14 @@ jQuery( document ).ready( function( $ ) {
|
|
889 |
url: ajaxurl,
|
890 |
dataType: "json",
|
891 |
error: function( xhr, status, error ) {
|
892 |
-
|
893 |
progress( 100, jQuery( '#progressBar' ) );
|
894 |
},
|
895 |
success: function( response ) {
|
896 |
-
if (
|
897 |
-
|
|
|
|
|
898 |
} else {
|
899 |
get_all( response.start, ( response.start / window.count ) * 100, method )
|
900 |
}
|
@@ -1052,9 +1065,13 @@ jQuery( document ).ready( function( $ ) {
|
|
1052 |
url: ajaxurl,
|
1053 |
dataType: "json",
|
1054 |
error: function( xhr, status, error ) {
|
1055 |
-
|
1056 |
},
|
1057 |
success: function( response ) {
|
|
|
|
|
|
|
|
|
1058 |
window.count = response['total'];
|
1059 |
window.file_id = response['file_id'];
|
1060 |
console.log( window.count );
|
@@ -1177,8 +1194,12 @@ jQuery( document ).ready( function( $ ) {
|
|
1177 |
|
1178 |
// show product fields starts with 'line' and 'qty'
|
1179 |
$( '#products_unselected_segment input, #order_fields input' ).map( function () {
|
1180 |
-
|
1181 |
-
|
|
|
|
|
|
|
|
|
1182 |
$( this ).closest( '.mapping_row' ).show();
|
1183 |
}
|
1184 |
} );
|
@@ -1640,4 +1661,10 @@ function synch_selected_fields (old_format, new_format) {
|
|
1640 |
return;
|
1641 |
}
|
1642 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1643 |
}
|
155 |
}
|
156 |
|
157 |
|
158 |
+
$( '#schedule-1,#schedule-2,#schedule-3,#schedule-4,#schedule-5' ).change( function() {
|
159 |
if ( $( '#schedule-1' ).is( ':checked' ) && $( '#schedule-1' ).val() == 'schedule-1' ) {
|
160 |
$( '#d-schedule-2 input:not(input[type=radio])' ).attr( 'disabled', true )
|
161 |
$( '#d-schedule-2 select' ).attr( 'disabled', true )
|
162 |
$( '#d-schedule-1 input:not(input[type=radio])' ).attr( 'disabled', false )
|
163 |
$( '#d-schedule-1 select' ).attr( 'disabled', false )
|
164 |
$( '#d-schedule-3 .block' ).addClass( 'disabled' );
|
165 |
+
$( '#d-schedule-4 .block' ).addClass( 'disabled' );
|
166 |
+
$( '#d-schedule-5 .block' ).addClass( 'disabled' );
|
167 |
} else if( $( '#schedule-2' ).is( ':checked' ) && $( '#schedule-2' ).val() == 'schedule-2' ) {
|
168 |
$( '#d-schedule-1 input:not(input[type=radio])' ).attr( 'disabled', true )
|
169 |
$( '#d-schedule-1 select' ).attr( 'disabled', true )
|
170 |
$( '#d-schedule-2 select' ).attr( 'disabled', false )
|
171 |
$( '#d-schedule-2 input:not(input[type=radio]) ' ).attr( 'disabled', false )
|
172 |
$( '#d-schedule-3 .block' ).addClass( 'disabled' );
|
173 |
+
$( '#d-schedule-4 .block' ).addClass( 'disabled' );
|
174 |
+
$( '#d-schedule-5 .block' ).addClass( 'disabled' );
|
175 |
} else if( $( '#schedule-3' ).is( ':checked' ) && $( '#schedule-3' ).val() == 'schedule-3' ) {
|
176 |
$( '#d-schedule-1 input:not(input[type=radio])' ).attr( 'disabled', true )
|
177 |
$( '#d-schedule-1 select' ).attr( 'disabled', true )
|
|
|
178 |
$( '#d-schedule-2 input:not(input[type=radio])' ).attr( 'disabled', true )
|
179 |
$( '#d-schedule-2 select' ).attr( 'disabled', true )
|
|
|
180 |
$( '#d-schedule-3 .block' ).removeClass( 'disabled' );
|
181 |
+
$( '#d-schedule-4 .block' ).addClass( 'disabled' );
|
182 |
+
$( '#d-schedule-5 .block' ).addClass( 'disabled' );
|
183 |
} else if( $( '#schedule-4' ).is( ':checked' ) && $( '#schedule-4' ).val() == 'schedule-4' ) {
|
184 |
+
$( '#d-schedule-1 input:not(input[type=radio])' ).attr( 'disabled', true )
|
|
|
185 |
$( '#d-schedule-1 select' ).attr( 'disabled', true )
|
|
|
186 |
$( '#d-schedule-2 input:not(input[type=radio])' ).attr( 'disabled', true )
|
187 |
$( '#d-schedule-2 select' ).attr( 'disabled', true )
|
188 |
+
$( '#d-schedule-3 .block' ).addClass( 'disabled' );
|
|
|
|
|
189 |
$( '#d-schedule-4 .block' ).removeClass( 'disabled' );
|
190 |
+
$( '#d-schedule-5 .block' ).addClass( 'disabled' );
|
191 |
+
} else if( $( '#schedule-5' ).is( ':checked' ) && $( '#schedule-5' ).val() == 'schedule-5' ) {
|
192 |
+
$( '#d-schedule-1 input:not(input[type=radio])' ).attr( 'disabled', true )
|
193 |
+
$( '#d-schedule-1 select' ).attr( 'disabled', true )
|
194 |
+
$( '#d-schedule-2 input:not(input[type=radio])' ).attr( 'disabled', true )
|
195 |
+
$( '#d-schedule-2 select' ).attr( 'disabled', true )
|
196 |
+
$( '#d-schedule-3 .block' ).addClass( 'disabled' );
|
197 |
+
$( '#d-schedule-4 .block' ).addClass( 'disabled' );
|
198 |
+
$( '#d-schedule-5 .block' ).removeClass( 'disabled' );
|
199 |
}
|
200 |
} );
|
201 |
$( '#schedule-1' ).change()
|
295 |
if (window.location.hash.indexOf('segment') !== -1) {
|
296 |
$('.segment_choice[href="'+ window.location.hash +'"]').click()
|
297 |
} else {
|
298 |
+
$('.segment_choice').first().addClass('active');
|
299 |
+
$('.settings-segment').first().addClass('active');
|
300 |
}
|
301 |
}, 1000 );
|
302 |
|
340 |
});
|
341 |
|
342 |
var duplicate_settings = window.duplicated_fields_settings[index] || {};
|
343 |
+
var repeat_value = ( typeof( duplicate_settings.repeat ) !== 'undefined' ) ? duplicate_settings.repeat : "rows";
|
344 |
+
repeat_select.val( repeat_value );
|
345 |
|
346 |
// rows options
|
347 |
if ( index === 'products' ) {
|
820 |
var data = 'json=' + makeJsonVar( $( '#export_job_settings' ) );
|
821 |
var estimate_data = data + "&action=order_exporter&method=estimate&mode=" + mode + "&id=" + job_id;
|
822 |
$.post( ajaxurl, estimate_data, function( response ) {
|
823 |
+
if (!response || typeof response.total == 'undefined') {
|
824 |
+
woe_show_error_message(response);
|
825 |
+
return;
|
826 |
}
|
827 |
+
jQuery( '#output_preview_total' ).find( 'span' ).html( response.total );
|
828 |
+
jQuery( '#preview_actions' ).removeClass( 'hide' );
|
829 |
}, "json"
|
830 |
+
).fail( function( xhr, textStatus, errorThrown ) {
|
831 |
+
woe_show_error_message( xhr.responseText );
|
832 |
+
});
|
833 |
|
834 |
function showPreview( response ) {
|
835 |
var id = 'output_preview';
|
900 |
url: ajaxurl,
|
901 |
dataType: "json",
|
902 |
error: function( xhr, status, error ) {
|
903 |
+
woe_show_error_message( xhr.responseText );
|
904 |
progress( 100, jQuery( '#progressBar' ) );
|
905 |
},
|
906 |
success: function( response ) {
|
907 |
+
if ( !response) {
|
908 |
+
woe_show_error_message(response);
|
909 |
+
} else if ( typeof response.error !== 'undefined') {
|
910 |
+
woe_show_error_message( response.error );
|
911 |
} else {
|
912 |
get_all( response.start, ( response.start / window.count ) * 100, method )
|
913 |
}
|
1065 |
url: ajaxurl,
|
1066 |
dataType: "json",
|
1067 |
error: function( xhr, status, error ) {
|
1068 |
+
woe_show_error_message( xhr.responseText.replace(/<\/?[^>]+(>|$)/g, "") );
|
1069 |
},
|
1070 |
success: function( response ) {
|
1071 |
+
if (!response || typeof response['total'] == 'undefined') {
|
1072 |
+
woe_show_error_message(response);
|
1073 |
+
return;
|
1074 |
+
}
|
1075 |
window.count = response['total'];
|
1076 |
window.file_id = response['file_id'];
|
1077 |
console.log( window.count );
|
1194 |
|
1195 |
// show product fields starts with 'line' and 'qty'
|
1196 |
$( '#products_unselected_segment input, #order_fields input' ).map( function () {
|
1197 |
+
var $value = $( this ).attr( 'value' );
|
1198 |
+
if ( typeof $value === 'undefined' ) {
|
1199 |
+
return;
|
1200 |
+
}
|
1201 |
+
|
1202 |
+
if ( $value.match( /plain_products_(line|qty).*/ ) ) {
|
1203 |
$( this ).closest( '.mapping_row' ).show();
|
1204 |
}
|
1205 |
} );
|
1661 |
return;
|
1662 |
}
|
1663 |
|
1664 |
+
}
|
1665 |
+
|
1666 |
+
function woe_show_error_message(text) {
|
1667 |
+
if (!text)
|
1668 |
+
text = "Please, open section 'Misc Settings' and \n mark checkbox 'Enable debug output' \n to see exact error message";
|
1669 |
+
alert(text);
|
1670 |
}
|
classes/admin/class-wc-order-export-labels.php
CHANGED
@@ -8,8 +8,8 @@ class WC_Order_Export_Labels {
|
|
8 |
|
9 |
private $labels;
|
10 |
|
11 |
-
public function __get($key) {
|
12 |
-
if ( ! $key || empty($this->labels) ) {
|
13 |
return false;
|
14 |
}
|
15 |
|
@@ -22,8 +22,8 @@ class WC_Order_Export_Labels {
|
|
22 |
return false;
|
23 |
}
|
24 |
|
25 |
-
public function __isset($key) {
|
26 |
-
if ( ! $key || empty($this->labels) ) {
|
27 |
return false;
|
28 |
}
|
29 |
|
@@ -36,18 +36,18 @@ class WC_Order_Export_Labels {
|
|
36 |
return false;
|
37 |
}
|
38 |
|
39 |
-
public function __unset($key) {
|
40 |
-
if ( ! $key || empty($this->labels) ) {
|
41 |
return false;
|
42 |
}
|
43 |
|
44 |
foreach ( $this->labels as $num_index => $label_data ) {
|
45 |
if ( $label_data['key'] === $key || $label_data['parent_key'] === $key ) {
|
46 |
-
unset($this->labels[$num_index]);
|
47 |
}
|
48 |
}
|
49 |
|
50 |
-
$this->labels = array_values($this->labels);
|
51 |
}
|
52 |
|
53 |
public function __set( $key, $label ) {
|
@@ -72,23 +72,23 @@ class WC_Order_Export_Labels {
|
|
72 |
}
|
73 |
|
74 |
public function get_keys() {
|
75 |
-
return array_map( function($label_data) {
|
76 |
return $label_data['key'];
|
77 |
}, $this->labels );
|
78 |
}
|
79 |
|
80 |
public function is_not_empty() {
|
81 |
-
return (boolean)$this->labels;
|
82 |
}
|
83 |
|
84 |
public function to_Array() {
|
85 |
return array_combine(
|
86 |
-
array_map(function ($label_data){
|
87 |
return $label_data['key'];
|
88 |
-
}, $this->labels),
|
89 |
-
array_map(function ($label_data){
|
90 |
return $label_data['label'];
|
91 |
-
}, $this->labels)
|
92 |
);
|
93 |
}
|
94 |
|
@@ -103,7 +103,7 @@ class WC_Order_Export_Labels {
|
|
103 |
return $unique_keys;
|
104 |
}
|
105 |
|
106 |
-
public function get_childs($key) {
|
107 |
$child_labels = array();
|
108 |
foreach ( $this->labels as $label_data ) {
|
109 |
if ( $label_data['parent_key'] == $key ) {
|
@@ -114,7 +114,7 @@ class WC_Order_Export_Labels {
|
|
114 |
return $child_labels;
|
115 |
}
|
116 |
|
117 |
-
public function get_parent($key) {
|
118 |
foreach ( $this->labels as $label_data ) {
|
119 |
if ( $label_data['key'] == $key ) {
|
120 |
return $label_data['parent_key'];
|
@@ -124,8 +124,8 @@ class WC_Order_Export_Labels {
|
|
124 |
return false;
|
125 |
}
|
126 |
|
127 |
-
public function replace_label($key, $new_label) {
|
128 |
-
if ( ! $key || empty($this->labels) ) {
|
129 |
return;
|
130 |
}
|
131 |
|
@@ -136,7 +136,7 @@ class WC_Order_Export_Labels {
|
|
136 |
}
|
137 |
}
|
138 |
|
139 |
-
public function get_labels(){
|
140 |
return $this->labels;
|
141 |
}
|
142 |
|
@@ -151,7 +151,7 @@ class WC_Order_Export_Labels {
|
|
151 |
|
152 |
return $fetch_fields;
|
153 |
}
|
154 |
-
|
155 |
public function get_legacy_labels() {
|
156 |
$unique_keys = array();
|
157 |
foreach ( $this->labels as $label_data ) {
|
@@ -161,5 +161,5 @@ class WC_Order_Export_Labels {
|
|
161 |
}
|
162 |
|
163 |
return $unique_keys;
|
164 |
-
}
|
165 |
}
|
8 |
|
9 |
private $labels;
|
10 |
|
11 |
+
public function __get( $key ) {
|
12 |
+
if ( ! $key || empty( $this->labels ) ) {
|
13 |
return false;
|
14 |
}
|
15 |
|
22 |
return false;
|
23 |
}
|
24 |
|
25 |
+
public function __isset( $key ) {
|
26 |
+
if ( ! $key || empty( $this->labels ) ) {
|
27 |
return false;
|
28 |
}
|
29 |
|
36 |
return false;
|
37 |
}
|
38 |
|
39 |
+
public function __unset( $key ) {
|
40 |
+
if ( ! $key || empty( $this->labels ) ) {
|
41 |
return false;
|
42 |
}
|
43 |
|
44 |
foreach ( $this->labels as $num_index => $label_data ) {
|
45 |
if ( $label_data['key'] === $key || $label_data['parent_key'] === $key ) {
|
46 |
+
unset( $this->labels[ $num_index ] );
|
47 |
}
|
48 |
}
|
49 |
|
50 |
+
$this->labels = array_values( $this->labels );
|
51 |
}
|
52 |
|
53 |
public function __set( $key, $label ) {
|
72 |
}
|
73 |
|
74 |
public function get_keys() {
|
75 |
+
return array_map( function ( $label_data ) {
|
76 |
return $label_data['key'];
|
77 |
}, $this->labels );
|
78 |
}
|
79 |
|
80 |
public function is_not_empty() {
|
81 |
+
return (boolean) $this->labels;
|
82 |
}
|
83 |
|
84 |
public function to_Array() {
|
85 |
return array_combine(
|
86 |
+
array_map( function ( $label_data ) {
|
87 |
return $label_data['key'];
|
88 |
+
}, $this->labels ),
|
89 |
+
array_map( function ( $label_data ) {
|
90 |
return $label_data['label'];
|
91 |
+
}, $this->labels )
|
92 |
);
|
93 |
}
|
94 |
|
103 |
return $unique_keys;
|
104 |
}
|
105 |
|
106 |
+
public function get_childs( $key ) {
|
107 |
$child_labels = array();
|
108 |
foreach ( $this->labels as $label_data ) {
|
109 |
if ( $label_data['parent_key'] == $key ) {
|
114 |
return $child_labels;
|
115 |
}
|
116 |
|
117 |
+
public function get_parent( $key ) {
|
118 |
foreach ( $this->labels as $label_data ) {
|
119 |
if ( $label_data['key'] == $key ) {
|
120 |
return $label_data['parent_key'];
|
124 |
return false;
|
125 |
}
|
126 |
|
127 |
+
public function replace_label( $key, $new_label ) {
|
128 |
+
if ( ! $key || empty( $this->labels ) ) {
|
129 |
return;
|
130 |
}
|
131 |
|
136 |
}
|
137 |
}
|
138 |
|
139 |
+
public function get_labels() {
|
140 |
return $this->labels;
|
141 |
}
|
142 |
|
151 |
|
152 |
return $fetch_fields;
|
153 |
}
|
154 |
+
|
155 |
public function get_legacy_labels() {
|
156 |
$unique_keys = array();
|
157 |
foreach ( $this->labels as $label_data ) {
|
161 |
}
|
162 |
|
163 |
return $unique_keys;
|
164 |
+
}
|
165 |
}
|
classes/admin/class-wc-order-export-manage.php
CHANGED
@@ -14,7 +14,7 @@ class WC_Order_Export_Manage {
|
|
14 |
const EXPORT_SCHEDULE = 'cron';
|
15 |
const EXPORT_ORDER_ACTION = 'order-action';
|
16 |
|
17 |
-
|
18 |
|
19 |
static function get_days() {
|
20 |
return array(
|
@@ -92,7 +92,7 @@ class WC_Order_Export_Manage {
|
|
92 |
'shipping_methods',
|
93 |
'user_roles',
|
94 |
'user_names',
|
95 |
-
'user_custom_fields',
|
96 |
'coupons',
|
97 |
'billing_locations',
|
98 |
'payment_methods',
|
@@ -108,8 +108,8 @@ class WC_Order_Export_Manage {
|
|
108 |
}
|
109 |
}
|
110 |
|
111 |
-
$settings
|
112 |
-
$settings['id']
|
113 |
$settings['duplicated_fields_settings'] = isset( $in['duplicated_fields_settings'] ) ? $in['duplicated_fields_settings'] : array();
|
114 |
|
115 |
// setup new values for same keys
|
@@ -118,17 +118,17 @@ class WC_Order_Export_Manage {
|
|
118 |
}
|
119 |
|
120 |
$sections = array(
|
121 |
-
'orders'
|
122 |
);
|
123 |
|
124 |
$flat_formats = array( 'XLS', 'CSV', 'TSV' );
|
125 |
-
if ( ! in_array($new_settings['format'], $flat_formats) ) {
|
126 |
-
$sections[
|
127 |
-
$sections[
|
128 |
}
|
129 |
|
130 |
foreach ( $sections as $section => $fieldset ) {
|
131 |
-
$section_fields
|
132 |
$settings[ $fieldset ] = $section_fields;
|
133 |
}
|
134 |
|
@@ -137,12 +137,13 @@ class WC_Order_Export_Manage {
|
|
137 |
|
138 |
static function get( $mode, $id = false ) {
|
139 |
|
140 |
-
|
141 |
|
142 |
if ( $mode == self::EXPORT_NOW ) { // one job
|
143 |
-
|
144 |
-
|
145 |
-
|
|
|
146 |
return self::apply_defaults( $mode, $all_jobs );
|
147 |
} elseif ( $id === false ) {
|
148 |
if ( empty( $all_jobs ) OR ! is_array( $all_jobs ) ) {
|
@@ -151,9 +152,9 @@ class WC_Order_Export_Manage {
|
|
151 |
|
152 |
return array_map( function ( $item ) use ( $mode ) {
|
153 |
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
|
158 |
return WC_Order_Export_Manage::apply_defaults( $mode, $item );
|
159 |
}, $all_jobs );
|
@@ -161,90 +162,90 @@ class WC_Order_Export_Manage {
|
|
161 |
|
162 |
$settings = isset( $all_jobs[ $id ] ) ? $all_jobs[ $id ] : array();
|
163 |
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
|
168 |
return self::apply_defaults( $mode, $settings );
|
169 |
}
|
170 |
|
171 |
private static function get_defaults( $mode ) {
|
172 |
return array(
|
173 |
-
'version'
|
174 |
-
'mode'
|
175 |
-
'title'
|
176 |
-
'skip_empty_file'
|
177 |
-
'log_results'
|
178 |
-
'from_status'
|
179 |
-
'to_status'
|
180 |
-
'change_order_status_to'
|
181 |
-
'statuses'
|
182 |
-
'from_date'
|
183 |
-
'to_date'
|
184 |
-
'shipping_locations'
|
185 |
-
'shipping_methods'
|
186 |
-
'item_names'
|
187 |
-
'item_metadata'
|
188 |
-
'user_roles'
|
189 |
-
'user_names'
|
190 |
-
'user_custom_fields'
|
191 |
-
'billing_locations'
|
192 |
-
'payment_methods'
|
193 |
-
'any_coupon_used'
|
194 |
-
'coupons'
|
195 |
-
'order_custom_fields'
|
196 |
-
'product_categories'
|
197 |
-
'product_vendors'
|
198 |
-
'products'
|
199 |
-
'product_taxonomies'
|
200 |
-
'product_custom_fields'
|
201 |
-
'product_attributes'
|
202 |
-
'product_itemmeta'
|
203 |
-
'format'
|
204 |
-
'format_xls_use_xls_format'
|
205 |
-
'format_xls_sheet_name'
|
206 |
-
'format_xls_display_column_names'
|
207 |
-
'format_xls_auto_width'
|
208 |
-
'format_xls_direction_rtl'
|
209 |
-
'format_csv_enclosure'
|
210 |
-
'format_csv_delimiter'
|
211 |
-
'format_csv_linebreak'
|
212 |
-
'format_csv_display_column_names'
|
213 |
-
'format_csv_add_utf8_bom'
|
214 |
-
'format_csv_item_rows_start_from_new_line'
|
215 |
-
'format_csv_encoding'
|
216 |
-
'format_csv_delete_linebreaks'
|
217 |
-
'format_tsv_linebreak'
|
218 |
-
'format_tsv_display_column_names'
|
219 |
-
'format_tsv_add_utf8_bom'
|
220 |
-
'format_tsv_encoding'
|
221 |
-
'format_xml_root_tag'
|
222 |
-
'format_xml_order_tag'
|
223 |
-
'format_xml_product_tag'
|
224 |
-
'format_xml_coupon_tag'
|
225 |
-
'format_xml_prepend_raw_xml'
|
226 |
-
'format_xml_append_raw_xml'
|
227 |
-
'format_xml_self_closing_tags'
|
228 |
-
'all_products_from_order'
|
229 |
-
'skip_refunded_items'
|
230 |
-
'skip_suborders'
|
231 |
-
'export_refunds'
|
232 |
-
'date_format'
|
233 |
-
'time_format'
|
234 |
-
'sort_direction'
|
235 |
-
'sort'
|
236 |
-
'format_number_fields'
|
237 |
-
'export_all_comments'
|
238 |
-
'export_refund_notes'
|
239 |
-
'strip_tags_product_fields'
|
240 |
-
'cleanup_phone'
|
241 |
-
'enable_debug'
|
242 |
-
'format_json_start_tag'
|
243 |
-
'format_json_end_tag'
|
244 |
-
'custom_php'
|
245 |
-
'custom_php_code'
|
246 |
-
'mark_exported_orders'
|
247 |
-
'export_unmarked_orders'
|
248 |
|
249 |
'summary_report_by_products' => 0,
|
250 |
'duplicated_fields_settings' => array(
|
@@ -283,19 +284,19 @@ class WC_Order_Export_Manage {
|
|
283 |
foreach ( array( 'order_fields', 'order_product_fields', 'order_coupon_fields' ) as $index ) {
|
284 |
if ( ! isset( $settings[ $index ] ) ) {
|
285 |
$additional_fields = self::move_fields_key( self::get_default_fields( $index, $settings['format'] ) );
|
286 |
-
self::remove_unchecked_fields($additional_fields);
|
287 |
$settings[ $index ] = $additional_fields;
|
288 |
if ( 'order_fields' !== $index ) {
|
289 |
$map_segment = array(
|
290 |
'order_product_fields' => 'products',
|
291 |
-
'order_coupon_fields'
|
292 |
);
|
293 |
|
294 |
$settings['order_fields'] = array_merge(
|
295 |
$settings['order_fields'],
|
296 |
array_map( function ( $value ) use ( $map_segment, $index ) {
|
297 |
$value['segment'] = $map_segment[ $index ];
|
298 |
-
$value['key']
|
299 |
|
300 |
return $value;
|
301 |
}, $additional_fields )
|
@@ -307,9 +308,9 @@ class WC_Order_Export_Manage {
|
|
307 |
return array_merge( $defaults, $settings );
|
308 |
}
|
309 |
|
310 |
-
private static function get_default_fields($index, $format) {
|
311 |
$result = array();
|
312 |
-
switch ($index) {
|
313 |
case 'order_fields':
|
314 |
$result = WC_Order_Export_Data_Extractor_UI::get_order_fields( $format );
|
315 |
break;
|
@@ -324,15 +325,15 @@ class WC_Order_Export_Manage {
|
|
324 |
return $result;
|
325 |
}
|
326 |
|
327 |
-
private static function remove_unchecked_fields(&$fields) {
|
328 |
foreach ( $fields as $key => $field ) {
|
329 |
-
if (empty($field['checked'])){
|
330 |
-
unset($fields[$key]);
|
331 |
-
} elseif ( isset($field['checked']) ) {
|
332 |
-
unset($fields[$key]['checked']);
|
333 |
}
|
334 |
}
|
335 |
-
$fields = array_values($fields);
|
336 |
}
|
337 |
|
338 |
private static function move_fields_key( $fields ) {
|
@@ -348,8 +349,8 @@ class WC_Order_Export_Manage {
|
|
348 |
|
349 |
static function merge_settings_and_default_new( &$opt, $defaults ) {
|
350 |
|
351 |
-
$opt
|
352 |
-
$defaults = self::move_fields_key($defaults);
|
353 |
|
354 |
|
355 |
foreach ( $defaults as $v ) {
|
@@ -396,20 +397,20 @@ class WC_Order_Export_Manage {
|
|
396 |
} else {
|
397 |
$method = "get_order_fields_" . $segment;
|
398 |
$filter = "woe_get_order_fields_" . $segment;
|
399 |
-
}
|
400 |
-
|
401 |
if ( method_exists( 'WC_Order_Export_Data_Extractor_UI', $method ) ) {
|
402 |
// woe_get_order_fields_common filter
|
403 |
-
$segment_fields
|
404 |
$default_segment_fields = array_merge(
|
405 |
-
WC_Order_Export_Data_Extractor_UI::$method( $format ),
|
406 |
apply_filters( $filter, array(), $format )
|
407 |
);
|
408 |
foreach ( $default_segment_fields as $key => $value ) {
|
409 |
$order_field = $value;
|
410 |
$order_field['colname'] = $value['label'];
|
411 |
$order_field['key'] = $key;
|
412 |
-
$order_field['default']
|
413 |
unset( $order_field['checked'] );
|
414 |
$segment_fields[] = $order_field;
|
415 |
}
|
@@ -608,205 +609,205 @@ class WC_Order_Export_Manage {
|
|
608 |
}
|
609 |
|
610 |
//backup only existing settings
|
611 |
-
private static function backup_settings_before_version_2( $mode ){
|
612 |
-
$name
|
613 |
$current_settings = get_option( $name, array() );
|
614 |
-
$new_settings
|
615 |
// backup only once!
|
616 |
-
if( !empty($current_settings) AND empty($new_settings) ) {
|
617 |
-
update_option( $name."-V1", $current_settings, false );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
618 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
619 |
}
|
620 |
-
|
621 |
-
protected static function convert_settings_to_version_2 ( $mode, $settings ) {
|
622 |
-
|
623 |
-
if ( ! $settings ) {
|
624 |
-
return $settings;
|
625 |
-
}
|
626 |
-
self::backup_settings_before_version_2($mode);
|
627 |
-
|
628 |
-
$flat_formats = array( 'XLS', 'CSV', 'TSV' );
|
629 |
-
$is_flat_format = in_array($settings['format'], $flat_formats);
|
630 |
-
$is_json_format = $settings['format'] === 'JSON';
|
631 |
-
|
632 |
-
$order_fields = array();
|
633 |
-
$order_coupon_fields = array();
|
634 |
-
$order_product_fields = array();
|
635 |
-
$duplicated_fields_settings = array();
|
636 |
-
|
637 |
-
if ( ! empty($settings['order_fields']['products']['checked']) ) {
|
638 |
-
if (isset($settings['order_product_fields'])) {
|
639 |
-
|
640 |
-
foreach ($settings['order_product_fields'] as $key => $values) {
|
641 |
-
|
642 |
-
if ( ! $values['checked'] ) {
|
643 |
-
continue;
|
644 |
-
}
|
645 |
-
|
646 |
-
$field = array(
|
647 |
-
'key' => $key,
|
648 |
-
'label' => $values['label'],
|
649 |
-
'colname' => $values['colname'],
|
650 |
-
'format' => isset($values['format']) ? $values['format'] : 'string',
|
651 |
-
);
|
652 |
-
|
653 |
-
if ( $is_flat_format ) {
|
654 |
-
$field['key'] = 'plain_products_' . $key;
|
655 |
-
$field['segment'] = 'products';
|
656 |
-
}
|
657 |
-
|
658 |
-
// start FOR STATIC FIELDS
|
659 |
-
if ( isset( $values['value'] ) ) {
|
660 |
-
$field['value'] = $values['value'];
|
661 |
-
}
|
662 |
-
// end FOR STATIC FIELDS
|
663 |
-
|
664 |
-
|
665 |
-
$order_product_fields[] = $field;
|
666 |
-
}
|
667 |
-
}
|
668 |
-
} else {
|
669 |
-
$order_fields[] = array(
|
670 |
-
'key' => 'products',
|
671 |
-
'label' => __( 'Products', 'woo-order-export-lite' ),
|
672 |
-
'colname' => $is_json_format ? 'products' : 'Products',
|
673 |
-
'segment' => 'product',
|
674 |
-
'format' => 'string',
|
675 |
-
);
|
676 |
-
}
|
677 |
-
|
678 |
-
|
679 |
-
if ( ! empty($settings['order_fields']['coupons']['checked']) ) {
|
680 |
-
if ( isset( $settings['order_coupon_fields'] ) ) {
|
681 |
-
foreach ($settings['order_coupon_fields'] as $key => $values) {
|
682 |
-
|
683 |
-
if ( ! $values['checked'] ) {
|
684 |
-
continue;
|
685 |
-
}
|
686 |
-
|
687 |
-
$field = array(
|
688 |
-
'key' => $key,
|
689 |
-
'label' => $values['label'],
|
690 |
-
'colname' => $values['colname'],
|
691 |
-
'format' => isset($values['format']) ? $values['format'] : 'string',
|
692 |
-
);
|
693 |
-
|
694 |
-
if ( $is_flat_format ) {
|
695 |
-
$field['key'] = 'plain_coupons_' . $key;
|
696 |
-
$field['segment'] = 'coupons';
|
697 |
-
}
|
698 |
-
|
699 |
-
// start FOR STATIC FIELDS
|
700 |
-
if ( isset( $values['value'] ) ) {
|
701 |
-
$field['value'] = $values['value'];
|
702 |
-
}
|
703 |
-
if ( preg_match( '/^custom_field_(\d+)/', $key, $matches ) ) {
|
704 |
-
$field['key'] = "static_field_" . $matches[1];
|
705 |
-
}
|
706 |
-
// end FOR STATIC FIELDS
|
707 |
-
|
708 |
-
$order_coupon_fields[] = $field;
|
709 |
-
}
|
710 |
-
}
|
711 |
-
} else {
|
712 |
-
$order_fields[] = array(
|
713 |
-
'key' => 'coupons',
|
714 |
-
'label' => __( 'Coupons', 'woo-order-export-lite' ),
|
715 |
-
'colname' => $is_json_format ? 'coupons' : 'Coupons',
|
716 |
-
'segment' => 'coupon',
|
717 |
-
'format' => 'string',
|
718 |
-
);
|
719 |
-
}
|
720 |
-
|
721 |
-
|
722 |
-
if ( isset( $settings['format'] ) ) {
|
723 |
-
$old_populate_option_values = array(
|
724 |
-
isset( $settings['format_xls_populate_other_columns_product_rows'] ) && $settings['format_xls_populate_other_columns_product_rows'] == '1' && $settings['format'] == 'XLS',
|
725 |
-
isset( $settings['format_csv_populate_other_columns_product_rows'] ) && $settings['format_csv_populate_other_columns_product_rows'] == '1' && $settings['format'] == 'CSV',
|
726 |
-
isset( $settings['format_tsv_populate_other_columns_product_rows'] ) && $settings['format_tsv_populate_other_columns_product_rows'] == '1' && $settings['format'] == 'TSV',
|
727 |
-
);
|
728 |
-
|
729 |
-
$old_populate_option_values = array_filter( $old_populate_option_values );
|
730 |
-
|
731 |
-
$populate = ! empty( $old_populate_option_values );
|
732 |
-
} else {
|
733 |
-
// by default
|
734 |
-
$populate = true;
|
735 |
-
}
|
736 |
-
|
737 |
-
if (isset($settings['order_fields'])) {
|
738 |
-
foreach ($settings['order_fields'] as $key => $values) {
|
739 |
-
|
740 |
-
if ( ! $values['checked'] ) {
|
741 |
-
continue;
|
742 |
-
}
|
743 |
-
if ( ! isset($values['segment']) ) {
|
744 |
-
$values['segment'] = 'common';
|
745 |
-
}
|
746 |
-
$order_field = array(
|
747 |
-
'key' => $key,
|
748 |
-
'label' => $values['label'],
|
749 |
-
'colname' => $values['colname'],
|
750 |
-
'segment' => $values['segment'],
|
751 |
-
'format' => isset($values['format']) ? $values['format'] : 'string',
|
752 |
-
);
|
753 |
-
|
754 |
-
// start FOR STATIC FIELDS
|
755 |
-
if ( isset( $values['value'] ) ) {
|
756 |
-
$order_field['value'] = $values['value'];
|
757 |
-
}
|
758 |
-
if ( $is_flat_format ) {
|
759 |
-
if ( preg_match( '/^custom_field_(\d+)/', $key, $matches ) ) {
|
760 |
-
$order_field['key'] = "static_field_" . $matches[1];
|
761 |
-
}
|
762 |
-
}
|
763 |
-
// end FOR STATIC FIELDS
|
764 |
-
|
765 |
-
$order_fields[] = $order_field;
|
766 |
-
|
767 |
-
|
768 |
-
if ( $key === 'products' && $is_flat_format) {
|
769 |
-
$order_fields = array_merge($order_fields, $order_product_fields);
|
770 |
-
}
|
771 |
-
|
772 |
-
if ( $key === 'coupons' && $is_flat_format) {
|
773 |
-
$order_fields = array_merge($order_fields, $order_coupon_fields);
|
774 |
-
}
|
775 |
-
|
776 |
-
if ( in_array( $key, array( 'products', 'coupons' ) ) ) {
|
777 |
-
$duplicated_fields_settings[$key] = array(
|
778 |
-
'repeat' => isset($values['repeat']) ? $values['repeat'] : 'rows',
|
779 |
-
'max_cols' => isset($values['max_cols']) ? $values['max_cols'] : '10',
|
780 |
-
'line_delimiter' => '\\n',
|
781 |
-
);
|
782 |
-
if ( $key == 'products' ) {
|
783 |
-
$duplicated_fields_settings[$key]['populate_other_columns'] = $populate ? '1' : '0';
|
784 |
-
}
|
785 |
-
}
|
786 |
-
}
|
787 |
-
}
|
788 |
-
|
789 |
-
if ( $duplicated_fields_settings ) {
|
790 |
-
$settings['duplicated_fields_settings'] = $duplicated_fields_settings;
|
791 |
-
}
|
792 |
-
|
793 |
-
$defaults = self::get_defaults( $settings['mode'] );
|
794 |
-
if ( ! isset( $duplicated_fields_settings['products'] ) ) {
|
795 |
-
$settings['duplicated_fields_settings']['products'] = $defaults['duplicated_fields_settings']['products'];
|
796 |
-
}
|
797 |
-
if ( ! isset( $duplicated_fields_settings['coupons'] ) ) {
|
798 |
-
$settings['duplicated_fields_settings']['coupons'] = $defaults['duplicated_fields_settings']['coupons'];
|
799 |
-
}
|
800 |
-
|
801 |
-
$settings['order_fields'] = $order_fields;
|
802 |
-
|
803 |
-
$settings['order_product_fields'] = $is_flat_format ? array() : $order_product_fields;
|
804 |
-
$settings['order_coupon_fields'] = $is_flat_format ? array() : $order_coupon_fields;
|
805 |
-
|
806 |
-
unset($duplicated_fields_settings, $order_coupon_fields, $order_product_fields, $order_fields);
|
807 |
-
|
808 |
-
return $settings;
|
809 |
-
}
|
810 |
|
811 |
|
812 |
}
|
14 |
const EXPORT_SCHEDULE = 'cron';
|
15 |
const EXPORT_ORDER_ACTION = 'order-action';
|
16 |
|
17 |
+
public static $edit_existing_job = false;
|
18 |
|
19 |
static function get_days() {
|
20 |
return array(
|
92 |
'shipping_methods',
|
93 |
'user_roles',
|
94 |
'user_names',
|
95 |
+
'user_custom_fields',
|
96 |
'coupons',
|
97 |
'billing_locations',
|
98 |
'payment_methods',
|
108 |
}
|
109 |
}
|
110 |
|
111 |
+
$settings = self::get( $in['mode'], $in['id'] );
|
112 |
+
$settings['id'] = $in['id'];
|
113 |
$settings['duplicated_fields_settings'] = isset( $in['duplicated_fields_settings'] ) ? $in['duplicated_fields_settings'] : array();
|
114 |
|
115 |
// setup new values for same keys
|
118 |
}
|
119 |
|
120 |
$sections = array(
|
121 |
+
'orders' => 'order_fields',
|
122 |
);
|
123 |
|
124 |
$flat_formats = array( 'XLS', 'CSV', 'TSV' );
|
125 |
+
if ( ! in_array( $new_settings['format'], $flat_formats ) ) {
|
126 |
+
$sections['products'] = 'order_product_fields';
|
127 |
+
$sections['coupons'] = 'order_coupon_fields';
|
128 |
}
|
129 |
|
130 |
foreach ( $sections as $section => $fieldset ) {
|
131 |
+
$section_fields = isset( $in[ $section ] ) ? $in[ $section ] : array();
|
132 |
$settings[ $fieldset ] = $section_fields;
|
133 |
}
|
134 |
|
137 |
|
138 |
static function get( $mode, $id = false ) {
|
139 |
|
140 |
+
$all_jobs = self::get_export_settings_collection( $mode );
|
141 |
|
142 |
if ( $mode == self::EXPORT_NOW ) { // one job
|
143 |
+
if ( ! isset( $all_jobs['version'] ) ) {
|
144 |
+
$all_jobs = self::convert_settings_to_version_2( $mode, $all_jobs );
|
145 |
+
}
|
146 |
+
|
147 |
return self::apply_defaults( $mode, $all_jobs );
|
148 |
} elseif ( $id === false ) {
|
149 |
if ( empty( $all_jobs ) OR ! is_array( $all_jobs ) ) {
|
152 |
|
153 |
return array_map( function ( $item ) use ( $mode ) {
|
154 |
|
155 |
+
if ( ! isset( $item['version'] ) ) {
|
156 |
+
$item = self::convert_settings_to_version_2( $mode, $item );
|
157 |
+
}
|
158 |
|
159 |
return WC_Order_Export_Manage::apply_defaults( $mode, $item );
|
160 |
}, $all_jobs );
|
162 |
|
163 |
$settings = isset( $all_jobs[ $id ] ) ? $all_jobs[ $id ] : array();
|
164 |
|
165 |
+
if ( ! isset( $settings['version'] ) ) {
|
166 |
+
$settings = self::convert_settings_to_version_2( $mode, $settings );
|
167 |
+
}
|
168 |
|
169 |
return self::apply_defaults( $mode, $settings );
|
170 |
}
|
171 |
|
172 |
private static function get_defaults( $mode ) {
|
173 |
return array(
|
174 |
+
'version' => '2.0',
|
175 |
+
'mode' => $mode,
|
176 |
+
'title' => '',
|
177 |
+
'skip_empty_file' => true,
|
178 |
+
'log_results' => false,
|
179 |
+
'from_status' => array(),
|
180 |
+
'to_status' => array(),
|
181 |
+
'change_order_status_to' => '',
|
182 |
+
'statuses' => array(),
|
183 |
+
'from_date' => '',
|
184 |
+
'to_date' => '',
|
185 |
+
'shipping_locations' => array(),
|
186 |
+
'shipping_methods' => array(),
|
187 |
+
'item_names' => array(),
|
188 |
+
'item_metadata' => array(),
|
189 |
+
'user_roles' => array(),
|
190 |
+
'user_names' => array(),
|
191 |
+
'user_custom_fields' => array(),
|
192 |
+
'billing_locations' => array(),
|
193 |
+
'payment_methods' => array(),
|
194 |
+
'any_coupon_used' => 0,
|
195 |
+
'coupons' => array(),
|
196 |
+
'order_custom_fields' => array(),
|
197 |
+
'product_categories' => array(),
|
198 |
+
'product_vendors' => array(),
|
199 |
+
'products' => array(),
|
200 |
+
'product_taxonomies' => array(),
|
201 |
+
'product_custom_fields' => array(),
|
202 |
+
'product_attributes' => array(),
|
203 |
+
'product_itemmeta' => array(),
|
204 |
+
'format' => 'XLS',
|
205 |
+
'format_xls_use_xls_format' => 0,
|
206 |
+
'format_xls_sheet_name' => __( 'Orders', 'woo-order-export-lite' ),
|
207 |
+
'format_xls_display_column_names' => 1,
|
208 |
+
'format_xls_auto_width' => 1,
|
209 |
+
'format_xls_direction_rtl' => 0,
|
210 |
+
'format_csv_enclosure' => '"',
|
211 |
+
'format_csv_delimiter' => ',',
|
212 |
+
'format_csv_linebreak' => '\r\n',
|
213 |
+
'format_csv_display_column_names' => 1,
|
214 |
+
'format_csv_add_utf8_bom' => 0,
|
215 |
+
'format_csv_item_rows_start_from_new_line' => 0,
|
216 |
+
'format_csv_encoding' => 'UTF-8',
|
217 |
+
'format_csv_delete_linebreaks' => 0,
|
218 |
+
'format_tsv_linebreak' => '\r\n',
|
219 |
+
'format_tsv_display_column_names' => 1,
|
220 |
+
'format_tsv_add_utf8_bom' => 0,
|
221 |
+
'format_tsv_encoding' => 'UTF-8',
|
222 |
+
'format_xml_root_tag' => 'Orders',
|
223 |
+
'format_xml_order_tag' => 'Order',
|
224 |
+
'format_xml_product_tag' => 'Product',
|
225 |
+
'format_xml_coupon_tag' => 'Coupon',
|
226 |
+
'format_xml_prepend_raw_xml' => '',
|
227 |
+
'format_xml_append_raw_xml' => '',
|
228 |
+
'format_xml_self_closing_tags' => 1,
|
229 |
+
'all_products_from_order' => 1,
|
230 |
+
'skip_refunded_items' => 1,
|
231 |
+
'skip_suborders' => 0,
|
232 |
+
'export_refunds' => 0,
|
233 |
+
'date_format' => 'Y-m-d',
|
234 |
+
'time_format' => 'H:i',
|
235 |
+
'sort_direction' => 'DESC',
|
236 |
+
'sort' => 'order_id',
|
237 |
+
'format_number_fields' => 0,
|
238 |
+
'export_all_comments' => 0,
|
239 |
+
'export_refund_notes' => 0,
|
240 |
+
'strip_tags_product_fields' => 0,
|
241 |
+
'cleanup_phone' => 0,
|
242 |
+
'enable_debug' => 0,
|
243 |
+
'format_json_start_tag' => '[',
|
244 |
+
'format_json_end_tag' => ']',
|
245 |
+
'custom_php' => 0,
|
246 |
+
'custom_php_code' => '',
|
247 |
+
'mark_exported_orders' => 0,
|
248 |
+
'export_unmarked_orders' => 0,
|
249 |
|
250 |
'summary_report_by_products' => 0,
|
251 |
'duplicated_fields_settings' => array(
|
284 |
foreach ( array( 'order_fields', 'order_product_fields', 'order_coupon_fields' ) as $index ) {
|
285 |
if ( ! isset( $settings[ $index ] ) ) {
|
286 |
$additional_fields = self::move_fields_key( self::get_default_fields( $index, $settings['format'] ) );
|
287 |
+
self::remove_unchecked_fields( $additional_fields );
|
288 |
$settings[ $index ] = $additional_fields;
|
289 |
if ( 'order_fields' !== $index ) {
|
290 |
$map_segment = array(
|
291 |
'order_product_fields' => 'products',
|
292 |
+
'order_coupon_fields' => 'coupons',
|
293 |
);
|
294 |
|
295 |
$settings['order_fields'] = array_merge(
|
296 |
$settings['order_fields'],
|
297 |
array_map( function ( $value ) use ( $map_segment, $index ) {
|
298 |
$value['segment'] = $map_segment[ $index ];
|
299 |
+
$value['key'] = 'plain_' . $map_segment[ $index ] . '_' . $value['key'];
|
300 |
|
301 |
return $value;
|
302 |
}, $additional_fields )
|
308 |
return array_merge( $defaults, $settings );
|
309 |
}
|
310 |
|
311 |
+
private static function get_default_fields( $index, $format ) {
|
312 |
$result = array();
|
313 |
+
switch ( $index ) {
|
314 |
case 'order_fields':
|
315 |
$result = WC_Order_Export_Data_Extractor_UI::get_order_fields( $format );
|
316 |
break;
|
325 |
return $result;
|
326 |
}
|
327 |
|
328 |
+
private static function remove_unchecked_fields( &$fields ) {
|
329 |
foreach ( $fields as $key => $field ) {
|
330 |
+
if ( empty( $field['checked'] ) ) {
|
331 |
+
unset( $fields[ $key ] );
|
332 |
+
} elseif ( isset( $field['checked'] ) ) {
|
333 |
+
unset( $fields[ $key ]['checked'] );
|
334 |
}
|
335 |
}
|
336 |
+
$fields = array_values( $fields );
|
337 |
}
|
338 |
|
339 |
private static function move_fields_key( $fields ) {
|
349 |
|
350 |
static function merge_settings_and_default_new( &$opt, $defaults ) {
|
351 |
|
352 |
+
$opt = self::move_fields_key( $opt );
|
353 |
+
$defaults = self::move_fields_key( $defaults );
|
354 |
|
355 |
|
356 |
foreach ( $defaults as $v ) {
|
397 |
} else {
|
398 |
$method = "get_order_fields_" . $segment;
|
399 |
$filter = "woe_get_order_fields_" . $segment;
|
400 |
+
}
|
401 |
+
|
402 |
if ( method_exists( 'WC_Order_Export_Data_Extractor_UI', $method ) ) {
|
403 |
// woe_get_order_fields_common filter
|
404 |
+
$segment_fields = array();
|
405 |
$default_segment_fields = array_merge(
|
406 |
+
WC_Order_Export_Data_Extractor_UI::$method( $format ),
|
407 |
apply_filters( $filter, array(), $format )
|
408 |
);
|
409 |
foreach ( $default_segment_fields as $key => $value ) {
|
410 |
$order_field = $value;
|
411 |
$order_field['colname'] = $value['label'];
|
412 |
$order_field['key'] = $key;
|
413 |
+
$order_field['default'] = 1;
|
414 |
unset( $order_field['checked'] );
|
415 |
$segment_fields[] = $order_field;
|
416 |
}
|
609 |
}
|
610 |
|
611 |
//backup only existing settings
|
612 |
+
private static function backup_settings_before_version_2( $mode ) {
|
613 |
+
$name = self::get_settings_name_for_mode( $mode );
|
614 |
$current_settings = get_option( $name, array() );
|
615 |
+
$new_settings = get_option( $name . "-V1", array() );
|
616 |
// backup only once!
|
617 |
+
if ( ! empty( $current_settings ) AND empty( $new_settings ) ) {
|
618 |
+
update_option( $name . "-V1", $current_settings, false );
|
619 |
+
}
|
620 |
+
}
|
621 |
+
|
622 |
+
protected static function convert_settings_to_version_2( $mode, $settings ) {
|
623 |
+
|
624 |
+
if ( ! $settings ) {
|
625 |
+
return $settings;
|
626 |
+
}
|
627 |
+
self::backup_settings_before_version_2( $mode );
|
628 |
+
|
629 |
+
$flat_formats = array( 'XLS', 'CSV', 'TSV' );
|
630 |
+
$is_flat_format = in_array( $settings['format'], $flat_formats );
|
631 |
+
$is_json_format = $settings['format'] === 'JSON';
|
632 |
+
|
633 |
+
$order_fields = array();
|
634 |
+
$order_coupon_fields = array();
|
635 |
+
$order_product_fields = array();
|
636 |
+
$duplicated_fields_settings = array();
|
637 |
+
|
638 |
+
if ( ! empty( $settings['order_fields']['products']['checked'] ) ) {
|
639 |
+
if ( isset( $settings['order_product_fields'] ) ) {
|
640 |
+
|
641 |
+
foreach ( $settings['order_product_fields'] as $key => $values ) {
|
642 |
+
|
643 |
+
if ( ! $values['checked'] ) {
|
644 |
+
continue;
|
645 |
+
}
|
646 |
+
|
647 |
+
$field = array(
|
648 |
+
'key' => $key,
|
649 |
+
'label' => $values['label'],
|
650 |
+
'colname' => $values['colname'],
|
651 |
+
'format' => isset( $values['format'] ) ? $values['format'] : 'string',
|
652 |
+
);
|
653 |
+
|
654 |
+
if ( $is_flat_format ) {
|
655 |
+
$field['key'] = 'plain_products_' . $key;
|
656 |
+
$field['segment'] = 'products';
|
657 |
+
}
|
658 |
+
|
659 |
+
// start FOR STATIC FIELDS
|
660 |
+
if ( isset( $values['value'] ) ) {
|
661 |
+
$field['value'] = $values['value'];
|
662 |
+
}
|
663 |
+
// end FOR STATIC FIELDS
|
664 |
+
|
665 |
+
|
666 |
+
$order_product_fields[] = $field;
|
667 |
+
}
|
668 |
+
}
|
669 |
+
} else {
|
670 |
+
$order_fields[] = array(
|
671 |
+
'key' => 'products',
|
672 |
+
'label' => __( 'Products', 'woo-order-export-lite' ),
|
673 |
+
'colname' => $is_json_format ? 'products' : 'Products',
|
674 |
+
'segment' => 'product',
|
675 |
+
'format' => 'string',
|
676 |
+
);
|
677 |
}
|
678 |
+
|
679 |
+
|
680 |
+
if ( ! empty( $settings['order_fields']['coupons']['checked'] ) ) {
|
681 |
+
if ( isset( $settings['order_coupon_fields'] ) ) {
|
682 |
+
foreach ( $settings['order_coupon_fields'] as $key => $values ) {
|
683 |
+
|
684 |
+
if ( ! $values['checked'] ) {
|
685 |
+
continue;
|
686 |
+
}
|
687 |
+
|
688 |
+
$field = array(
|
689 |
+
'key' => $key,
|
690 |
+
'label' => $values['label'],
|
691 |
+
'colname' => $values['colname'],
|
692 |
+
'format' => isset( $values['format'] ) ? $values['format'] : 'string',
|
693 |
+
);
|
694 |
+
|
695 |
+
if ( $is_flat_format ) {
|
696 |
+
$field['key'] = 'plain_coupons_' . $key;
|
697 |
+
$field['segment'] = 'coupons';
|
698 |
+
}
|
699 |
+
|
700 |
+
// start FOR STATIC FIELDS
|
701 |
+
if ( isset( $values['value'] ) ) {
|
702 |
+
$field['value'] = $values['value'];
|
703 |
+
}
|
704 |
+
if ( preg_match( '/^custom_field_(\d+)/', $key, $matches ) ) {
|
705 |
+
$field['key'] = "static_field_" . $matches[1];
|
706 |
+
}
|
707 |
+
// end FOR STATIC FIELDS
|
708 |
+
|
709 |
+
$order_coupon_fields[] = $field;
|
710 |
+
}
|
711 |
+
}
|
712 |
+
} else {
|
713 |
+
$order_fields[] = array(
|
714 |
+
'key' => 'coupons',
|
715 |
+
'label' => __( 'Coupons', 'woo-order-export-lite' ),
|
716 |
+
'colname' => $is_json_format ? 'coupons' : 'Coupons',
|
717 |
+
'segment' => 'coupon',
|
718 |
+
'format' => 'string',
|
719 |
+
);
|
720 |
+
}
|
721 |
+
|
722 |
+
|
723 |
+
if ( isset( $settings['format'] ) ) {
|
724 |
+
$old_populate_option_values = array(
|
725 |
+
isset( $settings['format_xls_populate_other_columns_product_rows'] ) && $settings['format_xls_populate_other_columns_product_rows'] == '1' && $settings['format'] == 'XLS',
|
726 |
+
isset( $settings['format_csv_populate_other_columns_product_rows'] ) && $settings['format_csv_populate_other_columns_product_rows'] == '1' && $settings['format'] == 'CSV',
|
727 |
+
isset( $settings['format_tsv_populate_other_columns_product_rows'] ) && $settings['format_tsv_populate_other_columns_product_rows'] == '1' && $settings['format'] == 'TSV',
|
728 |
+
);
|
729 |
+
|
730 |
+
$old_populate_option_values = array_filter( $old_populate_option_values );
|
731 |
+
|
732 |
+
$populate = ! empty( $old_populate_option_values );
|
733 |
+
} else {
|
734 |
+
// by default
|
735 |
+
$populate = true;
|
736 |
+
}
|
737 |
+
|
738 |
+
if ( isset( $settings['order_fields'] ) ) {
|
739 |
+
foreach ( $settings['order_fields'] as $key => $values ) {
|
740 |
+
|
741 |
+
if ( ! $values['checked'] ) {
|
742 |
+
continue;
|
743 |
+
}
|
744 |
+
if ( ! isset( $values['segment'] ) ) {
|
745 |
+
$values['segment'] = 'common';
|
746 |
+
}
|
747 |
+
$order_field = array(
|
748 |
+
'key' => $key,
|
749 |
+
'label' => $values['label'],
|
750 |
+
'colname' => $values['colname'],
|
751 |
+
'segment' => $values['segment'],
|
752 |
+
'format' => isset( $values['format'] ) ? $values['format'] : 'string',
|
753 |
+
);
|
754 |
+
|
755 |
+
// start FOR STATIC FIELDS
|
756 |
+
if ( isset( $values['value'] ) ) {
|
757 |
+
$order_field['value'] = $values['value'];
|
758 |
+
}
|
759 |
+
if ( $is_flat_format ) {
|
760 |
+
if ( preg_match( '/^custom_field_(\d+)/', $key, $matches ) ) {
|
761 |
+
$order_field['key'] = "static_field_" . $matches[1];
|
762 |
+
}
|
763 |
+
}
|
764 |
+
// end FOR STATIC FIELDS
|
765 |
+
|
766 |
+
$order_fields[] = $order_field;
|
767 |
+
|
768 |
+
|
769 |
+
if ( $key === 'products' && $is_flat_format ) {
|
770 |
+
$order_fields = array_merge( $order_fields, $order_product_fields );
|
771 |
+
}
|
772 |
+
|
773 |
+
if ( $key === 'coupons' && $is_flat_format ) {
|
774 |
+
$order_fields = array_merge( $order_fields, $order_coupon_fields );
|
775 |
+
}
|
776 |
+
|
777 |
+
if ( in_array( $key, array( 'products', 'coupons' ) ) ) {
|
778 |
+
$duplicated_fields_settings[ $key ] = array(
|
779 |
+
'repeat' => isset( $values['repeat'] ) ? $values['repeat'] : 'rows',
|
780 |
+
'max_cols' => isset( $values['max_cols'] ) ? $values['max_cols'] : '10',
|
781 |
+
'line_delimiter' => '\\n',
|
782 |
+
);
|
783 |
+
if ( $key == 'products' ) {
|
784 |
+
$duplicated_fields_settings[ $key ]['populate_other_columns'] = $populate ? '1' : '0';
|
785 |
+
}
|
786 |
+
}
|
787 |
+
}
|
788 |
+
}
|
789 |
+
|
790 |
+
if ( $duplicated_fields_settings ) {
|
791 |
+
$settings['duplicated_fields_settings'] = $duplicated_fields_settings;
|
792 |
+
}
|
793 |
+
|
794 |
+
$defaults = self::get_defaults( $settings['mode'] );
|
795 |
+
if ( ! isset( $duplicated_fields_settings['products'] ) ) {
|
796 |
+
$settings['duplicated_fields_settings']['products'] = $defaults['duplicated_fields_settings']['products'];
|
797 |
+
}
|
798 |
+
if ( ! isset( $duplicated_fields_settings['coupons'] ) ) {
|
799 |
+
$settings['duplicated_fields_settings']['coupons'] = $defaults['duplicated_fields_settings']['coupons'];
|
800 |
+
}
|
801 |
+
|
802 |
+
$settings['order_fields'] = $order_fields;
|
803 |
+
|
804 |
+
$settings['order_product_fields'] = $is_flat_format ? array() : $order_product_fields;
|
805 |
+
$settings['order_coupon_fields'] = $is_flat_format ? array() : $order_coupon_fields;
|
806 |
+
|
807 |
+
unset( $duplicated_fields_settings, $order_coupon_fields, $order_product_fields, $order_fields );
|
808 |
+
|
809 |
+
return $settings;
|
810 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
811 |
|
812 |
|
813 |
}
|
classes/class-wc-order-export-admin.php
CHANGED
@@ -24,7 +24,7 @@ class WC_Order_Export_Admin {
|
|
24 |
// load scripts on our pages only
|
25 |
if ( isset( $_GET['page'] ) && $_GET['page'] == 'wc-order-export' ) {
|
26 |
add_action( 'admin_enqueue_scripts', array( $this, 'thematic_enqueue_scripts' ) );
|
27 |
-
add_filter( 'script_loader_src', array( $this, 'script_loader_src' ),
|
28 |
}
|
29 |
add_action( 'wp_ajax_order_exporter', array( $this, 'ajax_gate' ) );
|
30 |
|
@@ -134,7 +134,7 @@ class WC_Order_Export_Admin {
|
|
134 |
'woo-order-export-lite' ); ?></p>
|
135 |
</div>
|
136 |
<?php
|
137 |
-
update_option( $this->activation_notice_option, true, false);
|
138 |
}
|
139 |
|
140 |
public function add_action_links( $links ) {
|
@@ -570,34 +570,34 @@ class WC_Order_Export_Admin {
|
|
570 |
WOE_VERSION );
|
571 |
|
572 |
$localize_settings_form = array(
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
|
599 |
);
|
600 |
-
|
601 |
|
602 |
|
603 |
$settings_form = array(
|
@@ -651,9 +651,9 @@ class WC_Order_Export_Admin {
|
|
651 |
wp_localize_script( 'export', 'export_messages', $translation_array );
|
652 |
|
653 |
$script_data = array(
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
|
658 |
wp_localize_script( 'export', 'script_data', $script_data );
|
659 |
}
|
@@ -672,7 +672,7 @@ class WC_Order_Export_Admin {
|
|
672 |
);
|
673 |
|
674 |
return isset( $select2_locales[ $locale ] ) ? $select2_locales[ $locale ] : 'en';
|
675 |
-
|
676 |
|
677 |
private function enqueue_select2_scripts() {
|
678 |
wp_enqueue_script( 'select22', $this->url_plugin . 'assets/js/select2/select2.full.js',
|
@@ -680,11 +680,11 @@ class WC_Order_Export_Admin {
|
|
680 |
|
681 |
|
682 |
if ( $select2_locale = $this->get_select2_locale() ) {
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
}
|
689 |
|
690 |
wp_enqueue_style( 'select2-css', $this->url_plugin . 'assets/css/select2/select2.min.css',
|
@@ -699,6 +699,8 @@ class WC_Order_Export_Admin {
|
|
699 |
) {
|
700 |
return $src;
|
701 |
}
|
|
|
|
|
702 |
}
|
703 |
|
704 |
public function render( $view, $params = array(), $path_views = null ) {
|
24 |
// load scripts on our pages only
|
25 |
if ( isset( $_GET['page'] ) && $_GET['page'] == 'wc-order-export' ) {
|
26 |
add_action( 'admin_enqueue_scripts', array( $this, 'thematic_enqueue_scripts' ) );
|
27 |
+
add_filter( 'script_loader_src', array( $this, 'script_loader_src' ), 999, 2 );
|
28 |
}
|
29 |
add_action( 'wp_ajax_order_exporter', array( $this, 'ajax_gate' ) );
|
30 |
|
134 |
'woo-order-export-lite' ); ?></p>
|
135 |
</div>
|
136 |
<?php
|
137 |
+
update_option( $this->activation_notice_option, true, false );
|
138 |
}
|
139 |
|
140 |
public function add_action_links( $links ) {
|
570 |
WOE_VERSION );
|
571 |
|
572 |
$localize_settings_form = array(
|
573 |
+
'add_fields_to_export' => __( 'Add %s fields', 'woo-order-export-lite' ),
|
574 |
+
'repeats' => array(
|
575 |
+
'rows' => __( 'rows', 'woo-order-export-lite' ),
|
576 |
+
'columns' => __( 'columns', 'woo-order-export-lite' ),
|
577 |
+
'inside_one_cell' => __( 'one row', 'woo-order-export-lite' ),
|
578 |
+
),
|
579 |
+
'js_tpl_popup' => array(
|
580 |
+
'add' => __( 'Add', 'woo-order-export-lite' ),
|
581 |
+
'as' => __( 'as', 'woo-order-export-lite' ),
|
582 |
+
'split_values_by' => __( 'Split values by', 'woo-order-export-lite' ),
|
583 |
+
'fill_order_columns_label' => __( 'Fill order columns for', 'woo-order-export-lite' ),
|
584 |
+
'for_all_rows_label' => __( 'all rows', 'woo-order-export-lite' ),
|
585 |
+
'for_first_row_only_label' => __( '1st row only', 'woo-order-export-lite' ),
|
586 |
+
'grouping_by' => array(
|
587 |
+
'products' => __( 'Grouping by product', 'woo-order-export-lite' ),
|
588 |
+
'coupons' => __( 'Grouping by coupon', 'woo-order-export-lite' ),
|
589 |
+
),
|
590 |
+
),
|
591 |
+
'index' => array(
|
592 |
+
'product_pop_up_title' => __( 'Set up product fields', 'woo-order-export-lite' ),
|
593 |
+
'coupon_pop_up_title' => __( 'Set up coupon fields', 'woo-order-export-lite' ),
|
594 |
+
'products' => __( 'products', 'woo-order-export-lite' ),
|
595 |
+
'coupons' => __( 'coupons', 'woo-order-export-lite' ),
|
596 |
+
),
|
597 |
+
'remove_all_fields_confirm' => __( 'Remove all fields?', 'woo-order-export-lite' ),
|
598 |
|
599 |
);
|
600 |
+
wp_localize_script( 'settings-form', 'localize_settings_form', $localize_settings_form );
|
601 |
|
602 |
|
603 |
$settings_form = array(
|
651 |
wp_localize_script( 'export', 'export_messages', $translation_array );
|
652 |
|
653 |
$script_data = array(
|
654 |
+
'locale' => get_locale(),
|
655 |
+
'select2_locale' => $this->get_select2_locale(),
|
656 |
+
);
|
657 |
|
658 |
wp_localize_script( 'export', 'script_data', $script_data );
|
659 |
}
|
672 |
);
|
673 |
|
674 |
return isset( $select2_locales[ $locale ] ) ? $select2_locales[ $locale ] : 'en';
|
675 |
+
}
|
676 |
|
677 |
private function enqueue_select2_scripts() {
|
678 |
wp_enqueue_script( 'select22', $this->url_plugin . 'assets/js/select2/select2.full.js',
|
680 |
|
681 |
|
682 |
if ( $select2_locale = $this->get_select2_locale() ) {
|
683 |
+
// enable by default
|
684 |
+
if ( $select2_locale !== 'en' ) {
|
685 |
+
wp_enqueue_script( "select22-i18n-{$select2_locale}",
|
686 |
+
$this->url_plugin . "assets/js/select2/i18n/{$select2_locale}.js", array( 'jquery', 'select22' ) );
|
687 |
+
}
|
688 |
}
|
689 |
|
690 |
wp_enqueue_style( 'select2-css', $this->url_plugin . 'assets/css/select2/select2.min.css',
|
699 |
) {
|
700 |
return $src;
|
701 |
}
|
702 |
+
|
703 |
+
return "";
|
704 |
}
|
705 |
|
706 |
public function render( $view, $params = array(), $path_views = null ) {
|
classes/core/class-wc-order-export-data-extractor-ui.php
CHANGED
@@ -141,8 +141,8 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
141 |
|
142 |
public static function get_products_like( $like, $limit ) {
|
143 |
global $wpdb;
|
144 |
-
$like
|
145 |
-
$query
|
146 |
SELECT post.ID as id,post.post_title as text,att.ID as photo_id,att.guid as photo_url
|
147 |
FROM " . $wpdb->posts . " as post
|
148 |
LEFT JOIN " . $wpdb->posts . " AS att ON post.ID=att.post_parent AND att.post_type='attachment'
|
@@ -151,8 +151,8 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
151 |
AND post.post_status <> 'trash'
|
152 |
GROUP BY post.ID
|
153 |
ORDER BY post.post_title
|
154 |
-
LIMIT " . intval($limit);
|
155 |
-
|
156 |
$products = $wpdb->get_results( $query );
|
157 |
foreach ( $products as $key => $product ) {
|
158 |
if ( $product->photo_id ) {
|
@@ -340,201 +340,210 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
340 |
|
341 |
public static function get_order_product_fields( $format ) {
|
342 |
$map = array(
|
343 |
-
'item_id'
|
344 |
'label' => __( 'Item ID', 'woo-order-export-lite' ),
|
345 |
'checked' => 0,
|
346 |
-
'format'
|
347 |
),
|
348 |
-
'line_id'
|
349 |
-
'label'
|
350 |
'checked' => 1,
|
351 |
-
'format'
|
352 |
),
|
353 |
-
'sku'
|
354 |
-
'label'
|
355 |
'checked' => 1,
|
356 |
-
'format' =>'string',
|
357 |
),
|
358 |
-
'name'
|
359 |
'label' => __( 'Item Name', 'woo-order-export-lite' ),
|
360 |
'checked' => 1,
|
361 |
-
'format' =>'string',
|
362 |
),
|
363 |
-
'product_id'
|
364 |
'label' => __( 'Product Id', 'woo-order-export-lite' ),
|
365 |
'checked' => 0,
|
366 |
-
'format'
|
367 |
),
|
368 |
-
'product_name'
|
369 |
'label' => __( 'Product Name', 'woo-order-export-lite' ),
|
370 |
'checked' => 0,
|
371 |
-
'format' =>'string',
|
372 |
),
|
373 |
-
'variation_id'
|
374 |
'label' => __( 'Variation Id', 'woo-order-export-lite' ),
|
375 |
'checked' => 0,
|
376 |
-
'format' =>'number',
|
377 |
),
|
378 |
-
'product_variation'
|
379 |
'label' => __( 'Product Variation', 'woo-order-export-lite' ),
|
380 |
'checked' => 0,
|
381 |
-
'format' =>'string',
|
382 |
),
|
383 |
-
'seller'
|
384 |
'label' => __( 'Item Seller', 'woo-order-export-lite' ),
|
385 |
'checked' => 0,
|
386 |
-
'format' =>'string',
|
387 |
),
|
388 |
-
'qty'
|
389 |
'label' => __( 'Quantity', 'woo-order-export-lite' ),
|
390 |
'checked' => 1,
|
391 |
-
'format' =>'number',
|
392 |
),
|
393 |
-
'qty_minus_refund'
|
394 |
'label' => __( 'Quantity (- Refund)', 'woo-order-export-lite' ),
|
395 |
'checked' => 0,
|
396 |
-
'format' =>'number',
|
397 |
),
|
398 |
-
'item_price'
|
399 |
'label' => __( 'Item Cost', 'woo-order-export-lite' ),
|
400 |
'checked' => 1,
|
401 |
'format' => 'money',
|
402 |
),
|
403 |
-
'price'
|
404 |
'label' => __( 'Product Current Price', 'woo-order-export-lite' ),
|
405 |
'checked' => 0,
|
406 |
'format' => 'money',
|
407 |
),
|
408 |
-
'line_no_tax'
|
409 |
'label' => __( 'Order Line (w/o tax)', 'woo-order-export-lite' ),
|
410 |
'checked' => 0,
|
411 |
'format' => 'money',
|
412 |
),
|
413 |
-
'line_tax'
|
414 |
'label' => __( 'Order Line Tax', 'woo-order-export-lite' ),
|
415 |
'checked' => 0,
|
416 |
'format' => 'money',
|
417 |
),
|
418 |
-
'line_tax_refunded'
|
419 |
'label' => __( 'Order Line Tax Refunded', 'woo-order-export-lite' ),
|
420 |
'checked' => 0,
|
421 |
'format' => 'money',
|
422 |
),
|
423 |
-
'line_tax_minus_refund'
|
424 |
'label' => __( 'Order Line Tax (- Refund)', 'woo-order-export-lite' ),
|
425 |
'checked' => 0,
|
426 |
'format' => 'money',
|
427 |
),
|
428 |
-
'line_subtotal'
|
429 |
'label' => __( 'Order Line Subtotal', 'woo-order-export-lite' ),
|
430 |
'checked' => 0,
|
431 |
'format' => 'money',
|
432 |
),
|
433 |
-
'line_subtotal_tax'
|
434 |
'label' => __( 'Order Line Subtotal Tax', 'woo-order-export-lite' ),
|
435 |
'checked' => 0,
|
436 |
'format' => 'money',
|
437 |
),
|
438 |
-
'line_total'
|
439 |
'label' => __( 'Order Line Total', 'woo-order-export-lite' ),
|
440 |
'checked' => 0,
|
441 |
'format' => 'money',
|
442 |
),
|
443 |
-
'line_total_plus_tax'
|
444 |
'label' => __( 'Order Line Total (include tax)', 'woo-order-export-lite' ),
|
445 |
'checked' => 0,
|
446 |
'format' => 'money',
|
447 |
),
|
448 |
-
'line_total_refunded'
|
449 |
'label' => __( 'Order Line Total Refunded', 'woo-order-export-lite' ),
|
450 |
'checked' => 0,
|
451 |
'format' => 'money',
|
452 |
),
|
453 |
-
'line_total_minus_refund'
|
454 |
'label' => __( 'Order Line Total (- Refund)', 'woo-order-export-lite' ),
|
455 |
'checked' => 0,
|
456 |
'format' => 'money',
|
457 |
),
|
458 |
-
'discount_amount'
|
459 |
'label' => __( 'Item Discount Amount', 'woo-order-export-lite' ),
|
460 |
'checked' => 0,
|
461 |
'format' => 'money',
|
462 |
),
|
463 |
-
'tax_rate'
|
464 |
'label' => __( 'Item Tax Rate', 'woo-order-export-lite' ),
|
465 |
'checked' => 0,
|
466 |
'format' => 'number',
|
467 |
),
|
468 |
-
'type'
|
469 |
-
|
|
|
|
|
|
|
|
|
470 |
'label' => __( 'Category', 'woo-order-export-lite' ),
|
471 |
'checked' => 0,
|
|
|
|
|
|
|
|
|
|
|
|
|
472 |
),
|
473 |
-
'
|
474 |
-
'width' => array(
|
475 |
'label' => __( 'Width', 'woo-order-export-lite' ),
|
476 |
'checked' => 0,
|
477 |
'format' => 'number',
|
478 |
),
|
479 |
-
'length'
|
480 |
'label' => __( 'Length', 'woo-order-export-lite' ),
|
481 |
'checked' => 0,
|
482 |
'format' => 'number',
|
483 |
),
|
484 |
-
'height'
|
485 |
'label' => __( 'Height', 'woo-order-export-lite' ),
|
486 |
'checked' => 0,
|
487 |
'format' => 'number',
|
488 |
),
|
489 |
-
'weight'
|
490 |
'label' => __( 'Weight', 'woo-order-export-lite' ),
|
491 |
'checked' => 0,
|
492 |
'format' => 'number',
|
493 |
),
|
494 |
-
'product_url'
|
495 |
'label' => __( 'Product URL', 'woo-order-export-lite' ),
|
496 |
'checked' => 0,
|
497 |
-
'format' =>'string',
|
498 |
),
|
499 |
-
'download_url'
|
500 |
'label' => __( 'Download URL', 'woo-order-export-lite' ),
|
501 |
'checked' => 0,
|
502 |
-
'format' =>'string',
|
503 |
),
|
504 |
-
'image_url'
|
505 |
'label' => __( 'Image URL', 'woo-order-export-lite' ),
|
506 |
'checked' => 0,
|
507 |
-
'format' =>'string',
|
508 |
),
|
509 |
-
'product_shipping_class'
|
510 |
'label' => __( 'Product Shipping Class', 'woo-order-export-lite' ),
|
511 |
'checked' => 0,
|
512 |
-
'format' =>'string',
|
513 |
),
|
514 |
-
'post_content'
|
515 |
'label' => __( 'Description', 'woo-order-export-lite' ),
|
516 |
'checked' => 0,
|
517 |
-
'format' =>'string',
|
518 |
),
|
519 |
-
'post_excerpt'
|
520 |
'label' => __( 'Short Description', 'woo-order-export-lite' ),
|
521 |
'checked' => 0,
|
522 |
-
'format' =>'string',
|
523 |
),
|
524 |
-
'full_category_names'
|
525 |
'label' => __( 'Full names for categories', 'woo-order-export-lite' ),
|
526 |
'checked' => 0,
|
527 |
-
'format' =>'string',
|
528 |
),
|
529 |
-
'summary_report_total_qty'
|
530 |
'label' => __( 'Summary Report Total Quantity', 'woo-order-export-lite' ),
|
531 |
'checked' => 0,
|
532 |
-
'format' =>'number',
|
533 |
),
|
534 |
-
'summary_report_total_amount'
|
535 |
'label' => __( 'Summary Report Total Amount', 'woo-order-export-lite' ),
|
536 |
'checked' => 0,
|
537 |
-
'format' =>'money',
|
538 |
),
|
539 |
);
|
540 |
|
@@ -551,7 +560,7 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
551 |
'code' => array(
|
552 |
'label' => __( 'Coupon Code', 'woo-order-export-lite' ),
|
553 |
'checked' => 1,
|
554 |
-
'format' =>'string',
|
555 |
),
|
556 |
'discount_amount' => array(
|
557 |
'label' => __( 'Discount Amount', 'woo-order-export-lite' ),
|
@@ -575,7 +584,7 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
575 |
'discount_type' => array(
|
576 |
'label' => __( 'Coupon Type', 'woo-order-export-lite' ),
|
577 |
'checked' => 0,
|
578 |
-
'format' =>'string',
|
579 |
),
|
580 |
'coupon_amount' => array(
|
581 |
'label' => __( 'Coupon Amount', 'woo-order-export-lite' ),
|
@@ -595,7 +604,20 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
595 |
|
596 |
public static function get_order_fields( $format ) {
|
597 |
$map = array();
|
598 |
-
foreach (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
599 |
$method = "get_order_fields_" . $segment;
|
600 |
$map_segment = self::$method();
|
601 |
|
@@ -614,23 +636,23 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
614 |
|
615 |
public static function get_order_fields_common() {
|
616 |
return array(
|
617 |
-
'line_number' => array(
|
618 |
-
'label'
|
619 |
'checked' => 0,
|
620 |
'format' => 'number',
|
621 |
),
|
622 |
-
'order_id' => array(
|
623 |
-
'label'
|
624 |
'checked' => 0,
|
625 |
'format' => 'number',
|
626 |
),
|
627 |
-
'order_number' => array(
|
628 |
-
'label'
|
629 |
'checked' => 1,
|
630 |
'format' => 'string',
|
631 |
),
|
632 |
-
'order_status' => array(
|
633 |
-
'label'
|
634 |
'checked' => 1,
|
635 |
'format' => 'string',
|
636 |
),
|
@@ -649,7 +671,7 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
649 |
'checked' => 0,
|
650 |
'format' => 'string',
|
651 |
),
|
652 |
-
'order_currency'
|
653 |
'label' => __( 'Currency', 'woo-order-export-lite' ),
|
654 |
'checked' => 0,
|
655 |
'format' => 'string',
|
@@ -699,7 +721,7 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
699 |
'checked' => 0,
|
700 |
'format' => 'string',
|
701 |
),
|
702 |
-
'user_url'
|
703 |
'label' => __( 'User Website', 'woo-order-export-lite' ),
|
704 |
'checked' => 0,
|
705 |
'format' => 'string',
|
@@ -908,69 +930,69 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
908 |
|
909 |
public static function get_order_fields_cart() {
|
910 |
return array(
|
911 |
-
'shipping_method_title'
|
912 |
'label' => __( 'Shipping Method Title', 'woo-order-export-lite' ),
|
913 |
'checked' => 1,
|
914 |
'format' => 'string',
|
915 |
),
|
916 |
-
'shipping_method'
|
917 |
'label' => __( 'Shipping Method', 'woo-order-export-lite' ),
|
918 |
'checked' => 0,
|
919 |
'format' => 'string',
|
920 |
),
|
921 |
-
'payment_method_title'
|
922 |
'label' => __( 'Payment Method Title', 'woo-order-export-lite' ),
|
923 |
'checked' => 1,
|
924 |
'format' => 'string',
|
925 |
),
|
926 |
-
'payment_method'
|
927 |
'label' => __( 'Payment Method', 'woo-order-export-lite' ),
|
928 |
'checked' => 0,
|
929 |
'format' => 'string',
|
930 |
),
|
931 |
-
'coupons_used'
|
932 |
'label' => __( 'Coupons Used', 'woo-order-export-lite' ),
|
933 |
'checked' => 0,
|
934 |
'format' => 'string',
|
935 |
),
|
936 |
-
'cart_discount'
|
937 |
'label' => __( 'Cart Discount Amount', 'woo-order-export-lite' ),
|
938 |
'checked' => 1,
|
939 |
'format' => 'money',
|
940 |
),
|
941 |
-
'cart_discount_tax'
|
942 |
'label' => __( 'Cart Discount Amount Tax', 'woo-order-export-lite' ),
|
943 |
'checked' => 0,
|
944 |
'format' => 'money',
|
945 |
),
|
946 |
-
'order_subtotal'
|
947 |
'label' => __( 'Order Subtotal Amount', 'woo-order-export-lite' ),
|
948 |
'checked' => 1,
|
949 |
'format' => 'money',
|
950 |
),
|
951 |
-
'order_subtotal_minus_discount'
|
952 |
'label' => __( 'Order Subtotal - Cart Discount', 'woo-order-export-lite' ),
|
953 |
'checked' => 0,
|
954 |
'format' => 'money',
|
955 |
),
|
956 |
-
'order_subtotal_refunded'
|
957 |
'label' => __( 'Order Subtotal Amount Refunded', 'woo-order-export-lite' ),
|
958 |
'checked' => 0,
|
959 |
'format' => 'money',
|
960 |
),
|
961 |
-
'order_subtotal_minus_refund'
|
962 |
'label' => __( 'Order Subtotal Amount (- Refund)', 'woo-order-export-lite' ),
|
963 |
'checked' => 0,
|
964 |
'format' => 'money',
|
965 |
),
|
966 |
-
'order_tax'
|
967 |
'label' => __( 'Order Tax Amount', 'woo-order-export-lite' ),
|
968 |
'checked' => 0,
|
969 |
'format' => 'money',
|
970 |
),
|
971 |
);
|
972 |
}
|
973 |
-
|
974 |
public static function get_order_fields_ship_calc() {
|
975 |
return array(
|
976 |
'order_shipping' => array(
|
@@ -978,7 +1000,7 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
978 |
'checked' => 1,
|
979 |
'format' => 'money',
|
980 |
),
|
981 |
-
'order_shipping_plus_tax'
|
982 |
'label' => __( 'Order Shipping + Tax Amount', 'woo-order-export-lite' ),
|
983 |
'checked' => 0,
|
984 |
'format' => 'money',
|
@@ -1010,45 +1032,45 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
1010 |
),
|
1011 |
);
|
1012 |
}
|
1013 |
-
|
1014 |
public static function get_order_fields_totals() {
|
1015 |
return array(
|
1016 |
-
'order_total_fee'
|
1017 |
'label' => __( 'Order Total Fee', 'woo-order-export-lite' ),
|
1018 |
'checked' => 0,
|
1019 |
'format' => 'money',
|
1020 |
),
|
1021 |
-
'order_refund'
|
1022 |
'label' => __( 'Order Refund Amount', 'woo-order-export-lite' ),
|
1023 |
'checked' => 1,
|
1024 |
'format' => 'money',
|
1025 |
),
|
1026 |
-
'order_total_inc_refund'
|
1027 |
'label' => __( 'Order Total Amount (- Refund)', 'woo-order-export-lite' ),
|
1028 |
'checked' => 0,
|
1029 |
'format' => 'money',
|
1030 |
),
|
1031 |
-
'order_total'
|
1032 |
'label' => __( 'Order Total Amount', 'woo-order-export-lite' ),
|
1033 |
'checked' => 1,
|
1034 |
'format' => 'money',
|
1035 |
),
|
1036 |
-
'order_total_no_tax'
|
1037 |
'label' => __( 'Order Total Amount without Tax', 'woo-order-export-lite' ),
|
1038 |
'checked' => 0,
|
1039 |
'format' => 'money',
|
1040 |
),
|
1041 |
-
'order_total_tax'
|
1042 |
'label' => __( 'Order Total Tax Amount', 'woo-order-export-lite' ),
|
1043 |
'checked' => 1,
|
1044 |
'format' => 'money',
|
1045 |
),
|
1046 |
-
'order_total_tax_refunded'
|
1047 |
'label' => __( 'Order Total Tax Amount Refunded', 'woo-order-export-lite' ),
|
1048 |
'checked' => 0,
|
1049 |
'format' => 'money',
|
1050 |
),
|
1051 |
-
'order_total_tax_minus_refund'
|
1052 |
'label' => __( 'Order Total Tax Amount (- Refund)', 'woo-order-export-lite' ),
|
1053 |
'checked' => 0,
|
1054 |
'format' => 'money',
|
@@ -1095,16 +1117,16 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
1095 |
|
1096 |
public static function get_order_segments() {
|
1097 |
return array(
|
1098 |
-
'common'
|
1099 |
-
'user'
|
1100 |
-
'billing'
|
1101 |
-
'shipping'
|
1102 |
-
'products'
|
1103 |
-
'coupons'
|
1104 |
-
'cart'
|
1105 |
-
'ship_calc'=> __( 'Shipping', 'woo-order-export-lite'),
|
1106 |
-
'totals'
|
1107 |
-
'misc'
|
1108 |
);
|
1109 |
}
|
1110 |
|
141 |
|
142 |
public static function get_products_like( $like, $limit ) {
|
143 |
global $wpdb;
|
144 |
+
$like = $wpdb->esc_like( $like );
|
145 |
+
$query = "
|
146 |
SELECT post.ID as id,post.post_title as text,att.ID as photo_id,att.guid as photo_url
|
147 |
FROM " . $wpdb->posts . " as post
|
148 |
LEFT JOIN " . $wpdb->posts . " AS att ON post.ID=att.post_parent AND att.post_type='attachment'
|
151 |
AND post.post_status <> 'trash'
|
152 |
GROUP BY post.ID
|
153 |
ORDER BY post.post_title
|
154 |
+
LIMIT " . intval( $limit );
|
155 |
+
|
156 |
$products = $wpdb->get_results( $query );
|
157 |
foreach ( $products as $key => $product ) {
|
158 |
if ( $product->photo_id ) {
|
340 |
|
341 |
public static function get_order_product_fields( $format ) {
|
342 |
$map = array(
|
343 |
+
'item_id' => array(
|
344 |
'label' => __( 'Item ID', 'woo-order-export-lite' ),
|
345 |
'checked' => 0,
|
346 |
+
'format' => 'number',
|
347 |
),
|
348 |
+
'line_id' => array(
|
349 |
+
'label' => __( 'Item #', 'woo-order-export-lite' ),
|
350 |
'checked' => 1,
|
351 |
+
'format' => 'number',
|
352 |
),
|
353 |
+
'sku' => array(
|
354 |
+
'label' => __( 'SKU', 'woo-order-export-lite' ),
|
355 |
'checked' => 1,
|
356 |
+
'format' => 'string',
|
357 |
),
|
358 |
+
'name' => array(
|
359 |
'label' => __( 'Item Name', 'woo-order-export-lite' ),
|
360 |
'checked' => 1,
|
361 |
+
'format' => 'string',
|
362 |
),
|
363 |
+
'product_id' => array(
|
364 |
'label' => __( 'Product Id', 'woo-order-export-lite' ),
|
365 |
'checked' => 0,
|
366 |
+
'format' => 'number',
|
367 |
),
|
368 |
+
'product_name' => array(
|
369 |
'label' => __( 'Product Name', 'woo-order-export-lite' ),
|
370 |
'checked' => 0,
|
371 |
+
'format' => 'string',
|
372 |
),
|
373 |
+
'variation_id' => array(
|
374 |
'label' => __( 'Variation Id', 'woo-order-export-lite' ),
|
375 |
'checked' => 0,
|
376 |
+
'format' => 'number',
|
377 |
),
|
378 |
+
'product_variation' => array(
|
379 |
'label' => __( 'Product Variation', 'woo-order-export-lite' ),
|
380 |
'checked' => 0,
|
381 |
+
'format' => 'string',
|
382 |
),
|
383 |
+
'seller' => array(
|
384 |
'label' => __( 'Item Seller', 'woo-order-export-lite' ),
|
385 |
'checked' => 0,
|
386 |
+
'format' => 'string',
|
387 |
),
|
388 |
+
'qty' => array(
|
389 |
'label' => __( 'Quantity', 'woo-order-export-lite' ),
|
390 |
'checked' => 1,
|
391 |
+
'format' => 'number',
|
392 |
),
|
393 |
+
'qty_minus_refund' => array(
|
394 |
'label' => __( 'Quantity (- Refund)', 'woo-order-export-lite' ),
|
395 |
'checked' => 0,
|
396 |
+
'format' => 'number',
|
397 |
),
|
398 |
+
'item_price' => array(
|
399 |
'label' => __( 'Item Cost', 'woo-order-export-lite' ),
|
400 |
'checked' => 1,
|
401 |
'format' => 'money',
|
402 |
),
|
403 |
+
'price' => array(
|
404 |
'label' => __( 'Product Current Price', 'woo-order-export-lite' ),
|
405 |
'checked' => 0,
|
406 |
'format' => 'money',
|
407 |
),
|
408 |
+
'line_no_tax' => array(
|
409 |
'label' => __( 'Order Line (w/o tax)', 'woo-order-export-lite' ),
|
410 |
'checked' => 0,
|
411 |
'format' => 'money',
|
412 |
),
|
413 |
+
'line_tax' => array(
|
414 |
'label' => __( 'Order Line Tax', 'woo-order-export-lite' ),
|
415 |
'checked' => 0,
|
416 |
'format' => 'money',
|
417 |
),
|
418 |
+
'line_tax_refunded' => array(
|
419 |
'label' => __( 'Order Line Tax Refunded', 'woo-order-export-lite' ),
|
420 |
'checked' => 0,
|
421 |
'format' => 'money',
|
422 |
),
|
423 |
+
'line_tax_minus_refund' => array(
|
424 |
'label' => __( 'Order Line Tax (- Refund)', 'woo-order-export-lite' ),
|
425 |
'checked' => 0,
|
426 |
'format' => 'money',
|
427 |
),
|
428 |
+
'line_subtotal' => array(
|
429 |
'label' => __( 'Order Line Subtotal', 'woo-order-export-lite' ),
|
430 |
'checked' => 0,
|
431 |
'format' => 'money',
|
432 |
),
|
433 |
+
'line_subtotal_tax' => array(
|
434 |
'label' => __( 'Order Line Subtotal Tax', 'woo-order-export-lite' ),
|
435 |
'checked' => 0,
|
436 |
'format' => 'money',
|
437 |
),
|
438 |
+
'line_total' => array(
|
439 |
'label' => __( 'Order Line Total', 'woo-order-export-lite' ),
|
440 |
'checked' => 0,
|
441 |
'format' => 'money',
|
442 |
),
|
443 |
+
'line_total_plus_tax' => array(
|
444 |
'label' => __( 'Order Line Total (include tax)', 'woo-order-export-lite' ),
|
445 |
'checked' => 0,
|
446 |
'format' => 'money',
|
447 |
),
|
448 |
+
'line_total_refunded' => array(
|
449 |
'label' => __( 'Order Line Total Refunded', 'woo-order-export-lite' ),
|
450 |
'checked' => 0,
|
451 |
'format' => 'money',
|
452 |
),
|
453 |
+
'line_total_minus_refund' => array(
|
454 |
'label' => __( 'Order Line Total (- Refund)', 'woo-order-export-lite' ),
|
455 |
'checked' => 0,
|
456 |
'format' => 'money',
|
457 |
),
|
458 |
+
'discount_amount' => array(
|
459 |
'label' => __( 'Item Discount Amount', 'woo-order-export-lite' ),
|
460 |
'checked' => 0,
|
461 |
'format' => 'money',
|
462 |
),
|
463 |
+
'tax_rate' => array(
|
464 |
'label' => __( 'Item Tax Rate', 'woo-order-export-lite' ),
|
465 |
'checked' => 0,
|
466 |
'format' => 'number',
|
467 |
),
|
468 |
+
'type' => array(
|
469 |
+
'label' => __( 'Type', 'woo-order-export-lite' ),
|
470 |
+
'checked' => 0,
|
471 |
+
'format' => 'string',
|
472 |
+
),
|
473 |
+
'category' => array(
|
474 |
'label' => __( 'Category', 'woo-order-export-lite' ),
|
475 |
'checked' => 0,
|
476 |
+
'format' => 'string',
|
477 |
+
),
|
478 |
+
'tags' => array(
|
479 |
+
'label' => __( 'Tags', 'woo-order-export-lite' ),
|
480 |
+
'checked' => 0,
|
481 |
+
'format' => 'string',
|
482 |
),
|
483 |
+
'width' => array(
|
|
|
484 |
'label' => __( 'Width', 'woo-order-export-lite' ),
|
485 |
'checked' => 0,
|
486 |
'format' => 'number',
|
487 |
),
|
488 |
+
'length' => array(
|
489 |
'label' => __( 'Length', 'woo-order-export-lite' ),
|
490 |
'checked' => 0,
|
491 |
'format' => 'number',
|
492 |
),
|
493 |
+
'height' => array(
|
494 |
'label' => __( 'Height', 'woo-order-export-lite' ),
|
495 |
'checked' => 0,
|
496 |
'format' => 'number',
|
497 |
),
|
498 |
+
'weight' => array(
|
499 |
'label' => __( 'Weight', 'woo-order-export-lite' ),
|
500 |
'checked' => 0,
|
501 |
'format' => 'number',
|
502 |
),
|
503 |
+
'product_url' => array(
|
504 |
'label' => __( 'Product URL', 'woo-order-export-lite' ),
|
505 |
'checked' => 0,
|
506 |
+
'format' => 'string',
|
507 |
),
|
508 |
+
'download_url' => array(
|
509 |
'label' => __( 'Download URL', 'woo-order-export-lite' ),
|
510 |
'checked' => 0,
|
511 |
+
'format' => 'string',
|
512 |
),
|
513 |
+
'image_url' => array(
|
514 |
'label' => __( 'Image URL', 'woo-order-export-lite' ),
|
515 |
'checked' => 0,
|
516 |
+
'format' => 'string',
|
517 |
),
|
518 |
+
'product_shipping_class' => array(
|
519 |
'label' => __( 'Product Shipping Class', 'woo-order-export-lite' ),
|
520 |
'checked' => 0,
|
521 |
+
'format' => 'string',
|
522 |
),
|
523 |
+
'post_content' => array(
|
524 |
'label' => __( 'Description', 'woo-order-export-lite' ),
|
525 |
'checked' => 0,
|
526 |
+
'format' => 'string',
|
527 |
),
|
528 |
+
'post_excerpt' => array(
|
529 |
'label' => __( 'Short Description', 'woo-order-export-lite' ),
|
530 |
'checked' => 0,
|
531 |
+
'format' => 'string',
|
532 |
),
|
533 |
+
'full_category_names' => array(
|
534 |
'label' => __( 'Full names for categories', 'woo-order-export-lite' ),
|
535 |
'checked' => 0,
|
536 |
+
'format' => 'string',
|
537 |
),
|
538 |
+
'summary_report_total_qty' => array(
|
539 |
'label' => __( 'Summary Report Total Quantity', 'woo-order-export-lite' ),
|
540 |
'checked' => 0,
|
541 |
+
'format' => 'number',
|
542 |
),
|
543 |
+
'summary_report_total_amount' => array(
|
544 |
'label' => __( 'Summary Report Total Amount', 'woo-order-export-lite' ),
|
545 |
'checked' => 0,
|
546 |
+
'format' => 'money',
|
547 |
),
|
548 |
);
|
549 |
|
560 |
'code' => array(
|
561 |
'label' => __( 'Coupon Code', 'woo-order-export-lite' ),
|
562 |
'checked' => 1,
|
563 |
+
'format' => 'string',
|
564 |
),
|
565 |
'discount_amount' => array(
|
566 |
'label' => __( 'Discount Amount', 'woo-order-export-lite' ),
|
584 |
'discount_type' => array(
|
585 |
'label' => __( 'Coupon Type', 'woo-order-export-lite' ),
|
586 |
'checked' => 0,
|
587 |
+
'format' => 'string',
|
588 |
),
|
589 |
'coupon_amount' => array(
|
590 |
'label' => __( 'Coupon Amount', 'woo-order-export-lite' ),
|
604 |
|
605 |
public static function get_order_fields( $format ) {
|
606 |
$map = array();
|
607 |
+
foreach (
|
608 |
+
array(
|
609 |
+
'common',
|
610 |
+
'user',
|
611 |
+
'billing',
|
612 |
+
'shipping',
|
613 |
+
'product',
|
614 |
+
'coupon',
|
615 |
+
'cart',
|
616 |
+
'ship_calc',
|
617 |
+
'totals',
|
618 |
+
'misc',
|
619 |
+
) as $segment
|
620 |
+
) {
|
621 |
$method = "get_order_fields_" . $segment;
|
622 |
$map_segment = self::$method();
|
623 |
|
636 |
|
637 |
public static function get_order_fields_common() {
|
638 |
return array(
|
639 |
+
'line_number' => array(
|
640 |
+
'label' => __( 'Line number', 'woo-order-export-lite' ),
|
641 |
'checked' => 0,
|
642 |
'format' => 'number',
|
643 |
),
|
644 |
+
'order_id' => array(
|
645 |
+
'label' => __( 'Order ID', 'woo-order-export-lite' ),
|
646 |
'checked' => 0,
|
647 |
'format' => 'number',
|
648 |
),
|
649 |
+
'order_number' => array(
|
650 |
+
'label' => __( 'Order Number', 'woo-order-export-lite' ),
|
651 |
'checked' => 1,
|
652 |
'format' => 'string',
|
653 |
),
|
654 |
+
'order_status' => array(
|
655 |
+
'label' => __( 'Order Status', 'woo-order-export-lite' ),
|
656 |
'checked' => 1,
|
657 |
'format' => 'string',
|
658 |
),
|
671 |
'checked' => 0,
|
672 |
'format' => 'string',
|
673 |
),
|
674 |
+
'order_currency' => array(
|
675 |
'label' => __( 'Currency', 'woo-order-export-lite' ),
|
676 |
'checked' => 0,
|
677 |
'format' => 'string',
|
721 |
'checked' => 0,
|
722 |
'format' => 'string',
|
723 |
),
|
724 |
+
'user_url' => array(
|
725 |
'label' => __( 'User Website', 'woo-order-export-lite' ),
|
726 |
'checked' => 0,
|
727 |
'format' => 'string',
|
930 |
|
931 |
public static function get_order_fields_cart() {
|
932 |
return array(
|
933 |
+
'shipping_method_title' => array(
|
934 |
'label' => __( 'Shipping Method Title', 'woo-order-export-lite' ),
|
935 |
'checked' => 1,
|
936 |
'format' => 'string',
|
937 |
),
|
938 |
+
'shipping_method' => array(
|
939 |
'label' => __( 'Shipping Method', 'woo-order-export-lite' ),
|
940 |
'checked' => 0,
|
941 |
'format' => 'string',
|
942 |
),
|
943 |
+
'payment_method_title' => array(
|
944 |
'label' => __( 'Payment Method Title', 'woo-order-export-lite' ),
|
945 |
'checked' => 1,
|
946 |
'format' => 'string',
|
947 |
),
|
948 |
+
'payment_method' => array(
|
949 |
'label' => __( 'Payment Method', 'woo-order-export-lite' ),
|
950 |
'checked' => 0,
|
951 |
'format' => 'string',
|
952 |
),
|
953 |
+
'coupons_used' => array(
|
954 |
'label' => __( 'Coupons Used', 'woo-order-export-lite' ),
|
955 |
'checked' => 0,
|
956 |
'format' => 'string',
|
957 |
),
|
958 |
+
'cart_discount' => array(
|
959 |
'label' => __( 'Cart Discount Amount', 'woo-order-export-lite' ),
|
960 |
'checked' => 1,
|
961 |
'format' => 'money',
|
962 |
),
|
963 |
+
'cart_discount_tax' => array(
|
964 |
'label' => __( 'Cart Discount Amount Tax', 'woo-order-export-lite' ),
|
965 |
'checked' => 0,
|
966 |
'format' => 'money',
|
967 |
),
|
968 |
+
'order_subtotal' => array(
|
969 |
'label' => __( 'Order Subtotal Amount', 'woo-order-export-lite' ),
|
970 |
'checked' => 1,
|
971 |
'format' => 'money',
|
972 |
),
|
973 |
+
'order_subtotal_minus_discount' => array(
|
974 |
'label' => __( 'Order Subtotal - Cart Discount', 'woo-order-export-lite' ),
|
975 |
'checked' => 0,
|
976 |
'format' => 'money',
|
977 |
),
|
978 |
+
'order_subtotal_refunded' => array(
|
979 |
'label' => __( 'Order Subtotal Amount Refunded', 'woo-order-export-lite' ),
|
980 |
'checked' => 0,
|
981 |
'format' => 'money',
|
982 |
),
|
983 |
+
'order_subtotal_minus_refund' => array(
|
984 |
'label' => __( 'Order Subtotal Amount (- Refund)', 'woo-order-export-lite' ),
|
985 |
'checked' => 0,
|
986 |
'format' => 'money',
|
987 |
),
|
988 |
+
'order_tax' => array(
|
989 |
'label' => __( 'Order Tax Amount', 'woo-order-export-lite' ),
|
990 |
'checked' => 0,
|
991 |
'format' => 'money',
|
992 |
),
|
993 |
);
|
994 |
}
|
995 |
+
|
996 |
public static function get_order_fields_ship_calc() {
|
997 |
return array(
|
998 |
'order_shipping' => array(
|
1000 |
'checked' => 1,
|
1001 |
'format' => 'money',
|
1002 |
),
|
1003 |
+
'order_shipping_plus_tax' => array(
|
1004 |
'label' => __( 'Order Shipping + Tax Amount', 'woo-order-export-lite' ),
|
1005 |
'checked' => 0,
|
1006 |
'format' => 'money',
|
1032 |
),
|
1033 |
);
|
1034 |
}
|
1035 |
+
|
1036 |
public static function get_order_fields_totals() {
|
1037 |
return array(
|
1038 |
+
'order_total_fee' => array(
|
1039 |
'label' => __( 'Order Total Fee', 'woo-order-export-lite' ),
|
1040 |
'checked' => 0,
|
1041 |
'format' => 'money',
|
1042 |
),
|
1043 |
+
'order_refund' => array(
|
1044 |
'label' => __( 'Order Refund Amount', 'woo-order-export-lite' ),
|
1045 |
'checked' => 1,
|
1046 |
'format' => 'money',
|
1047 |
),
|
1048 |
+
'order_total_inc_refund' => array(
|
1049 |
'label' => __( 'Order Total Amount (- Refund)', 'woo-order-export-lite' ),
|
1050 |
'checked' => 0,
|
1051 |
'format' => 'money',
|
1052 |
),
|
1053 |
+
'order_total' => array(
|
1054 |
'label' => __( 'Order Total Amount', 'woo-order-export-lite' ),
|
1055 |
'checked' => 1,
|
1056 |
'format' => 'money',
|
1057 |
),
|
1058 |
+
'order_total_no_tax' => array(
|
1059 |
'label' => __( 'Order Total Amount without Tax', 'woo-order-export-lite' ),
|
1060 |
'checked' => 0,
|
1061 |
'format' => 'money',
|
1062 |
),
|
1063 |
+
'order_total_tax' => array(
|
1064 |
'label' => __( 'Order Total Tax Amount', 'woo-order-export-lite' ),
|
1065 |
'checked' => 1,
|
1066 |
'format' => 'money',
|
1067 |
),
|
1068 |
+
'order_total_tax_refunded' => array(
|
1069 |
'label' => __( 'Order Total Tax Amount Refunded', 'woo-order-export-lite' ),
|
1070 |
'checked' => 0,
|
1071 |
'format' => 'money',
|
1072 |
),
|
1073 |
+
'order_total_tax_minus_refund' => array(
|
1074 |
'label' => __( 'Order Total Tax Amount (- Refund)', 'woo-order-export-lite' ),
|
1075 |
'checked' => 0,
|
1076 |
'format' => 'money',
|
1117 |
|
1118 |
public static function get_order_segments() {
|
1119 |
return array(
|
1120 |
+
'common' => __( 'Common', 'woo-order-export-lite' ),
|
1121 |
+
'user' => __( 'User', 'woo-order-export-lite' ),
|
1122 |
+
'billing' => __( 'Billing Address', 'woo-order-export-lite' ),
|
1123 |
+
'shipping' => __( 'Shipping Address', 'woo-order-export-lite' ),
|
1124 |
+
'products' => __( 'Products', 'woo-order-export-lite' ),
|
1125 |
+
'coupons' => __( 'Coupons', 'woo-order-export-lite' ),
|
1126 |
+
'cart' => __( 'Cart', 'woo-order-export-lite' ),
|
1127 |
+
'ship_calc' => __( 'Shipping', 'woo-order-export-lite' ),
|
1128 |
+
'totals' => __( 'Totals', 'woo-order-export-lite' ),
|
1129 |
+
'misc' => __( 'Others', 'woo-order-export-lite' ),
|
1130 |
);
|
1131 |
}
|
1132 |
|
classes/core/class-wc-order-export-data-extractor.php
CHANGED
@@ -429,8 +429,10 @@ class WC_Order_Export_Data_Extractor {
|
|
429 |
$product_where = join( " AND ", $product_where );
|
430 |
$sql = "SELECT DISTINCT ID FROM {$wpdb->posts} AS products $left_join_product_meta WHERE products.post_type in ('product','product_variation') AND products.post_status<>'trash' AND $product_where ";
|
431 |
$settings['products'] = $wpdb->get_col( $sql );
|
432 |
-
if( empty($settings['products']) ) // failed condition!
|
433 |
-
|
|
|
|
|
434 |
}
|
435 |
|
436 |
// we have to use variations , if user sets product attributes
|
@@ -438,8 +440,10 @@ class WC_Order_Export_Data_Extractor {
|
|
438 |
$values = self::sql_subset( $settings['products'] );
|
439 |
$sql = "SELECT DISTINCT ID FROM {$wpdb->posts} AS products WHERE products.post_type in ('product','product_variation') AND products.post_status<>'trash' AND post_parent IN ($values)";
|
440 |
$settings['products'] = $wpdb->get_col( $sql );
|
441 |
-
if( empty($settings['products']) ) // failed condition!
|
442 |
-
|
|
|
|
|
443 |
}
|
444 |
if ( ! empty( $sql ) AND self::$track_sql_queries ) {
|
445 |
self::$sql_queries[] = $sql;
|
@@ -741,7 +745,7 @@ class WC_Order_Export_Data_Extractor {
|
|
741 |
}
|
742 |
}
|
743 |
}
|
744 |
-
if ( ! empty($settings['user_custom_fields']) ) {
|
745 |
$cf_names = self::get_user_custom_fields();
|
746 |
$filters = self::parse_complex_pairs( $settings['user_custom_fields'], $cf_names );
|
747 |
$pos = 1;
|
@@ -754,7 +758,7 @@ class WC_Order_Export_Data_Extractor {
|
|
754 |
} elseif ( $operator == 'IS SET' ) {
|
755 |
$user_meta_where[] = " ( usermeta_cf_{$pos}.meta_value IS NOT NULL ) ";
|
756 |
} elseif ( $operator == 'IN' OR $operator == 'NOT IN' ) {
|
757 |
-
$values
|
758 |
$user_meta_where[] = " ( usermeta_cf_{$pos}.meta_value $operator ($values) ) ";
|
759 |
} elseif ( in_array( $operator, self::$operator_must_check_values ) ) {
|
760 |
$pairs = array();
|
@@ -762,7 +766,7 @@ class WC_Order_Export_Data_Extractor {
|
|
762 |
$pairs[] = self::operator_compare_field_and_value( "`usermeta_cf_{$pos}`.meta_value",
|
763 |
$operator, $v );
|
764 |
}
|
765 |
-
$pairs
|
766 |
$user_meta_where[] = " ( $pairs ) ";
|
767 |
}
|
768 |
$pos ++;
|
@@ -798,36 +802,36 @@ class WC_Order_Export_Data_Extractor {
|
|
798 |
}
|
799 |
|
800 |
// users
|
801 |
-
$user_ids
|
802 |
$user_ids_ui_filters_applied = false;
|
803 |
if ( ! empty( $settings['user_names'] ) ) {
|
804 |
-
$user_ids
|
805 |
-
$values
|
806 |
$user_meta_where[] = "( {$wpdb->users}.ID IN ($values) )";
|
807 |
}
|
808 |
//roles
|
809 |
if ( ! empty( $settings['user_roles'] ) ) {
|
810 |
-
$metakey
|
811 |
$inner_join_user_meta[] = "INNER JOIN {$wpdb->usermeta} AS usermeta_cf_role ON usermeta_cf_role.user_id = {$wpdb->users}.ID AND usermeta_cf_role.meta_key='$metakey'";
|
812 |
|
813 |
$roles_where = array();
|
814 |
foreach ( $settings['user_roles'] as $role ) {
|
815 |
$roles_where[] = "( usermeta_cf_role.meta_value LIKE '%$role%' )";
|
816 |
}
|
817 |
-
$user_meta_where[] = "(" . join(' OR ', $roles_where) . ")";
|
818 |
}
|
819 |
if ( ! empty( $user_meta_where ) AND ! empty( $inner_join_user_meta ) ) {
|
820 |
$user_meta_where = join( ' AND ', $user_meta_where );
|
821 |
$inner_join_user_meta = join( ' ', $inner_join_user_meta );
|
822 |
-
$sql
|
823 |
if ( self::$track_sql_queries ) {
|
824 |
self::$sql_queries[] = $sql;
|
825 |
}
|
826 |
-
$user_ids
|
827 |
$user_ids_ui_filters_applied = true;
|
828 |
}
|
829 |
$user_ids = apply_filters( "woe_sql_get_customer_ids", $user_ids, $settings );
|
830 |
-
if( empty($user_ids) AND $user_ids_ui_filters_applied ) {
|
831 |
$order_meta_where [] = "0"; // user filters failed
|
832 |
}
|
833 |
|
@@ -1174,8 +1178,8 @@ class WC_Order_Export_Data_Extractor {
|
|
1174 |
global $wpdb;
|
1175 |
$coupons = array();
|
1176 |
foreach ( $order->get_items( 'coupon' ) as $item ) {
|
1177 |
-
$coupon_meta
|
1178 |
-
$get_coupon_meta
|
1179 |
array( 'code', 'discount_amount', 'discount_amount_tax', 'excerpt' ) ) );
|
1180 |
if ( $get_coupon_meta ) {
|
1181 |
$recs = $wpdb->get_results( $wpdb->prepare( "SELECT meta_value,meta_key FROM {$wpdb->postmeta} AS meta
|
@@ -1216,15 +1220,16 @@ class WC_Order_Export_Data_Extractor {
|
|
1216 |
}
|
1217 |
}
|
1218 |
|
1219 |
-
return apply_filters( "woe_fetch_order_coupons", $coupons, $order, $labels->get_legacy_labels(), $format="",
|
|
|
1220 |
}
|
1221 |
|
1222 |
|
1223 |
/**
|
1224 |
-
* @param WC_Order
|
1225 |
* @param WC_Order_Export_Labels $labels
|
1226 |
-
* @param array
|
1227 |
-
* @param array
|
1228 |
*
|
1229 |
* @return array
|
1230 |
*/
|
@@ -1234,7 +1239,7 @@ class WC_Order_Export_Data_Extractor {
|
|
1234 |
$static_vals,
|
1235 |
$options
|
1236 |
) {
|
1237 |
-
$export_only_products
|
1238 |
$product_fields_with_tags = array( 'product_variation', 'post_content', 'post_excerpt' );
|
1239 |
$products = array();
|
1240 |
$i = 0;
|
@@ -1306,10 +1311,14 @@ class WC_Order_Export_Data_Extractor {
|
|
1306 |
$row[ $field ] = implode( ', ', $taxonomies );
|
1307 |
} else if ( $field == 'product_shipping_class' ) {
|
1308 |
$taxonomies = array();
|
1309 |
-
if( !empty($item['variation_id']) )// try get from variation at first!
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
|
|
|
|
|
|
|
|
1313 |
//done
|
1314 |
$row[ $field ] = implode( ', ', $taxonomies );
|
1315 |
} elseif ( $field == 'line_total_plus_tax' ) {
|
@@ -1465,8 +1474,9 @@ class WC_Order_Export_Data_Extractor {
|
|
1465 |
$products[ $item_id ] = $row;
|
1466 |
}
|
1467 |
}
|
1468 |
-
|
1469 |
-
return apply_filters( "woe_fetch_order_products", $products, $order, $labels->get_legacy_labels(), $format="",
|
|
|
1470 |
}
|
1471 |
|
1472 |
|
@@ -1526,12 +1536,12 @@ class WC_Order_Export_Data_Extractor {
|
|
1526 |
global $wp_roles;
|
1527 |
|
1528 |
// $extra_rows = array();
|
1529 |
-
$row
|
1530 |
|
1531 |
// get order meta
|
1532 |
$order_meta = array();
|
1533 |
-
if ( $order_post_meta = get_post_meta( $order_id )) {
|
1534 |
-
foreach ( $order_post_meta as $meta_key
|
1535 |
$order_meta[ $meta_key ] = join( self::$export_custom_fields_separator, $meta_values );
|
1536 |
}
|
1537 |
}
|
@@ -1557,7 +1567,7 @@ class WC_Order_Export_Data_Extractor {
|
|
1557 |
$overwrite_child_order_meta = apply_filters( 'woe_overwrite_child_order_meta', $is_refund );
|
1558 |
|
1559 |
if ( $parent_order_meta = get_post_meta( $parent_order_id ) ) {
|
1560 |
-
foreach ( $parent_order_meta as $meta_key
|
1561 |
if ( $overwrite_child_order_meta OR ! isset( $order_meta[ $meta_key ] ) ) {
|
1562 |
$order_meta[ $meta_key ] = join( self::$export_custom_fields_separator, $meta_values );
|
1563 |
}
|
@@ -1585,23 +1595,30 @@ class WC_Order_Export_Data_Extractor {
|
|
1585 |
}
|
1586 |
|
1587 |
// we know parent!
|
1588 |
-
if (
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
|
|
|
|
1593 |
$tmp_labels->qty = "";
|
1594 |
-
|
|
|
|
|
|
|
|
|
1595 |
$tmp_labels->weight = "";
|
|
|
1596 |
}
|
|
|
1597 |
$data['products'] = self::fetch_order_products(
|
1598 |
$order,
|
1599 |
$tmp_labels,
|
1600 |
-
isset($static_vals['products']) ? $static_vals['products'] : array(),
|
1601 |
$options
|
1602 |
);
|
1603 |
-
if ( $options['include_products'] AND empty( $data['products'] ) AND apply_filters( "woe_skip_order_without_products",
|
1604 |
-
false ) ) {
|
1605 |
return array();
|
1606 |
}
|
1607 |
} else {
|
@@ -1612,7 +1629,7 @@ class WC_Order_Export_Data_Extractor {
|
|
1612 |
$data['coupons'] = self::fetch_order_coupons(
|
1613 |
$parent_order ? $parent_order : $order,
|
1614 |
$labels['coupons'],
|
1615 |
-
isset($static_vals['coupons']) ? $static_vals['coupons'] : array(),
|
1616 |
$options
|
1617 |
);
|
1618 |
} else {
|
@@ -1676,7 +1693,7 @@ class WC_Order_Export_Data_Extractor {
|
|
1676 |
} elseif ( $field == 'order_shipping' ) {
|
1677 |
$row[ $field ] = $order->get_shipping_total();
|
1678 |
} elseif ( $field == 'order_shipping_plus_tax' ) {
|
1679 |
-
$row[ $field ] = $order->get_shipping_total()
|
1680 |
} elseif ( $field == 'order_shipping_refunded' ) {
|
1681 |
$row[ $field ] = $order->get_total_shipping_refunded();
|
1682 |
} elseif ( $field == 'order_shipping_minus_refund' ) {
|
@@ -1700,13 +1717,13 @@ class WC_Order_Export_Data_Extractor {
|
|
1700 |
} elseif ( $field == 'order_total_tax_minus_refund' ) {
|
1701 |
$row[ $field ] = wc_round_tax_total( $order->get_total_tax() - $order->get_total_tax_refunded() );
|
1702 |
} elseif ( $field == 'order_status' ) {
|
1703 |
-
$status
|
1704 |
-
$status
|
1705 |
$row[ $field ] = isset( self::$statuses[ 'wc-' . $status ] ) ? self::$statuses[ 'wc-' . $status ] : $status;
|
1706 |
-
} elseif ( $field == 'user_login' OR $field == 'user_email' OR $field == 'user_url') {
|
1707 |
$row[ $field ] = $user ? $user->$field : "";
|
1708 |
} elseif ( $field == 'user_role' ) {
|
1709 |
-
$roles
|
1710 |
$row[ $field ] = ( isset( $user->roles[0] ) && isset( $roles[ $user->roles[0] ] ) ) ? $roles[ $user->roles[0] ]['name'] : ""; // take first role Name
|
1711 |
} elseif ( $field == 'customer_total_orders' ) {
|
1712 |
$row[ $field ] = ( isset( $user->ID ) ) ? wc_get_customer_order_count( $user->ID ) : 0;
|
@@ -1835,7 +1852,16 @@ class WC_Order_Export_Data_Extractor {
|
|
1835 |
} //if order field set
|
1836 |
}
|
1837 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1838 |
$row = apply_filters( "woe_fetch_order", $row, $order );
|
|
|
1839 |
return $row;
|
1840 |
}
|
1841 |
|
@@ -1918,7 +1944,7 @@ class WC_Order_Export_Data_Extractor {
|
|
1918 |
if ( taxonomy_exists( wc_sanitize_taxonomy_name( $meta['meta_key'] ) ) ) {
|
1919 |
$term = get_term_by( 'slug', $meta['meta_value'],
|
1920 |
wc_sanitize_taxonomy_name( $meta['meta_key'] ) );
|
1921 |
-
$meta['meta_key'] = wc_attribute_label( wc_sanitize_taxonomy_name( $meta['meta_key'] ), $product);
|
1922 |
$meta['meta_value'] = isset( $term->name ) ? $term->name : $meta['meta_value'];
|
1923 |
} else {
|
1924 |
$meta['meta_key'] = wc_attribute_label( $meta['meta_key'], $product );
|
429 |
$product_where = join( " AND ", $product_where );
|
430 |
$sql = "SELECT DISTINCT ID FROM {$wpdb->posts} AS products $left_join_product_meta WHERE products.post_type in ('product','product_variation') AND products.post_status<>'trash' AND $product_where ";
|
431 |
$settings['products'] = $wpdb->get_col( $sql );
|
432 |
+
if ( empty( $settings['products'] ) ) // failed condition!
|
433 |
+
{
|
434 |
+
$settings['products'] = array( 0 );
|
435 |
+
}
|
436 |
}
|
437 |
|
438 |
// we have to use variations , if user sets product attributes
|
440 |
$values = self::sql_subset( $settings['products'] );
|
441 |
$sql = "SELECT DISTINCT ID FROM {$wpdb->posts} AS products WHERE products.post_type in ('product','product_variation') AND products.post_status<>'trash' AND post_parent IN ($values)";
|
442 |
$settings['products'] = $wpdb->get_col( $sql );
|
443 |
+
if ( empty( $settings['products'] ) ) // failed condition!
|
444 |
+
{
|
445 |
+
$settings['products'] = array( 0 );
|
446 |
+
}
|
447 |
}
|
448 |
if ( ! empty( $sql ) AND self::$track_sql_queries ) {
|
449 |
self::$sql_queries[] = $sql;
|
745 |
}
|
746 |
}
|
747 |
}
|
748 |
+
if ( ! empty( $settings['user_custom_fields'] ) ) {
|
749 |
$cf_names = self::get_user_custom_fields();
|
750 |
$filters = self::parse_complex_pairs( $settings['user_custom_fields'], $cf_names );
|
751 |
$pos = 1;
|
758 |
} elseif ( $operator == 'IS SET' ) {
|
759 |
$user_meta_where[] = " ( usermeta_cf_{$pos}.meta_value IS NOT NULL ) ";
|
760 |
} elseif ( $operator == 'IN' OR $operator == 'NOT IN' ) {
|
761 |
+
$values = self::sql_subset( $values );
|
762 |
$user_meta_where[] = " ( usermeta_cf_{$pos}.meta_value $operator ($values) ) ";
|
763 |
} elseif ( in_array( $operator, self::$operator_must_check_values ) ) {
|
764 |
$pairs = array();
|
766 |
$pairs[] = self::operator_compare_field_and_value( "`usermeta_cf_{$pos}`.meta_value",
|
767 |
$operator, $v );
|
768 |
}
|
769 |
+
$pairs = join( "OR", $pairs );
|
770 |
$user_meta_where[] = " ( $pairs ) ";
|
771 |
}
|
772 |
$pos ++;
|
802 |
}
|
803 |
|
804 |
// users
|
805 |
+
$user_ids = array();
|
806 |
$user_ids_ui_filters_applied = false;
|
807 |
if ( ! empty( $settings['user_names'] ) ) {
|
808 |
+
$user_ids = array_filter( array_map( "intval", $settings['user_names'] ) );
|
809 |
+
$values = self::sql_subset( $user_ids );
|
810 |
$user_meta_where[] = "( {$wpdb->users}.ID IN ($values) )";
|
811 |
}
|
812 |
//roles
|
813 |
if ( ! empty( $settings['user_roles'] ) ) {
|
814 |
+
$metakey = $wpdb->get_blog_prefix() . 'capabilities';
|
815 |
$inner_join_user_meta[] = "INNER JOIN {$wpdb->usermeta} AS usermeta_cf_role ON usermeta_cf_role.user_id = {$wpdb->users}.ID AND usermeta_cf_role.meta_key='$metakey'";
|
816 |
|
817 |
$roles_where = array();
|
818 |
foreach ( $settings['user_roles'] as $role ) {
|
819 |
$roles_where[] = "( usermeta_cf_role.meta_value LIKE '%$role%' )";
|
820 |
}
|
821 |
+
$user_meta_where[] = "(" . join( ' OR ', $roles_where ) . ")";
|
822 |
}
|
823 |
if ( ! empty( $user_meta_where ) AND ! empty( $inner_join_user_meta ) ) {
|
824 |
$user_meta_where = join( ' AND ', $user_meta_where );
|
825 |
$inner_join_user_meta = join( ' ', $inner_join_user_meta );
|
826 |
+
$sql = "SELECT DISTINCT ID FROM {$wpdb->users} $inner_join_user_meta WHERE $user_meta_where";
|
827 |
if ( self::$track_sql_queries ) {
|
828 |
self::$sql_queries[] = $sql;
|
829 |
}
|
830 |
+
$user_ids = $wpdb->get_col( $sql );
|
831 |
$user_ids_ui_filters_applied = true;
|
832 |
}
|
833 |
$user_ids = apply_filters( "woe_sql_get_customer_ids", $user_ids, $settings );
|
834 |
+
if ( empty( $user_ids ) AND $user_ids_ui_filters_applied ) {
|
835 |
$order_meta_where [] = "0"; // user filters failed
|
836 |
}
|
837 |
|
1178 |
global $wpdb;
|
1179 |
$coupons = array();
|
1180 |
foreach ( $order->get_items( 'coupon' ) as $item ) {
|
1181 |
+
$coupon_meta = array();
|
1182 |
+
$get_coupon_meta = ( array_diff( $labels->get_keys(),
|
1183 |
array( 'code', 'discount_amount', 'discount_amount_tax', 'excerpt' ) ) );
|
1184 |
if ( $get_coupon_meta ) {
|
1185 |
$recs = $wpdb->get_results( $wpdb->prepare( "SELECT meta_value,meta_key FROM {$wpdb->postmeta} AS meta
|
1220 |
}
|
1221 |
}
|
1222 |
|
1223 |
+
return apply_filters( "woe_fetch_order_coupons", $coupons, $order, $labels->get_legacy_labels(), $format = "",
|
1224 |
+
$static_vals );
|
1225 |
}
|
1226 |
|
1227 |
|
1228 |
/**
|
1229 |
+
* @param WC_Order $order
|
1230 |
* @param WC_Order_Export_Labels $labels
|
1231 |
+
* @param array $static_vals
|
1232 |
+
* @param array $options
|
1233 |
*
|
1234 |
* @return array
|
1235 |
*/
|
1239 |
$static_vals,
|
1240 |
$options
|
1241 |
) {
|
1242 |
+
$export_only_products = $options['include_products'];
|
1243 |
$product_fields_with_tags = array( 'product_variation', 'post_content', 'post_excerpt' );
|
1244 |
$products = array();
|
1245 |
$i = 0;
|
1311 |
$row[ $field ] = implode( ', ', $taxonomies );
|
1312 |
} else if ( $field == 'product_shipping_class' ) {
|
1313 |
$taxonomies = array();
|
1314 |
+
if ( ! empty( $item['variation_id'] ) )// try get from variation at first!
|
1315 |
+
{
|
1316 |
+
$taxonomies = wc_get_product_terms( $item['variation_id'], $field,
|
1317 |
+
array( 'fields' => 'names' ) );
|
1318 |
+
}
|
1319 |
+
if ( ! $taxonomies ) {
|
1320 |
+
$taxonomies = wc_get_product_terms( $item['product_id'], $field, array( 'fields' => 'names' ) );
|
1321 |
+
}
|
1322 |
//done
|
1323 |
$row[ $field ] = implode( ', ', $taxonomies );
|
1324 |
} elseif ( $field == 'line_total_plus_tax' ) {
|
1474 |
$products[ $item_id ] = $row;
|
1475 |
}
|
1476 |
}
|
1477 |
+
|
1478 |
+
return apply_filters( "woe_fetch_order_products", $products, $order, $labels->get_legacy_labels(), $format = "",
|
1479 |
+
$static_vals );
|
1480 |
}
|
1481 |
|
1482 |
|
1536 |
global $wp_roles;
|
1537 |
|
1538 |
// $extra_rows = array();
|
1539 |
+
$row = array();
|
1540 |
|
1541 |
// get order meta
|
1542 |
$order_meta = array();
|
1543 |
+
if ( $order_post_meta = get_post_meta( $order_id ) ) {
|
1544 |
+
foreach ( $order_post_meta as $meta_key => $meta_values ) {
|
1545 |
$order_meta[ $meta_key ] = join( self::$export_custom_fields_separator, $meta_values );
|
1546 |
}
|
1547 |
}
|
1567 |
$overwrite_child_order_meta = apply_filters( 'woe_overwrite_child_order_meta', $is_refund );
|
1568 |
|
1569 |
if ( $parent_order_meta = get_post_meta( $parent_order_id ) ) {
|
1570 |
+
foreach ( $parent_order_meta as $meta_key => $meta_values ) {
|
1571 |
if ( $overwrite_child_order_meta OR ! isset( $order_meta[ $meta_key ] ) ) {
|
1572 |
$order_meta[ $meta_key ] = join( self::$export_custom_fields_separator, $meta_values );
|
1573 |
}
|
1595 |
}
|
1596 |
|
1597 |
// we know parent!
|
1598 |
+
if ( ( $export['products'] || $options['include_products'] ) && ! empty( $labels['products'] ) ||
|
1599 |
+
isset( $labels['order']->count_unique_products ) || isset( $labels['order']->total_weight_items ) ) {
|
1600 |
+
// no labels for products??
|
1601 |
+
$tmp_labels = !empty($labels['products']) ? clone $labels['products'] : new WC_Order_Export_Labels();
|
1602 |
+
//need qty?
|
1603 |
+
if ( isset( $labels['order']->total_weight_items ) || isset( $labels['order']->count_unique_products ) ) {
|
1604 |
+
if ( ! isset( $tmp_labels->qty ) ) {
|
1605 |
$tmp_labels->qty = "";
|
1606 |
+
}
|
1607 |
+
}
|
1608 |
+
// need weight too?
|
1609 |
+
if ( isset( $labels['order']->total_weight_items ) ) {
|
1610 |
+
if ( ! isset( $tmp_labels->weight ) ) {
|
1611 |
$tmp_labels->weight = "";
|
1612 |
+
}
|
1613 |
}
|
1614 |
+
|
1615 |
$data['products'] = self::fetch_order_products(
|
1616 |
$order,
|
1617 |
$tmp_labels,
|
1618 |
+
isset( $static_vals['products'] ) ? $static_vals['products'] : array(),
|
1619 |
$options
|
1620 |
);
|
1621 |
+
if ( $options['include_products'] AND empty( $data['products'] ) AND apply_filters( "woe_skip_order_without_products", false ) ) {
|
|
|
1622 |
return array();
|
1623 |
}
|
1624 |
} else {
|
1629 |
$data['coupons'] = self::fetch_order_coupons(
|
1630 |
$parent_order ? $parent_order : $order,
|
1631 |
$labels['coupons'],
|
1632 |
+
isset( $static_vals['coupons'] ) ? $static_vals['coupons'] : array(),
|
1633 |
$options
|
1634 |
);
|
1635 |
} else {
|
1693 |
} elseif ( $field == 'order_shipping' ) {
|
1694 |
$row[ $field ] = $order->get_shipping_total();
|
1695 |
} elseif ( $field == 'order_shipping_plus_tax' ) {
|
1696 |
+
$row[ $field ] = $order->get_shipping_total() + $order->get_shipping_tax();
|
1697 |
} elseif ( $field == 'order_shipping_refunded' ) {
|
1698 |
$row[ $field ] = $order->get_total_shipping_refunded();
|
1699 |
} elseif ( $field == 'order_shipping_minus_refund' ) {
|
1717 |
} elseif ( $field == 'order_total_tax_minus_refund' ) {
|
1718 |
$row[ $field ] = wc_round_tax_total( $order->get_total_tax() - $order->get_total_tax_refunded() );
|
1719 |
} elseif ( $field == 'order_status' ) {
|
1720 |
+
$status = empty( $order_status ) ? $order->get_status() : $order_status;
|
1721 |
+
$status = 'wc-' === substr( $status, 0, 3 ) ? substr( $status, 3 ) : $status;
|
1722 |
$row[ $field ] = isset( self::$statuses[ 'wc-' . $status ] ) ? self::$statuses[ 'wc-' . $status ] : $status;
|
1723 |
+
} elseif ( $field == 'user_login' OR $field == 'user_email' OR $field == 'user_url' ) {
|
1724 |
$row[ $field ] = $user ? $user->$field : "";
|
1725 |
} elseif ( $field == 'user_role' ) {
|
1726 |
+
$roles = $wp_roles->roles;
|
1727 |
$row[ $field ] = ( isset( $user->roles[0] ) && isset( $roles[ $user->roles[0] ] ) ) ? $roles[ $user->roles[0] ]['name'] : ""; // take first role Name
|
1728 |
} elseif ( $field == 'customer_total_orders' ) {
|
1729 |
$row[ $field ] = ( isset( $user->ID ) ) ? wc_get_customer_order_count( $user->ID ) : 0;
|
1852 |
} //if order field set
|
1853 |
}
|
1854 |
|
1855 |
+
//no labels - no data !
|
1856 |
+
if( empty($labels['products']) ) {
|
1857 |
+
$row['products'] = array();
|
1858 |
+
}
|
1859 |
+
if( empty($labels['coupons']) ) {
|
1860 |
+
$row['coupons'] = array();
|
1861 |
+
}
|
1862 |
+
|
1863 |
$row = apply_filters( "woe_fetch_order", $row, $order );
|
1864 |
+
|
1865 |
return $row;
|
1866 |
}
|
1867 |
|
1944 |
if ( taxonomy_exists( wc_sanitize_taxonomy_name( $meta['meta_key'] ) ) ) {
|
1945 |
$term = get_term_by( 'slug', $meta['meta_value'],
|
1946 |
wc_sanitize_taxonomy_name( $meta['meta_key'] ) );
|
1947 |
+
$meta['meta_key'] = wc_attribute_label( wc_sanitize_taxonomy_name( $meta['meta_key'] ), $product );
|
1948 |
$meta['meta_value'] = isset( $term->name ) ? $term->name : $meta['meta_value'];
|
1949 |
} else {
|
1950 |
$meta['meta_key'] = wc_attribute_label( $meta['meta_key'], $product );
|
classes/core/class-wc-order-export-engine.php
CHANGED
@@ -47,7 +47,8 @@ class WC_Order_Export_Engine {
|
|
47 |
break;
|
48 |
}
|
49 |
}
|
50 |
-
do_action("woe_export_destination_finished", $exporter->finished_successfully, $export_type, $filename,
|
|
|
51 |
} else {
|
52 |
$results[] = $custom_export;
|
53 |
}
|
@@ -145,7 +146,7 @@ class WC_Order_Export_Engine {
|
|
145 |
private static function get_order_labels( $settings, $format, $field_formats_list ) {
|
146 |
$fields = $settings['order_fields'];
|
147 |
|
148 |
-
$labels
|
149 |
$static_fields = array();
|
150 |
$field_formats = array();
|
151 |
|
@@ -174,11 +175,11 @@ class WC_Order_Export_Engine {
|
|
174 |
}
|
175 |
|
176 |
$field['colname'] = apply_filters( "woe_get_{$format}_label_{$key}", $field['colname'] );
|
177 |
-
$labels->$key
|
178 |
}
|
179 |
|
180 |
return array(
|
181 |
-
'labels'
|
182 |
'static_fields' => $static_fields,
|
183 |
'field_formats' => $field_formats,
|
184 |
);
|
@@ -186,12 +187,12 @@ class WC_Order_Export_Engine {
|
|
186 |
|
187 |
/* process product/coupon fields*/
|
188 |
private static function get_sub_segment_labels( $segment, $settings, $format, $field_formats_list ) {
|
189 |
-
$labels
|
190 |
$static_fields = array();
|
191 |
$field_formats = array();
|
192 |
|
193 |
$is_flat = self::is_plain_format( $format );
|
194 |
-
$fields
|
195 |
|
196 |
foreach ( $fields as $field ) {
|
197 |
if ( empty ( $field['key'] ) ) {
|
@@ -201,7 +202,7 @@ class WC_Order_Export_Engine {
|
|
201 |
|
202 |
$key = $full_key;
|
203 |
if ( $is_flat ) {
|
204 |
-
if ( preg_match( '/^plain_'. $segment . 's_(.+)/', $full_key, $matches ) ) {
|
205 |
if ( isset( $matches[1] ) ) {
|
206 |
$key = $matches[1];
|
207 |
}
|
@@ -221,11 +222,11 @@ class WC_Order_Export_Engine {
|
|
221 |
}
|
222 |
|
223 |
$field['colname'] = apply_filters( "woe_get_{$format}_label_{$key}", $field['colname'] );
|
224 |
-
$labels->$key
|
225 |
}
|
226 |
|
227 |
return array(
|
228 |
-
'labels'
|
229 |
'static_fields' => $static_fields,
|
230 |
'field_formats' => $field_formats,
|
231 |
);
|
@@ -262,7 +263,8 @@ class WC_Order_Export_Engine {
|
|
262 |
do_action( 'woe_init_custom_formatter', $mode, $fname, $format_settings, $format, $labels, $field_formats,
|
263 |
self::$date_format, $settings, $offset );
|
264 |
|
265 |
-
return new $class( $mode, $fname, $format_settings, $format, $labels, $field_formats, self::$date_format,
|
|
|
266 |
}
|
267 |
|
268 |
private static function init_labels( $settings, &$labels, &$static_vals, &$field_formats ) {
|
@@ -279,21 +281,21 @@ class WC_Order_Export_Engine {
|
|
279 |
// );
|
280 |
|
281 |
$field_formats_ar = array( 'money', 'number', 'date', 'string' );
|
282 |
-
$labels_data
|
283 |
-
'order'
|
284 |
'products' => self::get_sub_segment_labels( 'product', $settings, $format, $field_formats_ar ),
|
285 |
-
'coupons'
|
286 |
);
|
287 |
-
$labels
|
288 |
-
$static_vals
|
289 |
-
$field_formats
|
290 |
foreach ( $labels_data as $segment => $label_data ) {
|
291 |
-
$labels[$segment] = ! empty( $label_data['labels'] ) ? $label_data['labels'] : array();
|
292 |
if ( ! empty( $label_data['static_fields'] ) ) {
|
293 |
-
$static_vals[$segment] = $label_data['static_fields'];
|
294 |
}
|
295 |
if ( ! empty( $label_data['field_formats'] ) ) {
|
296 |
-
$field_formats[$segment] = array_map( "array_unique", $label_data['field_formats'] );
|
297 |
//clean up possible duplicates
|
298 |
// $field_formats = array_merge_recursive( $field_formats, $label_data['field_formats'] );
|
299 |
}
|
@@ -309,7 +311,7 @@ class WC_Order_Export_Engine {
|
|
309 |
*/
|
310 |
private static function _check_products_and_coupons_fields( $settings, &$export ) {
|
311 |
$export['products'] = false;
|
312 |
-
$export['coupons']
|
313 |
foreach ( $settings['order_fields'] as $field ) {
|
314 |
if ( 'products' == $field['key'] ) {
|
315 |
$export['products'] = true;
|
@@ -323,6 +325,7 @@ class WC_Order_Export_Engine {
|
|
323 |
}
|
324 |
|
325 |
}
|
|
|
326 |
private static function _install_options( $settings ) {
|
327 |
global $wpdb;
|
328 |
|
@@ -483,11 +486,11 @@ class WC_Order_Export_Engine {
|
|
483 |
$sql .= apply_filters( "woe_sql_get_order_ids_order_by",
|
484 |
" ORDER BY " . $settings['sort'] . " " . $settings['sort_direction'] ) . " LIMIT " . ( $limit !== false ? $limit : 1 );
|
485 |
} elseif ( $make_mode == 'partial' ) {
|
486 |
-
$sql
|
487 |
" ORDER BY " . $settings['sort'] . " " . $settings['sort_direction'] );
|
488 |
-
$startat = ($settings['mark_exported_orders'] && $settings['export_unmarked_orders']) ? 0 : intval( $offset );
|
489 |
-
$limit
|
490 |
-
$sql
|
491 |
}
|
492 |
|
493 |
$order_ids = apply_filters( "woe_get_order_ids", $wpdb->get_col( $sql ) );
|
@@ -516,7 +519,7 @@ class WC_Order_Export_Engine {
|
|
516 |
continue;
|
517 |
}
|
518 |
self::$order_id = $order_id;
|
519 |
-
$row
|
520 |
$export, $static_vals, self::$extractor_options );
|
521 |
|
522 |
$row = apply_filters( "woe_fetch_order_row", $row, $order_id );
|
@@ -539,7 +542,7 @@ class WC_Order_Export_Engine {
|
|
539 |
} elseif ( $make_mode == 'preview' ) {
|
540 |
// self::maybe_output_summary_report( $formater );
|
541 |
//limit debug output
|
542 |
-
if ( $settings['enable_debug'] AND self::is_plain_format( $settings['format']) ) {
|
543 |
echo "<b>" . __( 'Main SQL queries are listed below', 'woo-order-export-lite' ) . "</b>";
|
544 |
echo '<textarea rows=5 style="width:100%">';
|
545 |
$s = array();
|
@@ -588,7 +591,8 @@ class WC_Order_Export_Engine {
|
|
588 |
|
589 |
if ( empty( $order_ids ) AND apply_filters( 'woe_schedule_job_skip_empty_file',
|
590 |
(bool) $settings['skip_empty_file'] ) ) {
|
591 |
-
|
|
|
592 |
return false;
|
593 |
}
|
594 |
|
@@ -610,16 +614,16 @@ class WC_Order_Export_Engine {
|
|
610 |
continue;
|
611 |
}
|
612 |
self::$order_id = $order_id;
|
613 |
-
$row
|
614 |
$export, $static_vals, self::$extractor_options );
|
615 |
-
$row
|
616 |
if ( $row ) {
|
617 |
$formater->output( $row );
|
618 |
do_action( "woe_order_row_exported", $row, $order_id );
|
619 |
}
|
620 |
do_action( "woe_order_exported", $order_id );
|
621 |
|
622 |
-
do_action( 'woe_formatter_output_custom_formatter', $row, $order_id, $labels,
|
623 |
$export, $static_vals, self::$extractor_options );
|
624 |
|
625 |
self::$orders_exported ++;
|
@@ -691,11 +695,11 @@ class WC_Order_Export_Engine {
|
|
691 |
$formater = self::init_formater( '', $settings, $filename, $labels, $static_vals, 0 );
|
692 |
|
693 |
$formater->truncate();
|
694 |
-
$formater->start(
|
695 |
-
$row
|
696 |
$export, $static_vals, self::$extractor_options );
|
697 |
$row = apply_filters( "woe_fetch_order_row", $row, $order_id );
|
698 |
-
|
699 |
if ( $row ) {
|
700 |
$formater->output( $row );
|
701 |
do_action( "woe_order_row_exported", $row, $order_id );
|
@@ -728,11 +732,11 @@ class WC_Order_Export_Engine {
|
|
728 |
$file = self::build_file_full( $settings, $filename, $limit, $order_ids );
|
729 |
if ( $file !== false ) {
|
730 |
|
731 |
-
|
732 |
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
|
737 |
} else {
|
738 |
$result = false;
|
@@ -759,6 +763,7 @@ class WC_Order_Export_Engine {
|
|
759 |
|
760 |
public static function is_plain_format( $format ) {
|
761 |
$flat_formats = array( 'xls', 'csv', 'tsv' );
|
762 |
-
|
|
|
763 |
}
|
764 |
}
|
47 |
break;
|
48 |
}
|
49 |
}
|
50 |
+
do_action( "woe_export_destination_finished", $exporter->finished_successfully, $export_type, $filename,
|
51 |
+
$filepath, $settings, $exporter );
|
52 |
} else {
|
53 |
$results[] = $custom_export;
|
54 |
}
|
146 |
private static function get_order_labels( $settings, $format, $field_formats_list ) {
|
147 |
$fields = $settings['order_fields'];
|
148 |
|
149 |
+
$labels = new WC_Order_Export_Labels();
|
150 |
$static_fields = array();
|
151 |
$field_formats = array();
|
152 |
|
175 |
}
|
176 |
|
177 |
$field['colname'] = apply_filters( "woe_get_{$format}_label_{$key}", $field['colname'] );
|
178 |
+
$labels->$key = $field['colname'];
|
179 |
}
|
180 |
|
181 |
return array(
|
182 |
+
'labels' => $labels->is_not_empty() ? $labels : false,
|
183 |
'static_fields' => $static_fields,
|
184 |
'field_formats' => $field_formats,
|
185 |
);
|
187 |
|
188 |
/* process product/coupon fields*/
|
189 |
private static function get_sub_segment_labels( $segment, $settings, $format, $field_formats_list ) {
|
190 |
+
$labels = new WC_Order_Export_Labels();
|
191 |
$static_fields = array();
|
192 |
$field_formats = array();
|
193 |
|
194 |
$is_flat = self::is_plain_format( $format );
|
195 |
+
$fields = $is_flat ? $settings['order_fields'] : $settings[ 'order_' . $segment . '_fields' ];
|
196 |
|
197 |
foreach ( $fields as $field ) {
|
198 |
if ( empty ( $field['key'] ) ) {
|
202 |
|
203 |
$key = $full_key;
|
204 |
if ( $is_flat ) {
|
205 |
+
if ( preg_match( '/^plain_' . $segment . 's_(.+)/', $full_key, $matches ) ) {
|
206 |
if ( isset( $matches[1] ) ) {
|
207 |
$key = $matches[1];
|
208 |
}
|
222 |
}
|
223 |
|
224 |
$field['colname'] = apply_filters( "woe_get_{$format}_label_{$key}", $field['colname'] );
|
225 |
+
$labels->$key = $field['colname'];
|
226 |
}
|
227 |
|
228 |
return array(
|
229 |
+
'labels' => $labels->is_not_empty() ? $labels : false,
|
230 |
'static_fields' => $static_fields,
|
231 |
'field_formats' => $field_formats,
|
232 |
);
|
263 |
do_action( 'woe_init_custom_formatter', $mode, $fname, $format_settings, $format, $labels, $field_formats,
|
264 |
self::$date_format, $settings, $offset );
|
265 |
|
266 |
+
return new $class( $mode, $fname, $format_settings, $format, $labels, $field_formats, self::$date_format,
|
267 |
+
$offset );
|
268 |
}
|
269 |
|
270 |
private static function init_labels( $settings, &$labels, &$static_vals, &$field_formats ) {
|
281 |
// );
|
282 |
|
283 |
$field_formats_ar = array( 'money', 'number', 'date', 'string' );
|
284 |
+
$labels_data = array(
|
285 |
+
'order' => self::get_order_labels( $settings, $format, $field_formats_ar ),
|
286 |
'products' => self::get_sub_segment_labels( 'product', $settings, $format, $field_formats_ar ),
|
287 |
+
'coupons' => self::get_sub_segment_labels( 'coupon', $settings, $format, $field_formats_ar ),
|
288 |
);
|
289 |
+
$labels = array();
|
290 |
+
$static_vals = array();
|
291 |
+
$field_formats = array();
|
292 |
foreach ( $labels_data as $segment => $label_data ) {
|
293 |
+
$labels[ $segment ] = ! empty( $label_data['labels'] ) ? $label_data['labels'] : array();
|
294 |
if ( ! empty( $label_data['static_fields'] ) ) {
|
295 |
+
$static_vals[ $segment ] = $label_data['static_fields'];
|
296 |
}
|
297 |
if ( ! empty( $label_data['field_formats'] ) ) {
|
298 |
+
$field_formats[ $segment ] = array_map( "array_unique", $label_data['field_formats'] );
|
299 |
//clean up possible duplicates
|
300 |
// $field_formats = array_merge_recursive( $field_formats, $label_data['field_formats'] );
|
301 |
}
|
311 |
*/
|
312 |
private static function _check_products_and_coupons_fields( $settings, &$export ) {
|
313 |
$export['products'] = false;
|
314 |
+
$export['coupons'] = false;
|
315 |
foreach ( $settings['order_fields'] as $field ) {
|
316 |
if ( 'products' == $field['key'] ) {
|
317 |
$export['products'] = true;
|
325 |
}
|
326 |
|
327 |
}
|
328 |
+
|
329 |
private static function _install_options( $settings ) {
|
330 |
global $wpdb;
|
331 |
|
486 |
$sql .= apply_filters( "woe_sql_get_order_ids_order_by",
|
487 |
" ORDER BY " . $settings['sort'] . " " . $settings['sort_direction'] ) . " LIMIT " . ( $limit !== false ? $limit : 1 );
|
488 |
} elseif ( $make_mode == 'partial' ) {
|
489 |
+
$sql .= apply_filters( "woe_sql_get_order_ids_order_by",
|
490 |
" ORDER BY " . $settings['sort'] . " " . $settings['sort_direction'] );
|
491 |
+
$startat = ( $settings['mark_exported_orders'] && $settings['export_unmarked_orders'] ) ? 0 : intval( $offset );
|
492 |
+
$limit = intval( $limit );
|
493 |
+
$sql .= " LIMIT $startat,$limit";
|
494 |
}
|
495 |
|
496 |
$order_ids = apply_filters( "woe_get_order_ids", $wpdb->get_col( $sql ) );
|
519 |
continue;
|
520 |
}
|
521 |
self::$order_id = $order_id;
|
522 |
+
$row = WC_Order_Export_Data_Extractor::fetch_order_data( $order_id, $labels,
|
523 |
$export, $static_vals, self::$extractor_options );
|
524 |
|
525 |
$row = apply_filters( "woe_fetch_order_row", $row, $order_id );
|
542 |
} elseif ( $make_mode == 'preview' ) {
|
543 |
// self::maybe_output_summary_report( $formater );
|
544 |
//limit debug output
|
545 |
+
if ( $settings['enable_debug'] AND self::is_plain_format( $settings['format'] ) ) {
|
546 |
echo "<b>" . __( 'Main SQL queries are listed below', 'woo-order-export-lite' ) . "</b>";
|
547 |
echo '<textarea rows=5 style="width:100%">';
|
548 |
$s = array();
|
591 |
|
592 |
if ( empty( $order_ids ) AND apply_filters( 'woe_schedule_job_skip_empty_file',
|
593 |
(bool) $settings['skip_empty_file'] ) ) {
|
594 |
+
unlink( $filename );
|
595 |
+
|
596 |
return false;
|
597 |
}
|
598 |
|
614 |
continue;
|
615 |
}
|
616 |
self::$order_id = $order_id;
|
617 |
+
$row = WC_Order_Export_Data_Extractor::fetch_order_data( $order_id, $labels,
|
618 |
$export, $static_vals, self::$extractor_options );
|
619 |
+
$row = apply_filters( "woe_fetch_order_row", $row, $order_id );
|
620 |
if ( $row ) {
|
621 |
$formater->output( $row );
|
622 |
do_action( "woe_order_row_exported", $row, $order_id );
|
623 |
}
|
624 |
do_action( "woe_order_exported", $order_id );
|
625 |
|
626 |
+
do_action( 'woe_formatter_output_custom_formatter', $row, $order_id, $labels,
|
627 |
$export, $static_vals, self::$extractor_options );
|
628 |
|
629 |
self::$orders_exported ++;
|
695 |
$formater = self::init_formater( '', $settings, $filename, $labels, $static_vals, 0 );
|
696 |
|
697 |
$formater->truncate();
|
698 |
+
$formater->start();
|
699 |
+
$row = WC_Order_Export_Data_Extractor::fetch_order_data( $order_id, $labels,
|
700 |
$export, $static_vals, self::$extractor_options );
|
701 |
$row = apply_filters( "woe_fetch_order_row", $row, $order_id );
|
702 |
+
|
703 |
if ( $row ) {
|
704 |
$formater->output( $row );
|
705 |
do_action( "woe_order_row_exported", $row, $order_id );
|
732 |
$file = self::build_file_full( $settings, $filename, $limit, $order_ids );
|
733 |
if ( $file !== false ) {
|
734 |
|
735 |
+
$result = self::export( $settings, $file );
|
736 |
|
737 |
+
if ( file_exists( $file ) ) {
|
738 |
+
unlink( $file );
|
739 |
+
}
|
740 |
|
741 |
} else {
|
742 |
$result = false;
|
763 |
|
764 |
public static function is_plain_format( $format ) {
|
765 |
$flat_formats = array( 'xls', 'csv', 'tsv' );
|
766 |
+
|
767 |
+
return in_array( strtolower( $format ), $flat_formats );
|
768 |
}
|
769 |
}
|
classes/formats/abstract-class-woe-formatter-plain-format.php
CHANGED
@@ -13,65 +13,80 @@ abstract class WOE_Formatter_Plain_Format extends WOE_Formatter {
|
|
13 |
|
14 |
protected $summary_processing = false;
|
15 |
|
16 |
-
public function __construct(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
parent::__construct( $mode, $filename, $settings, $format, $labels, $field_formats, $date_format, $offset );
|
18 |
$this->duplicate_settings = $this->settings['global_job_settings']['duplicated_fields_settings'];
|
19 |
$this->summary_report = $this->settings['global_job_settings']['summary_report_by_products'];
|
20 |
-
if( $this->summary_report ) {
|
21 |
self::check_create_session();
|
22 |
$this->field_formats["order"] = $this->field_formats["products"];// Products at top level!
|
23 |
-
}
|
24 |
$this->summary_processing = false; //true only when we finish order scan
|
25 |
}
|
26 |
|
27 |
public function output( $rec ) {
|
28 |
//don't output orders in summary mode!
|
29 |
-
if (
|
30 |
$this->try_fill_summary_report_fields( $rec );
|
|
|
31 |
return array();
|
32 |
-
}
|
33 |
-
|
34 |
$rec = parent::output( $rec );
|
35 |
if ( $this->summary_processing ) {
|
36 |
-
return array($rec); // need array for plain format iterators
|
37 |
}
|
38 |
|
39 |
return apply_filters( 'woe_fetch_order_data', $this->maybe_multiple_fields( $rec ) );
|
40 |
}
|
41 |
|
42 |
protected function maybe_multiple_fields( $rec ) {
|
43 |
-
|
44 |
//get modes
|
45 |
$products_repeat = $this->duplicate_settings['products']['repeat'];
|
46 |
$coupons_repeat = $this->duplicate_settings['coupons']['repeat'];
|
47 |
-
|
48 |
$tmp_rec = array();
|
49 |
foreach ( $this->labels['order']->get_labels() as $label_data ) {
|
50 |
$original_key = $label_data['key'];
|
51 |
$key = $label_data['parent_key'] ? $label_data['parent_key'] : $original_key;
|
52 |
|
53 |
-
$tmp_rec[ $
|
54 |
}
|
55 |
$rec = $tmp_rec;
|
56 |
-
|
|
|
57 |
//simpleast
|
58 |
-
if ( $products_repeat == 'inside_one_cell' )
|
59 |
-
$rec= $this->merge_nested_rows_to_one_record( $rec, 'products' );
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
63 |
//more complex
|
64 |
$repeat_as_cols = array();
|
65 |
-
if ( $products_repeat == 'columns')
|
66 |
$repeat_as_cols[] = 'products';
|
67 |
-
|
|
|
68 |
$repeat_as_cols[] = 'coupons';
|
69 |
-
|
|
|
70 |
$rec = $this->add_nested_rows_as_columns( $rec, $repeat_as_cols );
|
|
|
71 |
|
72 |
//we still have one records at this point!
|
73 |
if ( $products_repeat == 'rows' || $coupons_repeat == 'rows' ) {
|
74 |
-
$new_rows = $this->try_multi_rows( $rec);
|
75 |
//var_dump($new_rows ); die();
|
76 |
} else {
|
77 |
$new_rows = array( $rec );
|
@@ -102,83 +117,84 @@ abstract class WOE_Formatter_Plain_Format extends WOE_Formatter {
|
|
102 |
}
|
103 |
|
104 |
|
105 |
-
|
106 |
protected function make_header( $data = '' ) {
|
107 |
-
$header
|
108 |
$repeat['products'] = $this->duplicate_settings['products']['repeat'];
|
109 |
-
$repeat['coupons']
|
110 |
|
111 |
if ( $this->summary_report ) {
|
112 |
return $this->make_summary_header( $data );
|
113 |
-
}
|
114 |
|
115 |
-
$group_fields
|
116 |
'products' => array(),
|
117 |
-
'coupons'
|
118 |
);
|
119 |
$current_group_type = "";
|
120 |
|
121 |
foreach ( $this->labels['order']->to_Array() as $field => $label ) {
|
122 |
//should ignore start of 1st product/coupon section
|
123 |
-
if ( $field == 'products' OR
|
124 |
continue;
|
125 |
-
|
|
|
126 |
$prev_group_type = $current_group_type;
|
127 |
-
$added_to_group
|
128 |
|
129 |
if ( preg_match( '/^plain_(products|coupons)_.+/', $field, $matches ) ) {
|
130 |
-
$type
|
131 |
$current_group_type = $type;
|
132 |
-
if ( 'columns' == $repeat[$type] ) {
|
133 |
-
$group_fields[$type][] = $field;
|
134 |
-
$added_to_group
|
135 |
}
|
136 |
} else {
|
137 |
$current_group_type = 'order';
|
138 |
}
|
139 |
-
|
140 |
// previously we get product/coupon fields?
|
141 |
-
if ( $prev_group_type !== $current_group_type AND !empty($group_fields[$prev_group_type]) ) {
|
142 |
-
$this->multiplicate_header( $header, $prev_group_type, $group_fields[$prev_group_type] );
|
143 |
-
$group_fields[$prev_group_type] = array();
|
144 |
}
|
145 |
|
146 |
-
if (
|
147 |
-
|
148 |
-
|
149 |
|
150 |
}
|
151 |
}
|
152 |
|
153 |
//have groups at the end ?
|
154 |
-
foreach( $group_fields
|
155 |
-
if ( ! empty($fields) ) {
|
156 |
$this->multiplicate_header( $header, $group_type, $fields );
|
157 |
}
|
158 |
-
}
|
159 |
-
|
160 |
do_action( 'woe_make_header_custom_formatter', $this->labels );// BUG: wrong hook
|
161 |
|
162 |
return $header;
|
163 |
}
|
164 |
|
165 |
-
private function multiplicate_header(&$header, $type, $grouped_headers) {
|
166 |
$multiply_fields = array();
|
167 |
-
$this->multiplicate_fields( $multiply_fields
|
168 |
-
foreach ( array_keys($multiply_fields) as $multiply_field ) {
|
169 |
-
if ( preg_match( '/^plain_' . $type .'_(.+)_(\d+)/', $multiply_field, $matches ) ) {
|
170 |
$segment_field = $matches[1];
|
171 |
-
$index
|
172 |
-
$header_tmp
|
173 |
|
174 |
-
$header[] = apply_filters( 'woe_add_csv_headers', $header_tmp['label'] . ' #' . $index,
|
|
|
175 |
}
|
176 |
}
|
177 |
|
178 |
}
|
179 |
|
180 |
//Summary report started here!
|
181 |
-
|
182 |
private static function check_create_session() {
|
183 |
if ( ! session_id() ) {
|
184 |
@session_start();
|
@@ -186,10 +202,10 @@ abstract class WOE_Formatter_Plain_Format extends WOE_Formatter {
|
|
186 |
}
|
187 |
|
188 |
protected function make_summary_header( $data = '' ) {
|
189 |
-
$header
|
190 |
self::check_create_session();
|
191 |
$_SESSION['woe_summary_products'] = array();
|
192 |
-
|
193 |
foreach ( $this->labels['products']->get_labels() as $label_data ) {
|
194 |
$field_header = $label_data['label'];
|
195 |
$key = $label_data['key'];
|
@@ -201,66 +217,76 @@ abstract class WOE_Formatter_Plain_Format extends WOE_Formatter {
|
|
201 |
unset( $this->labels['products']->$key );
|
202 |
}
|
203 |
}
|
204 |
-
|
|
|
205 |
}
|
206 |
|
207 |
private function try_fill_summary_report_fields( $row ) {
|
208 |
$order = false;
|
209 |
-
|
210 |
foreach ( self::get_array_from_array( $row, 'products' ) as $item_id => $item ) {
|
211 |
$product_item = new WC_Order_Item_Product( $item_id );
|
212 |
$product = $product_item->get_product();
|
213 |
if ( ! $product ) {
|
214 |
continue;
|
215 |
}
|
216 |
-
if(
|
217 |
$order = new WC_Order( $product_item->get_order_id() );
|
218 |
}
|
219 |
-
|
220 |
-
$key
|
221 |
-
$key
|
222 |
-
|
223 |
//add new product
|
224 |
if ( ! isset( $_SESSION['woe_summary_products'][ $key ] ) ) {
|
225 |
$new_row = array();
|
226 |
foreach ( $this->labels['products']->get_labels() as $label_data ) {
|
227 |
$original_key = $label_data['key'];
|
228 |
-
|
229 |
-
|
230 |
continue;
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
|
|
|
|
|
|
236 |
}
|
237 |
-
$new_row
|
238 |
-
|
|
|
|
|
239 |
$_SESSION['woe_summary_products'][ $key ] = $new_row;
|
240 |
}
|
241 |
-
|
242 |
//increase totals
|
243 |
if ( isset( $_SESSION['woe_summary_products'][ $key ]['summary_report_total_qty'] ) ) {
|
244 |
$_SESSION['woe_summary_products'][ $key ]['summary_report_total_qty'] += $product_item->get_quantity();
|
245 |
}
|
246 |
|
247 |
if ( isset( $_SESSION['woe_summary_products'][ $key ]['summary_report_total_amount'] ) ) {
|
248 |
-
$total
|
|
|
249 |
$_SESSION['woe_summary_products'][ $key ]['summary_report_total_amount'] += wc_round_tax_total( $total );
|
250 |
}
|
251 |
-
do_action("woe_summary_products_add_item", $key, $product_item, $order);
|
252 |
}
|
|
|
253 |
//no lines for order!
|
254 |
return array();
|
255 |
}
|
256 |
-
|
257 |
protected function try_apply_summary_report_fields() {
|
258 |
if ( $this->summary_report ) {
|
259 |
$this->summary_processing = true;
|
260 |
do_action( 'woe_summary_before_output' );
|
261 |
if ( $this->mode == 'preview' ) {
|
262 |
-
if( empty($this->rows ) ) // no headers!
|
|
|
263 |
$this->rows = array();
|
|
|
264 |
$this->rows += $_SESSION['woe_summary_products'];
|
265 |
} else {
|
266 |
foreach ( $_SESSION['woe_summary_products'] as $item ) {
|
13 |
|
14 |
protected $summary_processing = false;
|
15 |
|
16 |
+
public function __construct(
|
17 |
+
$mode,
|
18 |
+
$filename,
|
19 |
+
$settings,
|
20 |
+
$format,
|
21 |
+
$labels,
|
22 |
+
$field_formats,
|
23 |
+
$date_format,
|
24 |
+
$offset
|
25 |
+
) {
|
26 |
parent::__construct( $mode, $filename, $settings, $format, $labels, $field_formats, $date_format, $offset );
|
27 |
$this->duplicate_settings = $this->settings['global_job_settings']['duplicated_fields_settings'];
|
28 |
$this->summary_report = $this->settings['global_job_settings']['summary_report_by_products'];
|
29 |
+
if ( $this->summary_report ) {
|
30 |
self::check_create_session();
|
31 |
$this->field_formats["order"] = $this->field_formats["products"];// Products at top level!
|
32 |
+
}
|
33 |
$this->summary_processing = false; //true only when we finish order scan
|
34 |
}
|
35 |
|
36 |
public function output( $rec ) {
|
37 |
//don't output orders in summary mode!
|
38 |
+
if ( $this->summary_report AND ! $this->summary_processing ) {
|
39 |
$this->try_fill_summary_report_fields( $rec );
|
40 |
+
|
41 |
return array();
|
42 |
+
}
|
43 |
+
|
44 |
$rec = parent::output( $rec );
|
45 |
if ( $this->summary_processing ) {
|
46 |
+
return array( $rec ); // need array for plain format iterators
|
47 |
}
|
48 |
|
49 |
return apply_filters( 'woe_fetch_order_data', $this->maybe_multiple_fields( $rec ) );
|
50 |
}
|
51 |
|
52 |
protected function maybe_multiple_fields( $rec ) {
|
|
|
53 |
//get modes
|
54 |
$products_repeat = $this->duplicate_settings['products']['repeat'];
|
55 |
$coupons_repeat = $this->duplicate_settings['coupons']['repeat'];
|
56 |
+
|
57 |
$tmp_rec = array();
|
58 |
foreach ( $this->labels['order']->get_labels() as $label_data ) {
|
59 |
$original_key = $label_data['key'];
|
60 |
$key = $label_data['parent_key'] ? $label_data['parent_key'] : $original_key;
|
61 |
|
62 |
+
$tmp_rec[ $original_key ] = isset( $rec[ $key ] ) ? $rec[ $key ] : "";
|
63 |
}
|
64 |
$rec = $tmp_rec;
|
65 |
+
|
66 |
+
|
67 |
//simpleast
|
68 |
+
if ( $products_repeat == 'inside_one_cell' ) {
|
69 |
+
$rec = $this->merge_nested_rows_to_one_record( $rec, 'products' );
|
70 |
+
}
|
71 |
+
if ( $coupons_repeat == 'inside_one_cell' ) {
|
72 |
+
$rec = $this->merge_nested_rows_to_one_record( $rec, 'coupons' );
|
73 |
+
}
|
74 |
+
|
75 |
//more complex
|
76 |
$repeat_as_cols = array();
|
77 |
+
if ( $products_repeat == 'columns' ) {
|
78 |
$repeat_as_cols[] = 'products';
|
79 |
+
}
|
80 |
+
if ( $coupons_repeat == 'columns' ) {
|
81 |
$repeat_as_cols[] = 'coupons';
|
82 |
+
}
|
83 |
+
if ( $repeat_as_cols ) {
|
84 |
$rec = $this->add_nested_rows_as_columns( $rec, $repeat_as_cols );
|
85 |
+
}
|
86 |
|
87 |
//we still have one records at this point!
|
88 |
if ( $products_repeat == 'rows' || $coupons_repeat == 'rows' ) {
|
89 |
+
$new_rows = $this->try_multi_rows( $rec );
|
90 |
//var_dump($new_rows ); die();
|
91 |
} else {
|
92 |
$new_rows = array( $rec );
|
117 |
}
|
118 |
|
119 |
|
|
|
120 |
protected function make_header( $data = '' ) {
|
121 |
+
$header = array();
|
122 |
$repeat['products'] = $this->duplicate_settings['products']['repeat'];
|
123 |
+
$repeat['coupons'] = $this->duplicate_settings['coupons']['repeat'];
|
124 |
|
125 |
if ( $this->summary_report ) {
|
126 |
return $this->make_summary_header( $data );
|
127 |
+
}
|
128 |
|
129 |
+
$group_fields = array(
|
130 |
'products' => array(),
|
131 |
+
'coupons' => array(),
|
132 |
);
|
133 |
$current_group_type = "";
|
134 |
|
135 |
foreach ( $this->labels['order']->to_Array() as $field => $label ) {
|
136 |
//should ignore start of 1st product/coupon section
|
137 |
+
if ( $field == 'products' OR $field == 'coupons' ) {
|
138 |
continue;
|
139 |
+
}
|
140 |
+
|
141 |
$prev_group_type = $current_group_type;
|
142 |
+
$added_to_group = false;
|
143 |
|
144 |
if ( preg_match( '/^plain_(products|coupons)_.+/', $field, $matches ) ) {
|
145 |
+
$type = $matches[1];
|
146 |
$current_group_type = $type;
|
147 |
+
if ( 'columns' == $repeat[ $type ] ) {
|
148 |
+
$group_fields[ $type ][] = $field;
|
149 |
+
$added_to_group = true;
|
150 |
}
|
151 |
} else {
|
152 |
$current_group_type = 'order';
|
153 |
}
|
154 |
+
|
155 |
// previously we get product/coupon fields?
|
156 |
+
if ( $prev_group_type !== $current_group_type AND ! empty( $group_fields[ $prev_group_type ] ) ) {
|
157 |
+
$this->multiplicate_header( $header, $prev_group_type, $group_fields[ $prev_group_type ] );
|
158 |
+
$group_fields[ $prev_group_type ] = array();
|
159 |
}
|
160 |
|
161 |
+
if ( ! $added_to_group ) {
|
162 |
+
// TODO create filter
|
163 |
+
$header[] = $label;
|
164 |
|
165 |
}
|
166 |
}
|
167 |
|
168 |
//have groups at the end ?
|
169 |
+
foreach ( $group_fields as $group_type => $fields ) {
|
170 |
+
if ( ! empty( $fields ) ) {
|
171 |
$this->multiplicate_header( $header, $group_type, $fields );
|
172 |
}
|
173 |
+
}
|
174 |
+
|
175 |
do_action( 'woe_make_header_custom_formatter', $this->labels );// BUG: wrong hook
|
176 |
|
177 |
return $header;
|
178 |
}
|
179 |
|
180 |
+
private function multiplicate_header( &$header, $type, $grouped_headers ) {
|
181 |
$multiply_fields = array();
|
182 |
+
$this->multiplicate_fields( $multiply_fields, $type, array(), $grouped_headers );
|
183 |
+
foreach ( array_keys( $multiply_fields ) as $multiply_field ) {
|
184 |
+
if ( preg_match( '/^plain_' . $type . '_(.+)_(\d+)/', $multiply_field, $matches ) ) {
|
185 |
$segment_field = $matches[1];
|
186 |
+
$index = $matches[2];
|
187 |
+
$header_tmp = $this->labels[ $type ]->$segment_field;
|
188 |
|
189 |
+
$header[] = apply_filters( 'woe_add_csv_headers', $header_tmp['label'] . ' #' . $index,
|
190 |
+
$multiply_field );
|
191 |
}
|
192 |
}
|
193 |
|
194 |
}
|
195 |
|
196 |
//Summary report started here!
|
197 |
+
|
198 |
private static function check_create_session() {
|
199 |
if ( ! session_id() ) {
|
200 |
@session_start();
|
202 |
}
|
203 |
|
204 |
protected function make_summary_header( $data = '' ) {
|
205 |
+
$header = array();
|
206 |
self::check_create_session();
|
207 |
$_SESSION['woe_summary_products'] = array();
|
208 |
+
|
209 |
foreach ( $this->labels['products']->get_labels() as $label_data ) {
|
210 |
$field_header = $label_data['label'];
|
211 |
$key = $label_data['key'];
|
217 |
unset( $this->labels['products']->$key );
|
218 |
}
|
219 |
}
|
220 |
+
|
221 |
+
return apply_filters( 'woe_summary_headers', $header );
|
222 |
}
|
223 |
|
224 |
private function try_fill_summary_report_fields( $row ) {
|
225 |
$order = false;
|
226 |
+
|
227 |
foreach ( self::get_array_from_array( $row, 'products' ) as $item_id => $item ) {
|
228 |
$product_item = new WC_Order_Item_Product( $item_id );
|
229 |
$product = $product_item->get_product();
|
230 |
if ( ! $product ) {
|
231 |
continue;
|
232 |
}
|
233 |
+
if ( ! $order ) {
|
234 |
$order = new WC_Order( $product_item->get_order_id() );
|
235 |
}
|
236 |
+
|
237 |
+
$key = $product->get_id();
|
238 |
+
$key = apply_filters( "woe_summary_products_adjust_key", $key, $product, $product_item, $order );
|
239 |
+
|
240 |
//add new product
|
241 |
if ( ! isset( $_SESSION['woe_summary_products'][ $key ] ) ) {
|
242 |
$new_row = array();
|
243 |
foreach ( $this->labels['products']->get_labels() as $label_data ) {
|
244 |
$original_key = $label_data['key'];
|
245 |
+
if ( preg_match( '#^(line_|qty)#', $original_key ) )//skip item values!
|
246 |
+
{
|
247 |
continue;
|
248 |
+
}
|
249 |
+
$field_key = $label_data['parent_key'] ? $label_data['parent_key'] : $original_key;
|
250 |
+
if ( preg_match( '#^summary_report_total_#', $field_key ) ) {
|
251 |
+
$new_row[ $original_key ] = 0;
|
252 |
+
}//total fields
|
253 |
+
else {
|
254 |
+
$new_row[ $original_key ] = $item[ $field_key ];
|
255 |
+
} // already calculated
|
256 |
}
|
257 |
+
$new_row = apply_filters( 'woe_summary_column_keys',
|
258 |
+
$new_row );// legacy hook
|
259 |
+
$new_row = apply_filters( "woe_summary_products_prepare_product",
|
260 |
+
$new_row, $key, $product, $product_item, $order );
|
261 |
$_SESSION['woe_summary_products'][ $key ] = $new_row;
|
262 |
}
|
263 |
+
|
264 |
//increase totals
|
265 |
if ( isset( $_SESSION['woe_summary_products'][ $key ]['summary_report_total_qty'] ) ) {
|
266 |
$_SESSION['woe_summary_products'][ $key ]['summary_report_total_qty'] += $product_item->get_quantity();
|
267 |
}
|
268 |
|
269 |
if ( isset( $_SESSION['woe_summary_products'][ $key ]['summary_report_total_amount'] ) ) {
|
270 |
+
$total = method_exists( $product_item,
|
271 |
+
'get_total' ) ? $product_item->get_total() : $product_item['line_total'];
|
272 |
$_SESSION['woe_summary_products'][ $key ]['summary_report_total_amount'] += wc_round_tax_total( $total );
|
273 |
}
|
274 |
+
do_action( "woe_summary_products_add_item", $key, $product_item, $order );
|
275 |
}
|
276 |
+
|
277 |
//no lines for order!
|
278 |
return array();
|
279 |
}
|
280 |
+
|
281 |
protected function try_apply_summary_report_fields() {
|
282 |
if ( $this->summary_report ) {
|
283 |
$this->summary_processing = true;
|
284 |
do_action( 'woe_summary_before_output' );
|
285 |
if ( $this->mode == 'preview' ) {
|
286 |
+
if ( empty( $this->rows ) ) // no headers!
|
287 |
+
{
|
288 |
$this->rows = array();
|
289 |
+
}
|
290 |
$this->rows += $_SESSION['woe_summary_products'];
|
291 |
} else {
|
292 |
foreach ( $_SESSION['woe_summary_products'] as $item ) {
|
classes/formats/abstract-class-woe-formatter-sv.php
CHANGED
@@ -14,7 +14,16 @@ abstract class WOE_Formatter_sv extends WOE_Formatter_Plain_Format {
|
|
14 |
var $delimiter;
|
15 |
var $encoding;
|
16 |
|
17 |
-
public function __construct(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
parent::__construct( $mode, $filename, $settings, $format, $labels, $field_formats, $date_format, $offset );
|
19 |
|
20 |
$this->enclosure = $this->convert_literals( isset( $this->settings['enclosure'] ) ? $this->settings['enclosure'] : '' );
|
@@ -30,7 +39,7 @@ abstract class WOE_Formatter_sv extends WOE_Formatter_Plain_Format {
|
|
30 |
}
|
31 |
|
32 |
public function start( $data = '' ) {
|
33 |
-
$data = $this->make_header($data);
|
34 |
$data = apply_filters( "woe_{$this->format}_header_filter", $data );
|
35 |
$this->prepare_array( $data );
|
36 |
parent::start( $data );
|
@@ -86,14 +95,14 @@ abstract class WOE_Formatter_sv extends WOE_Formatter_Plain_Format {
|
|
86 |
|
87 |
public function finish() {
|
88 |
$this->try_apply_summary_report_fields();
|
89 |
-
|
90 |
if ( $this->mode == 'preview' ) {
|
91 |
$this->rows = apply_filters( "woe_{$this->format}_preview_rows", $this->rows );
|
92 |
fwrite( $this->handle, '<table>' );
|
93 |
if ( count( $this->rows ) < 2 ) {
|
94 |
$this->rows[] = array( __( '<td colspan=10><b>No results</b></td>', 'woo-order-export-lite' ) );
|
95 |
}
|
96 |
-
foreach ( $this->rows as $num
|
97 |
if ( $num == 0 AND $this->settings['display_column_names'] ) {
|
98 |
fwrite( $this->handle,
|
99 |
'<tr style="font-weight:bold"><td>' . join( '</td><td>', $rec ) . "</td><tr>\n" );
|
14 |
var $delimiter;
|
15 |
var $encoding;
|
16 |
|
17 |
+
public function __construct(
|
18 |
+
$mode,
|
19 |
+
$filename,
|
20 |
+
$settings,
|
21 |
+
$format,
|
22 |
+
$labels,
|
23 |
+
$field_formats,
|
24 |
+
$date_format,
|
25 |
+
$offset
|
26 |
+
) {
|
27 |
parent::__construct( $mode, $filename, $settings, $format, $labels, $field_formats, $date_format, $offset );
|
28 |
|
29 |
$this->enclosure = $this->convert_literals( isset( $this->settings['enclosure'] ) ? $this->settings['enclosure'] : '' );
|
39 |
}
|
40 |
|
41 |
public function start( $data = '' ) {
|
42 |
+
$data = $this->make_header( $data );
|
43 |
$data = apply_filters( "woe_{$this->format}_header_filter", $data );
|
44 |
$this->prepare_array( $data );
|
45 |
parent::start( $data );
|
95 |
|
96 |
public function finish() {
|
97 |
$this->try_apply_summary_report_fields();
|
98 |
+
|
99 |
if ( $this->mode == 'preview' ) {
|
100 |
$this->rows = apply_filters( "woe_{$this->format}_preview_rows", $this->rows );
|
101 |
fwrite( $this->handle, '<table>' );
|
102 |
if ( count( $this->rows ) < 2 ) {
|
103 |
$this->rows[] = array( __( '<td colspan=10><b>No results</b></td>', 'woo-order-export-lite' ) );
|
104 |
}
|
105 |
+
foreach ( $this->rows as $num => $rec ) {
|
106 |
if ( $num == 0 AND $this->settings['display_column_names'] ) {
|
107 |
fwrite( $this->handle,
|
108 |
'<tr style="font-weight:bold"><td>' . join( '</td><td>', $rec ) . "</td><tr>\n" );
|
classes/formats/abstract-class-woe-formatter.php
CHANGED
@@ -28,7 +28,16 @@ abstract class WOE_Formatter {
|
|
28 |
protected $decimal_separator;
|
29 |
protected $thousands_separator;
|
30 |
|
31 |
-
public function __construct(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
$this->has_output_filter = has_filter( "woe_{$format}_output_filter" );
|
33 |
$this->mode = $mode;
|
34 |
$this->filename = $filename;
|
@@ -125,7 +134,7 @@ abstract class WOE_Formatter {
|
|
125 |
}
|
126 |
}
|
127 |
} else {
|
128 |
-
|
129 |
$rec[ $field ] = $this->format_field( $format_type, $value );
|
130 |
}
|
131 |
}
|
@@ -163,7 +172,7 @@ abstract class WOE_Formatter {
|
|
163 |
}
|
164 |
|
165 |
protected function format_number_field( $field_value ) {
|
166 |
-
$new_value = $field_value
|
167 |
$new_value = apply_filters( 'woe_format_numbers', $new_value, $field_value );
|
168 |
|
169 |
return $new_value;
|
28 |
protected $decimal_separator;
|
29 |
protected $thousands_separator;
|
30 |
|
31 |
+
public function __construct(
|
32 |
+
$mode,
|
33 |
+
$filename,
|
34 |
+
$settings,
|
35 |
+
$format,
|
36 |
+
$labels,
|
37 |
+
$field_formats,
|
38 |
+
$date_format,
|
39 |
+
$offset
|
40 |
+
) {
|
41 |
$this->has_output_filter = has_filter( "woe_{$format}_output_filter" );
|
42 |
$this->mode = $mode;
|
43 |
$this->filename = $filename;
|
134 |
}
|
135 |
}
|
136 |
} else {
|
137 |
+
if ( in_array( $field, $this->field_formats['order'][ $format_type ] ) ) {
|
138 |
$rec[ $field ] = $this->format_field( $format_type, $value );
|
139 |
}
|
140 |
}
|
172 |
}
|
173 |
|
174 |
protected function format_number_field( $field_value ) {
|
175 |
+
$new_value = $field_value; //as is!
|
176 |
$new_value = apply_filters( 'woe_format_numbers', $new_value, $field_value );
|
177 |
|
178 |
return $new_value;
|
classes/formats/class-woe-formatter-json.php
CHANGED
@@ -6,9 +6,18 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
6 |
class WOE_Formatter_Json extends WOE_Formatter {
|
7 |
var $prev_added = false;
|
8 |
|
9 |
-
public function __construct(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
parent::__construct( $mode, $filename, $settings, $format, $labels, $field_formats, $date_format, $offset );
|
11 |
-
$this->prev_added = ($offset > 0);
|
12 |
}
|
13 |
|
14 |
public function start( $data = '' ) {
|
@@ -35,10 +44,10 @@ class WOE_Formatter_Json extends WOE_Formatter {
|
|
35 |
|
36 |
foreach ( $labels->get_labels() as $label_data ) {
|
37 |
$original_key = $label_data['key'];
|
38 |
-
$label
|
39 |
-
$key
|
40 |
|
41 |
-
$field_value = $rec[$key];
|
42 |
if ( is_array( $field_value ) ) {
|
43 |
if ( $original_key == "products" ) {
|
44 |
$child_labels = $this->labels['products'];
|
@@ -48,14 +57,17 @@ class WOE_Formatter_Json extends WOE_Formatter {
|
|
48 |
$rec_out[ $label ] = $field_value;
|
49 |
continue;
|
50 |
}
|
51 |
-
|
|
|
|
|
|
|
52 |
$rec_out[ $label ] = array();
|
53 |
foreach ( $field_value as $child_element ) {
|
54 |
$child = array();
|
55 |
foreach ( $child_labels->get_labels() as $child_label_data ) {
|
56 |
$child_original_key = $child_label_data['key'];
|
57 |
-
$child_label
|
58 |
-
$child_key
|
59 |
if ( isset( $child_element[ $child_key ] ) ) {
|
60 |
$child[ $child_label ] = $child_element[ $child_key ];
|
61 |
}
|
6 |
class WOE_Formatter_Json extends WOE_Formatter {
|
7 |
var $prev_added = false;
|
8 |
|
9 |
+
public function __construct(
|
10 |
+
$mode,
|
11 |
+
$filename,
|
12 |
+
$settings,
|
13 |
+
$format,
|
14 |
+
$labels,
|
15 |
+
$field_formats,
|
16 |
+
$date_format,
|
17 |
+
$offset
|
18 |
+
) {
|
19 |
parent::__construct( $mode, $filename, $settings, $format, $labels, $field_formats, $date_format, $offset );
|
20 |
+
$this->prev_added = ( $offset > 0 );
|
21 |
}
|
22 |
|
23 |
public function start( $data = '' ) {
|
44 |
|
45 |
foreach ( $labels->get_labels() as $label_data ) {
|
46 |
$original_key = $label_data['key'];
|
47 |
+
$label = $label_data['label'];
|
48 |
+
$key = $label_data['parent_key'] ? $label_data['parent_key'] : $original_key;
|
49 |
|
50 |
+
$field_value = $rec[ $key ];
|
51 |
if ( is_array( $field_value ) ) {
|
52 |
if ( $original_key == "products" ) {
|
53 |
$child_labels = $this->labels['products'];
|
57 |
$rec_out[ $label ] = $field_value;
|
58 |
continue;
|
59 |
}
|
60 |
+
|
61 |
+
if( empty($child_labels ) ) // can't export!
|
62 |
+
continue;
|
63 |
+
|
64 |
$rec_out[ $label ] = array();
|
65 |
foreach ( $field_value as $child_element ) {
|
66 |
$child = array();
|
67 |
foreach ( $child_labels->get_labels() as $child_label_data ) {
|
68 |
$child_original_key = $child_label_data['key'];
|
69 |
+
$child_label = $child_label_data['label'];
|
70 |
+
$child_key = $child_label_data['parent_key'] ? $child_label_data['parent_key'] : $child_original_key;
|
71 |
if ( isset( $child_element[ $child_key ] ) ) {
|
72 |
$child[ $child_label ] = $child_element[ $child_key ];
|
73 |
}
|
classes/formats/class-woe-formatter-tsv.php
CHANGED
@@ -6,7 +6,16 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
6 |
include_once 'abstract-class-woe-formatter-sv.php';
|
7 |
|
8 |
class WOE_Formatter_Tsv extends WOE_Formatter_sv {
|
9 |
-
public function __construct(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
parent::__construct( $mode, $filename, $settings, $format, $labels, $field_formats, $date_format, $offset );
|
11 |
|
12 |
$this->enclosure = '';
|
6 |
include_once 'abstract-class-woe-formatter-sv.php';
|
7 |
|
8 |
class WOE_Formatter_Tsv extends WOE_Formatter_sv {
|
9 |
+
public function __construct(
|
10 |
+
$mode,
|
11 |
+
$filename,
|
12 |
+
$settings,
|
13 |
+
$format,
|
14 |
+
$labels,
|
15 |
+
$field_formats,
|
16 |
+
$date_format,
|
17 |
+
$offset
|
18 |
+
) {
|
19 |
parent::__construct( $mode, $filename, $settings, $format, $labels, $field_formats, $date_format, $offset );
|
20 |
|
21 |
$this->enclosure = '';
|
classes/formats/class-woe-formatter-xls.php
CHANGED
@@ -14,22 +14,32 @@ class WOE_Formatter_Xls extends WOE_Formatter_Plain_Format {
|
|
14 |
private $string_format_fields;
|
15 |
private $date_format_fields;
|
16 |
|
17 |
-
public function __construct(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
parent::__construct( $mode, $filename, $settings, $format, $labels, $field_formats, $date_format, $offset );
|
19 |
|
20 |
$this->string_format_force = apply_filters( "woe_{$format}_string_format_force", false );
|
21 |
-
|
22 |
$field_formats = $this->field_formats['order']; // overwrite! probably modified by parent
|
23 |
|
24 |
$this->string_format_fields = isset( $field_formats['string'] ) ? $field_formats['string'] : array();
|
25 |
-
$this->string_format_fields = apply_filters( "woe_{$format}_string_format_fields",
|
|
|
26 |
|
27 |
$this->date_format_fields = isset( $field_formats['date'] ) ? $field_formats['date'] : array();
|
28 |
$this->date_format_fields = apply_filters( "woe_{$format}_date_format_fields", $this->date_format_fields );
|
29 |
-
|
30 |
$this->money_format_fields = isset( $field_formats['money'] ) ? $field_formats['money'] : array();
|
31 |
$this->money_format_fields = apply_filters( "woe_{$format}_date_money_fields", $this->money_format_fields );
|
32 |
-
|
33 |
if ( $mode != 'preview' ) {
|
34 |
//more memory for XLS?
|
35 |
ini_set( 'memory_limit', '512M' );
|
@@ -56,12 +66,14 @@ class WOE_Formatter_Xls extends WOE_Formatter_Plain_Format {
|
|
56 |
}
|
57 |
|
58 |
// Excel uses another format!
|
59 |
-
$this->date_format
|
60 |
-
|
|
|
|
|
61 |
// Excel will format!
|
62 |
-
$this->auto_format_dates
|
63 |
-
$this->format_number_fields_original
|
64 |
-
$this->format_number_fields
|
65 |
} else {
|
66 |
$this->auto_format_dates = true;
|
67 |
}
|
@@ -114,7 +126,7 @@ class WOE_Formatter_Xls extends WOE_Formatter_Plain_Format {
|
|
114 |
|
115 |
public function output( $rec ) {
|
116 |
$rows = parent::output( $rec );
|
117 |
-
|
118 |
foreach ( $rows as $row ) {
|
119 |
if ( $this->has_output_filter ) {
|
120 |
$row = apply_filters( "woe_xls_output_filter", $row, $this );
|
@@ -130,23 +142,32 @@ class WOE_Formatter_Xls extends WOE_Formatter_Plain_Format {
|
|
130 |
$this->last_row ++;
|
131 |
$pos = 0;
|
132 |
foreach ( $row as $field => $text ) {
|
133 |
-
if ( $this->string_format_force OR $this->field_format_is( $field,
|
134 |
-
|
135 |
-
$this->objPHPExcel->getActiveSheet()->
|
136 |
-
|
137 |
-
$this->objPHPExcel->getActiveSheet()->
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
} elseif ( $this->field_format_is( $field, $this->date_format_fields ) ) {// DATE!
|
140 |
-
$this->objPHPExcel->getActiveSheet()->getStyleByColumnAndRow( $pos
|
|
|
141 |
if ( $text ) {
|
142 |
if ( empty( $this->settings['global_job_settings']['time_format'] ) ) { // must remove time!
|
143 |
$text = date( "Y-m-d", strtotime( $text ) );
|
144 |
}
|
145 |
$text = PHPExcel_Shared_Date::PHPToExcel( new DateTime( $text ) );
|
146 |
-
$this->objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow( $pos, $this->last_row,
|
|
|
147 |
}
|
148 |
} else {
|
149 |
-
$this->objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow( $pos, $this->last_row,
|
|
|
150 |
}
|
151 |
do_action( "woe_xls_format_cell", $this, $field, $text, $row, $pos );
|
152 |
$pos ++;
|
@@ -245,12 +266,14 @@ class WOE_Formatter_Xls extends WOE_Formatter_Plain_Format {
|
|
245 |
return strtr( $date_format, $replacements );
|
246 |
}
|
247 |
|
248 |
-
protected function field_format_is($field, $format_fields) {
|
249 |
-
if ( in_array($field, $format_fields) )
|
250 |
return true;
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
|
|
|
|
255 |
}
|
256 |
}
|
14 |
private $string_format_fields;
|
15 |
private $date_format_fields;
|
16 |
|
17 |
+
public function __construct(
|
18 |
+
$mode,
|
19 |
+
$filename,
|
20 |
+
$settings,
|
21 |
+
$format,
|
22 |
+
$labels,
|
23 |
+
$field_formats,
|
24 |
+
$date_format,
|
25 |
+
$offset
|
26 |
+
) {
|
27 |
parent::__construct( $mode, $filename, $settings, $format, $labels, $field_formats, $date_format, $offset );
|
28 |
|
29 |
$this->string_format_force = apply_filters( "woe_{$format}_string_format_force", false );
|
30 |
+
|
31 |
$field_formats = $this->field_formats['order']; // overwrite! probably modified by parent
|
32 |
|
33 |
$this->string_format_fields = isset( $field_formats['string'] ) ? $field_formats['string'] : array();
|
34 |
+
$this->string_format_fields = apply_filters( "woe_{$format}_string_format_fields",
|
35 |
+
$this->string_format_fields );
|
36 |
|
37 |
$this->date_format_fields = isset( $field_formats['date'] ) ? $field_formats['date'] : array();
|
38 |
$this->date_format_fields = apply_filters( "woe_{$format}_date_format_fields", $this->date_format_fields );
|
39 |
+
|
40 |
$this->money_format_fields = isset( $field_formats['money'] ) ? $field_formats['money'] : array();
|
41 |
$this->money_format_fields = apply_filters( "woe_{$format}_date_money_fields", $this->money_format_fields );
|
42 |
+
|
43 |
if ( $mode != 'preview' ) {
|
44 |
//more memory for XLS?
|
45 |
ini_set( 'memory_limit', '512M' );
|
66 |
}
|
67 |
|
68 |
// Excel uses another format!
|
69 |
+
$this->date_format = apply_filters( 'woe_xls_date_format',
|
70 |
+
$this->convert_php_date_format( $date_format ) );
|
71 |
+
$this->money_format = apply_filters( 'woe_xls_money_format',
|
72 |
+
PHPExcel_Style_NumberFormat::FORMAT_NUMBER_00 );
|
73 |
// Excel will format!
|
74 |
+
$this->auto_format_dates = false;
|
75 |
+
$this->format_number_fields_original = $this->format_number_fields;
|
76 |
+
$this->format_number_fields = false;
|
77 |
} else {
|
78 |
$this->auto_format_dates = true;
|
79 |
}
|
126 |
|
127 |
public function output( $rec ) {
|
128 |
$rows = parent::output( $rec );
|
129 |
+
|
130 |
foreach ( $rows as $row ) {
|
131 |
if ( $this->has_output_filter ) {
|
132 |
$row = apply_filters( "woe_xls_output_filter", $row, $this );
|
142 |
$this->last_row ++;
|
143 |
$pos = 0;
|
144 |
foreach ( $row as $field => $text ) {
|
145 |
+
if ( $this->string_format_force OR $this->field_format_is( $field,
|
146 |
+
$this->string_format_fields ) ) {// STRING
|
147 |
+
$this->objPHPExcel->getActiveSheet()->getStyleByColumnAndRow( $pos,
|
148 |
+
$this->last_row )->getNumberFormat()->setFormatCode( PHPExcel_Style_NumberFormat::FORMAT_TEXT );
|
149 |
+
$this->objPHPExcel->getActiveSheet()->setCellValueExplicitByColumnAndRow( $pos, $this->last_row,
|
150 |
+
$text );
|
151 |
+
} elseif ( $this->format_number_fields_original AND $this->field_format_is( $field,
|
152 |
+
$this->money_format_fields ) ) { // MONEY
|
153 |
+
$this->objPHPExcel->getActiveSheet()->getStyleByColumnAndRow( $pos,
|
154 |
+
$this->last_row )->getNumberFormat()->setFormatCode( $this->money_format );
|
155 |
+
$this->objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow( $pos, $this->last_row,
|
156 |
+
$text );
|
157 |
} elseif ( $this->field_format_is( $field, $this->date_format_fields ) ) {// DATE!
|
158 |
+
$this->objPHPExcel->getActiveSheet()->getStyleByColumnAndRow( $pos,
|
159 |
+
$this->last_row )->getNumberFormat()->setFormatCode( $this->date_format );
|
160 |
if ( $text ) {
|
161 |
if ( empty( $this->settings['global_job_settings']['time_format'] ) ) { // must remove time!
|
162 |
$text = date( "Y-m-d", strtotime( $text ) );
|
163 |
}
|
164 |
$text = PHPExcel_Shared_Date::PHPToExcel( new DateTime( $text ) );
|
165 |
+
$this->objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow( $pos, $this->last_row,
|
166 |
+
$text );
|
167 |
}
|
168 |
} else {
|
169 |
+
$this->objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow( $pos, $this->last_row,
|
170 |
+
$text );
|
171 |
}
|
172 |
do_action( "woe_xls_format_cell", $this, $field, $text, $row, $pos );
|
173 |
$pos ++;
|
266 |
return strtr( $date_format, $replacements );
|
267 |
}
|
268 |
|
269 |
+
protected function field_format_is( $field, $format_fields ) {
|
270 |
+
if ( in_array( $field, $format_fields ) ) {
|
271 |
return true;
|
272 |
+
}
|
273 |
+
if ( preg_match( '#^(.+?)_\d+$#', $field, $duplicated_field ) ) {
|
274 |
+
return in_array( $duplicated_field[1], $format_fields );
|
275 |
+
}
|
276 |
+
|
277 |
+
return false;
|
278 |
}
|
279 |
}
|
classes/formats/class-woe-formatter-xml.php
CHANGED
@@ -5,7 +5,16 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
5 |
|
6 |
class WOE_Formatter_Xml extends WOE_Formatter {
|
7 |
|
8 |
-
public function __construct(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
parent::__construct( $mode, $filename, $settings, $format, $labels, $field_formats, $date_format, $offset );
|
10 |
|
11 |
$this->linebreak = apply_filters( "woe_xml_output_linebreak", "\n" );
|
@@ -40,13 +49,12 @@ class WOE_Formatter_Xml extends WOE_Formatter {
|
|
40 |
|
41 |
foreach ( $labels->get_labels() as $label_data ) {
|
42 |
$original_key = $label_data['key'];
|
43 |
-
$label
|
44 |
-
$key
|
45 |
|
46 |
-
$field_value = apply_filters( 'woe_xml_prepare_field_' . $original_key, $rec[$key], $rec );
|
47 |
|
48 |
if ( is_array( $field_value ) ) {
|
49 |
-
$childs = $xml->addChild( $label ); // add Products
|
50 |
if ( $original_key == "products" ) {
|
51 |
$child_tag = $this->settings['product_tag'];
|
52 |
$child_labels = $this->labels['products'];
|
@@ -59,8 +67,15 @@ class WOE_Formatter_Xml extends WOE_Formatter {
|
|
59 |
$child_labels = array();
|
60 |
}
|
61 |
// modify children using filters
|
62 |
-
$child_tag = apply_filters( 'woe_xml_child_tagname_' . $original_key, $child_tag, $field_value,
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
foreach ( $field_value as $child_key => $child_element ) {
|
66 |
$tag_name = $child_tag ? $child_tag : $child_key;
|
@@ -71,8 +86,8 @@ class WOE_Formatter_Xml extends WOE_Formatter {
|
|
71 |
if ( is_array( $child_element ) ) {
|
72 |
foreach ( $child_labels->get_labels() as $child_label_data ) {
|
73 |
$child_original_key = $child_label_data['key'];
|
74 |
-
$child_label
|
75 |
-
$child_key
|
76 |
if ( isset( $child_element[ $child_key ] ) ) {
|
77 |
$child->addChild( $child_label, $this->prepare_string( $child_element[ $child_key ] ) );
|
78 |
}
|
5 |
|
6 |
class WOE_Formatter_Xml extends WOE_Formatter {
|
7 |
|
8 |
+
public function __construct(
|
9 |
+
$mode,
|
10 |
+
$filename,
|
11 |
+
$settings,
|
12 |
+
$format,
|
13 |
+
$labels,
|
14 |
+
$field_formats,
|
15 |
+
$date_format,
|
16 |
+
$offset
|
17 |
+
) {
|
18 |
parent::__construct( $mode, $filename, $settings, $format, $labels, $field_formats, $date_format, $offset );
|
19 |
|
20 |
$this->linebreak = apply_filters( "woe_xml_output_linebreak", "\n" );
|
49 |
|
50 |
foreach ( $labels->get_labels() as $label_data ) {
|
51 |
$original_key = $label_data['key'];
|
52 |
+
$label = $label_data['label'];
|
53 |
+
$key = $label_data['parent_key'] ? $label_data['parent_key'] : $original_key;
|
54 |
|
55 |
+
$field_value = apply_filters( 'woe_xml_prepare_field_' . $original_key, $rec[ $key ], $rec );
|
56 |
|
57 |
if ( is_array( $field_value ) ) {
|
|
|
58 |
if ( $original_key == "products" ) {
|
59 |
$child_tag = $this->settings['product_tag'];
|
60 |
$child_labels = $this->labels['products'];
|
67 |
$child_labels = array();
|
68 |
}
|
69 |
// modify children using filters
|
70 |
+
$child_tag = apply_filters( 'woe_xml_child_tagname_' . $original_key, $child_tag, $field_value,
|
71 |
+
$rec );
|
72 |
+
$child_labels = apply_filters( 'woe_xml_child_labels_' . $original_key, $child_labels, $field_value,
|
73 |
+
$rec );
|
74 |
+
|
75 |
+
if( empty($child_labels ) ) // can't export!
|
76 |
+
continue;
|
77 |
+
|
78 |
+
$childs = $xml->addChild( $label ); // add Products
|
79 |
|
80 |
foreach ( $field_value as $child_key => $child_element ) {
|
81 |
$tag_name = $child_tag ? $child_tag : $child_key;
|
86 |
if ( is_array( $child_element ) ) {
|
87 |
foreach ( $child_labels->get_labels() as $child_label_data ) {
|
88 |
$child_original_key = $child_label_data['key'];
|
89 |
+
$child_label = $child_label_data['label'];
|
90 |
+
$child_key = $child_label_data['parent_key'] ? $child_label_data['parent_key'] : $child_original_key;
|
91 |
if ( isset( $child_element[ $child_key ] ) ) {
|
92 |
$child->addChild( $child_label, $this->prepare_string( $child_element[ $child_key ] ) );
|
93 |
}
|
classes/formats/trait-woe-plain-format.php
CHANGED
@@ -4,12 +4,12 @@
|
|
4 |
trait WOE_Order_Export_Plain_Format {
|
5 |
|
6 |
|
7 |
-
private function multiplicate_fields(&$row, $type, $field_values, $fields) {
|
8 |
$multiplied_fields = array();
|
9 |
|
10 |
-
$group_by_item = $this->duplicate_settings[$type]['group_by'];
|
11 |
// $multiply_count = $repeat ? $this->duplicate_settings[$type]['max_cols'] : 1;
|
12 |
-
$multiply_count = $this->duplicate_settings[$type]['max_cols'];
|
13 |
|
14 |
if ( $group_by_item == 'product' ) {
|
15 |
$index = 1;
|
@@ -23,7 +23,8 @@ trait WOE_Order_Export_Plain_Format {
|
|
23 |
$key = $label_data['parent_key'] ? $label_data['parent_key'] : $original_key;
|
24 |
|
25 |
if ( isset( $item[ str_replace( 'plain_' . $type . '_', '', $key ) ] ) ) {
|
26 |
-
$multiplied_fields[ $original_key . '_' . $index ] = $item[ str_replace( 'plain_' . $type . '_',
|
|
|
27 |
$key ) ];
|
28 |
} else {
|
29 |
$multiplied_fields[ $original_key . '_' . $index ] = '';
|
@@ -51,8 +52,9 @@ trait WOE_Order_Export_Plain_Format {
|
|
51 |
break;
|
52 |
}
|
53 |
|
54 |
-
if ( isset( $item[ str_replace( 'plain_' . $type .'_', '', $key ) ] ) ) {
|
55 |
-
$multiplied_fields[ $original_key . '_' . $index ] = $item[ str_replace( 'plain_' . $type . '_',
|
|
|
56 |
$key ) ];
|
57 |
} else {
|
58 |
$multiplied_fields[ $original_key . '_' . $index ] = '';
|
@@ -77,37 +79,38 @@ trait WOE_Order_Export_Plain_Format {
|
|
77 |
*/
|
78 |
protected function add_nested_rows_as_columns( $row, $repeat_as_cols ) {
|
79 |
$new_row = array();
|
80 |
-
|
81 |
-
foreach( $repeat_as_cols as $type) {
|
82 |
-
$nested_rows[$type] = self::get_array_from_array( $row, $type );
|
83 |
-
$field_group[$type] = array();
|
84 |
-
}
|
85 |
-
$mask
|
86 |
$current_field_segment = "";
|
87 |
-
|
88 |
foreach ( $this->labels['order']->get_labels() as $label_data ) {
|
89 |
$original_key = $label_data['key'];
|
90 |
$key = $label_data['parent_key'] ? $label_data['parent_key'] : $original_key;
|
91 |
-
if (
|
92 |
continue;
|
93 |
}
|
94 |
-
|
95 |
$previous_field_segment = $current_field_segment;
|
96 |
-
|
97 |
-
if ( preg_match($mask
|
98 |
-
$type
|
99 |
-
$field_group[$type][] = $original_key;
|
100 |
-
$current_field_segment
|
101 |
} else {
|
102 |
-
$current_field_segment
|
103 |
}
|
104 |
|
105 |
-
if ( $previous_field_segment!= $current_field_segment AND in_array($previous_field_segment
|
|
|
106 |
$type = $previous_field_segment;
|
107 |
-
if( $field_group[$type] ) {
|
108 |
-
$this->multiplicate_fields( $new_row, $type, $nested_rows[$type], $field_group[$type] );
|
109 |
-
$field_group[$type] = array();
|
110 |
-
}
|
111 |
}
|
112 |
|
113 |
//just copy as is
|
@@ -117,12 +120,13 @@ trait WOE_Order_Export_Plain_Format {
|
|
117 |
}
|
118 |
|
119 |
//final clean up
|
120 |
-
foreach($repeat_as_cols as $type) {
|
121 |
-
if ( ! empty($field_group[$type]) ) {
|
122 |
-
$this->multiplicate_fields( $new_row, $type, $nested_rows[$type], $field_group[$type] );
|
123 |
}
|
124 |
-
unset($new_row[$type]);
|
125 |
-
}
|
|
|
126 |
return $new_row;
|
127 |
}
|
128 |
|
@@ -141,8 +145,10 @@ trait WOE_Order_Export_Plain_Format {
|
|
141 |
foreach ( self::get_array_from_array( $row, 'products' ) as $products_fields_item ) {
|
142 |
$result_tmp = array();
|
143 |
foreach ( $products_fields_item as $field_name => $products_field_value ) {
|
144 |
-
if ( isset($this->labels['products']->$field_name ) ) // label must be assigned!
|
|
|
145 |
$result_tmp[ 'plain_products_' . $field_name ] = $products_field_value;
|
|
|
146 |
}
|
147 |
|
148 |
$p_combinations[] = $result_tmp;
|
@@ -154,8 +160,10 @@ trait WOE_Order_Export_Plain_Format {
|
|
154 |
foreach ( self::get_array_from_array( $row, 'coupons' ) as $coupons_fields_item ) {
|
155 |
$result_tmp = array();
|
156 |
foreach ( $coupons_fields_item as $field_name => $coupons_field_value ) {
|
157 |
-
if ( isset($this->labels['coupons']->$field_name ) ) // label must be assigned!
|
|
|
158 |
$result_tmp[ 'plain_coupons_' . $field_name ] = $coupons_field_value;
|
|
|
159 |
}
|
160 |
|
161 |
$c_combinations[] = $result_tmp;
|
@@ -195,20 +203,21 @@ trait WOE_Order_Export_Plain_Format {
|
|
195 |
}
|
196 |
|
197 |
if ( empty( $combinations ) ) {
|
198 |
-
return array($row);
|
199 |
}
|
200 |
|
201 |
$new_rows = array();
|
202 |
foreach ( $combinations as $num_index => $combination ) {
|
203 |
-
if($item_rows_start_from_new_line) {
|
204 |
$new_row = ( $num_index == 0 ) ? $row : array();
|
205 |
} elseif ( $num_index == 0 OR $populate_non_products ) {
|
206 |
$new_row = $row; // 1st -- as is
|
207 |
} else { //must adjust positions for 2nd , 3rd,... rows
|
208 |
-
foreach($row as $k
|
209 |
-
$new_row[$k] = "";
|
|
|
210 |
}
|
211 |
-
|
212 |
foreach ( $combination as $field_name => $field_value ) {
|
213 |
$new_row[ $field_name ] = $field_value;
|
214 |
foreach ( $this->labels['order']->get_childs( $field_name ) as $label_order_data_1 ) {
|
@@ -220,23 +229,24 @@ trait WOE_Order_Export_Plain_Format {
|
|
220 |
|
221 |
return $new_rows;
|
222 |
}
|
223 |
-
|
224 |
private function merge_nested_rows_to_one_record( $row, $type ) {
|
225 |
-
$line_delimiter = $this->convert_literals( $this->duplicate_settings[$type]['line_delimiter'] );
|
226 |
|
227 |
$merged_values = array();
|
228 |
-
foreach($row[$type] as $line) {
|
229 |
-
foreach($line as $k
|
230 |
$plain_key = "plain_{$type}_{$k}";
|
231 |
-
if( !isset($merged_values[$plain_key]) ) {
|
232 |
-
$merged_values[$plain_key] = true;
|
233 |
-
$row[$plain_key]
|
234 |
-
}
|
235 |
-
|
236 |
-
|
237 |
}
|
238 |
}
|
239 |
-
unset($row[$type]);
|
|
|
240 |
return $row;
|
241 |
}
|
242 |
}
|
4 |
trait WOE_Order_Export_Plain_Format {
|
5 |
|
6 |
|
7 |
+
private function multiplicate_fields( &$row, $type, $field_values, $fields ) {
|
8 |
$multiplied_fields = array();
|
9 |
|
10 |
+
$group_by_item = $this->duplicate_settings[ $type ]['group_by'];
|
11 |
// $multiply_count = $repeat ? $this->duplicate_settings[$type]['max_cols'] : 1;
|
12 |
+
$multiply_count = $this->duplicate_settings[ $type ]['max_cols'];
|
13 |
|
14 |
if ( $group_by_item == 'product' ) {
|
15 |
$index = 1;
|
23 |
$key = $label_data['parent_key'] ? $label_data['parent_key'] : $original_key;
|
24 |
|
25 |
if ( isset( $item[ str_replace( 'plain_' . $type . '_', '', $key ) ] ) ) {
|
26 |
+
$multiplied_fields[ $original_key . '_' . $index ] = $item[ str_replace( 'plain_' . $type . '_',
|
27 |
+
'',
|
28 |
$key ) ];
|
29 |
} else {
|
30 |
$multiplied_fields[ $original_key . '_' . $index ] = '';
|
52 |
break;
|
53 |
}
|
54 |
|
55 |
+
if ( isset( $item[ str_replace( 'plain_' . $type . '_', '', $key ) ] ) ) {
|
56 |
+
$multiplied_fields[ $original_key . '_' . $index ] = $item[ str_replace( 'plain_' . $type . '_',
|
57 |
+
'',
|
58 |
$key ) ];
|
59 |
} else {
|
60 |
$multiplied_fields[ $original_key . '_' . $index ] = '';
|
79 |
*/
|
80 |
protected function add_nested_rows_as_columns( $row, $repeat_as_cols ) {
|
81 |
$new_row = array();
|
82 |
+
|
83 |
+
foreach ( $repeat_as_cols as $type ) {
|
84 |
+
$nested_rows[ $type ] = self::get_array_from_array( $row, $type );
|
85 |
+
$field_group[ $type ] = array();
|
86 |
+
}
|
87 |
+
$mask = "#^plain_(products|coupons)_#";
|
88 |
$current_field_segment = "";
|
89 |
+
|
90 |
foreach ( $this->labels['order']->get_labels() as $label_data ) {
|
91 |
$original_key = $label_data['key'];
|
92 |
$key = $label_data['parent_key'] ? $label_data['parent_key'] : $original_key;
|
93 |
+
if ( ! isset( $row[ $key ] ) ) {
|
94 |
continue;
|
95 |
}
|
96 |
+
|
97 |
$previous_field_segment = $current_field_segment;
|
98 |
+
|
99 |
+
if ( preg_match( $mask, $key, $m ) AND in_array( $m[1], $repeat_as_cols ) ) {
|
100 |
+
$type = $m[1];
|
101 |
+
$field_group[ $type ][] = $original_key;
|
102 |
+
$current_field_segment = $type;
|
103 |
} else {
|
104 |
+
$current_field_segment = 'order';
|
105 |
}
|
106 |
|
107 |
+
if ( $previous_field_segment != $current_field_segment AND in_array( $previous_field_segment,
|
108 |
+
$repeat_as_cols ) ) {
|
109 |
$type = $previous_field_segment;
|
110 |
+
if ( $field_group[ $type ] ) {
|
111 |
+
$this->multiplicate_fields( $new_row, $type, $nested_rows[ $type ], $field_group[ $type ] );
|
112 |
+
$field_group[ $type ] = array();
|
113 |
+
}
|
114 |
}
|
115 |
|
116 |
//just copy as is
|
120 |
}
|
121 |
|
122 |
//final clean up
|
123 |
+
foreach ( $repeat_as_cols as $type ) {
|
124 |
+
if ( ! empty( $field_group[ $type ] ) ) {
|
125 |
+
$this->multiplicate_fields( $new_row, $type, $nested_rows[ $type ], $field_group[ $type ] );
|
126 |
}
|
127 |
+
unset( $new_row[ $type ] );
|
128 |
+
}
|
129 |
+
|
130 |
return $new_row;
|
131 |
}
|
132 |
|
145 |
foreach ( self::get_array_from_array( $row, 'products' ) as $products_fields_item ) {
|
146 |
$result_tmp = array();
|
147 |
foreach ( $products_fields_item as $field_name => $products_field_value ) {
|
148 |
+
if ( isset( $this->labels['products']->$field_name ) ) // label must be assigned!
|
149 |
+
{
|
150 |
$result_tmp[ 'plain_products_' . $field_name ] = $products_field_value;
|
151 |
+
}
|
152 |
}
|
153 |
|
154 |
$p_combinations[] = $result_tmp;
|
160 |
foreach ( self::get_array_from_array( $row, 'coupons' ) as $coupons_fields_item ) {
|
161 |
$result_tmp = array();
|
162 |
foreach ( $coupons_fields_item as $field_name => $coupons_field_value ) {
|
163 |
+
if ( isset( $this->labels['coupons']->$field_name ) ) // label must be assigned!
|
164 |
+
{
|
165 |
$result_tmp[ 'plain_coupons_' . $field_name ] = $coupons_field_value;
|
166 |
+
}
|
167 |
}
|
168 |
|
169 |
$c_combinations[] = $result_tmp;
|
203 |
}
|
204 |
|
205 |
if ( empty( $combinations ) ) {
|
206 |
+
return array( $row );
|
207 |
}
|
208 |
|
209 |
$new_rows = array();
|
210 |
foreach ( $combinations as $num_index => $combination ) {
|
211 |
+
if ( $item_rows_start_from_new_line ) {
|
212 |
$new_row = ( $num_index == 0 ) ? $row : array();
|
213 |
} elseif ( $num_index == 0 OR $populate_non_products ) {
|
214 |
$new_row = $row; // 1st -- as is
|
215 |
} else { //must adjust positions for 2nd , 3rd,... rows
|
216 |
+
foreach ( $row as $k => $v ) {
|
217 |
+
$new_row[ $k ] = "";
|
218 |
+
}
|
219 |
}
|
220 |
+
|
221 |
foreach ( $combination as $field_name => $field_value ) {
|
222 |
$new_row[ $field_name ] = $field_value;
|
223 |
foreach ( $this->labels['order']->get_childs( $field_name ) as $label_order_data_1 ) {
|
229 |
|
230 |
return $new_rows;
|
231 |
}
|
232 |
+
|
233 |
private function merge_nested_rows_to_one_record( $row, $type ) {
|
234 |
+
$line_delimiter = $this->convert_literals( $this->duplicate_settings[ $type ]['line_delimiter'] );
|
235 |
|
236 |
$merged_values = array();
|
237 |
+
foreach ( $row[ $type ] as $line ) {
|
238 |
+
foreach ( $line as $k => $v ) {
|
239 |
$plain_key = "plain_{$type}_{$k}";
|
240 |
+
if ( ! isset( $merged_values[ $plain_key ] ) ) {
|
241 |
+
$merged_values[ $plain_key ] = true;
|
242 |
+
$row[ $plain_key ] = $v;
|
243 |
+
} else {
|
244 |
+
$row[ $plain_key ] .= $line_delimiter . $v;
|
245 |
+
}
|
246 |
}
|
247 |
}
|
248 |
+
unset( $row[ $type ] );
|
249 |
+
|
250 |
return $row;
|
251 |
}
|
252 |
}
|
i18n/languages/woo-order-export-lite.pot
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
#, fuzzy
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
-
"Project-Id-Version:
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
-
"POT-Creation-Date: 2018-
|
7 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
8 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
9 |
"Language-Team: \n"
|
@@ -14,1482 +14,1482 @@ msgstr ""
|
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
"X-Generator: Loco https://localise.biz/"
|
16 |
|
17 |
-
#:
|
18 |
-
|
19 |
-
"
|
20 |
-
"
|
21 |
-
msgstr ""
|
|
|
22 |
|
23 |
-
#:
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
26 |
|
27 |
-
#: view/settings-form.php:31 view/settings-form.php:
|
28 |
-
#: view/settings-form.php:
|
29 |
msgid "-"
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: view/settings-form.php:
|
33 |
-
msgid "
|
34 |
msgstr ""
|
35 |
|
36 |
-
#:
|
37 |
-
|
38 |
-
msgid "Order Date"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#:
|
42 |
-
#: classes/
|
43 |
-
msgid "
|
44 |
msgstr ""
|
45 |
|
46 |
-
#:
|
47 |
-
|
48 |
-
msgid "Paid Date"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: view/settings-form.php:
|
52 |
-
|
53 |
-
msgid "Completed Date"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#:
|
57 |
-
msgid "
|
58 |
msgstr ""
|
59 |
|
60 |
-
#:
|
61 |
-
|
|
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: view/settings-form.php:
|
65 |
-
msgid "
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: view/settings-form.php:
|
69 |
-
msgid "
|
70 |
msgstr ""
|
71 |
|
72 |
-
#:
|
73 |
-
msgid "
|
74 |
msgstr ""
|
75 |
|
76 |
-
#:
|
77 |
-
msgid "
|
78 |
msgstr ""
|
79 |
|
80 |
-
#:
|
81 |
-
msgid "
|
82 |
msgstr ""
|
83 |
|
84 |
-
#:
|
85 |
-
msgid "
|
86 |
msgstr ""
|
87 |
|
88 |
-
#:
|
89 |
-
msgid "
|
90 |
msgstr ""
|
91 |
|
92 |
-
#:
|
93 |
-
msgid "
|
94 |
msgstr ""
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
msgid "Output column titles as first line"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#:
|
102 |
-
msgid "
|
|
|
|
|
103 |
msgstr ""
|
104 |
|
105 |
-
|
106 |
-
msgid "
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: view/
|
110 |
-
msgid "
|
111 |
msgstr ""
|
112 |
|
113 |
-
#:
|
114 |
-
msgid "
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: view/settings-form.php:
|
118 |
-
msgid "
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: view/settings-form.php:
|
122 |
-
msgid "
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: view/
|
126 |
-
msgid "
|
127 |
msgstr ""
|
128 |
|
129 |
-
#:
|
130 |
-
msgid "
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: view/settings-form.php:
|
134 |
-
msgid "
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: view/settings-form.php:
|
138 |
-
msgid "
|
139 |
msgstr ""
|
140 |
|
141 |
-
#:
|
142 |
-
msgid "
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: view/settings-form.php:
|
146 |
-
msgid "
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: view/
|
150 |
-
|
|
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: view/
|
154 |
-
|
|
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: view/
|
158 |
-
|
|
|
159 |
msgstr ""
|
160 |
|
161 |
-
#:
|
162 |
-
msgid "
|
163 |
msgstr ""
|
164 |
|
165 |
-
#:
|
166 |
-
msgid "
|
167 |
msgstr ""
|
168 |
|
169 |
-
#:
|
170 |
-
msgid "
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: view/settings-form.php:
|
174 |
-
|
|
|
|
|
175 |
msgstr ""
|
176 |
|
177 |
-
#:
|
178 |
-
msgid "
|
179 |
msgstr ""
|
180 |
|
181 |
-
#:
|
182 |
-
msgid "
|
183 |
msgstr ""
|
184 |
|
185 |
-
#:
|
186 |
-
msgid "
|
187 |
msgstr ""
|
188 |
|
189 |
-
#:
|
190 |
-
|
191 |
-
msgid "Date"
|
192 |
msgstr ""
|
193 |
|
194 |
-
#: view/settings-form.php:
|
195 |
-
msgid "
|
196 |
msgstr ""
|
197 |
|
198 |
-
#: view/settings-form.php:
|
199 |
-
msgid "
|
200 |
msgstr ""
|
201 |
|
202 |
-
#:
|
203 |
-
|
204 |
-
msgid "Order ID"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#:
|
208 |
-
msgid "
|
209 |
msgstr ""
|
210 |
|
211 |
-
#:
|
212 |
-
msgid "
|
213 |
msgstr ""
|
214 |
|
215 |
-
#:
|
216 |
-
|
217 |
-
msgid "Sort orders by %s in %s order"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: view/settings-form.php:
|
221 |
-
msgid "
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: view/settings-form.php:
|
225 |
-
msgid "
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: view/
|
229 |
-
msgid "
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: view/settings-form.php:
|
233 |
-
|
|
|
|
|
234 |
msgstr ""
|
235 |
|
236 |
-
#:
|
237 |
-
msgid "
|
238 |
msgstr ""
|
239 |
|
240 |
-
#:
|
241 |
-
msgid "
|
242 |
msgstr ""
|
243 |
|
244 |
-
#:
|
245 |
-
msgid "
|
246 |
msgstr ""
|
247 |
|
248 |
-
#:
|
249 |
-
msgid "
|
250 |
msgstr ""
|
251 |
|
252 |
-
#: view/settings-form.php:
|
253 |
-
|
|
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: view/settings-form.php:
|
257 |
-
|
|
|
|
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: view/settings-form.php:
|
261 |
-
msgid ""
|
262 |
-
"Please check permissions for your role. You must have capability "
|
263 |
-
"“edit_themes” to use this box."
|
264 |
msgstr ""
|
265 |
|
266 |
-
#:
|
267 |
-
msgid "
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: view/
|
271 |
-
msgid "
|
|
|
|
|
272 |
msgstr ""
|
273 |
|
274 |
-
#:
|
275 |
-
msgid "
|
276 |
msgstr ""
|
277 |
|
278 |
-
#:
|
279 |
-
msgid "
|
280 |
msgstr ""
|
281 |
|
282 |
-
#:
|
283 |
-
msgid "
|
284 |
msgstr ""
|
285 |
|
286 |
-
#:
|
287 |
-
msgid "
|
288 |
msgstr ""
|
289 |
|
290 |
-
#:
|
291 |
-
msgid "
|
292 |
msgstr ""
|
293 |
|
294 |
-
#:
|
295 |
-
msgid "
|
296 |
msgstr ""
|
297 |
|
298 |
-
#:
|
299 |
-
msgid ""
|
300 |
-
"The filters won't work correctly.<br>Another plugin(or theme) has loaded "
|
301 |
-
"outdated Select2.js"
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: view/settings-form.php:
|
305 |
-
msgid "
|
306 |
msgstr ""
|
307 |
|
308 |
-
#:
|
309 |
-
msgid "
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: view/settings-form.php:
|
313 |
-
|
|
|
|
|
|
|
314 |
msgstr ""
|
315 |
|
316 |
-
#:
|
317 |
-
msgid "
|
318 |
msgstr ""
|
319 |
|
320 |
-
#:
|
321 |
-
msgid "
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: view/settings-form.php:
|
325 |
-
msgid "
|
326 |
msgstr ""
|
327 |
|
328 |
-
#:
|
329 |
-
msgid "
|
330 |
msgstr ""
|
331 |
|
332 |
-
#: view/settings-form.php:
|
333 |
-
msgid "
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: view/settings-form.php:
|
337 |
-
msgid "
|
338 |
msgstr ""
|
339 |
|
340 |
-
#: view/settings-form.php:
|
341 |
-
msgid "
|
342 |
msgstr ""
|
343 |
|
344 |
-
#:
|
345 |
-
msgid "
|
346 |
msgstr ""
|
347 |
|
348 |
-
#:
|
349 |
-
msgid "
|
350 |
msgstr ""
|
351 |
|
352 |
-
#:
|
353 |
-
msgid "
|
354 |
msgstr ""
|
355 |
|
356 |
-
#:
|
357 |
-
msgid "
|
358 |
msgstr ""
|
359 |
|
360 |
-
#:
|
361 |
-
msgid "
|
362 |
msgstr ""
|
363 |
|
364 |
-
#:
|
365 |
-
|
366 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:901
|
367 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:1103
|
368 |
-
msgid "Coupons"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#:
|
372 |
-
msgid "
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: view/settings-form.php:
|
376 |
-
|
|
|
377 |
msgstr ""
|
378 |
|
379 |
-
#:
|
380 |
-
msgid "
|
381 |
msgstr ""
|
382 |
|
383 |
-
#:
|
384 |
-
msgid "
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: view/settings-form.php:
|
388 |
-
msgid "
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: view/settings-form.php:
|
392 |
-
msgid "
|
393 |
msgstr ""
|
394 |
|
395 |
-
#:
|
396 |
-
msgid "
|
397 |
msgstr ""
|
398 |
|
399 |
-
#:
|
400 |
-
msgid "
|
401 |
msgstr ""
|
402 |
|
403 |
-
#:
|
404 |
-
msgid "
|
405 |
msgstr ""
|
406 |
|
407 |
-
#:
|
408 |
-
msgid "
|
409 |
msgstr ""
|
410 |
|
411 |
-
#:
|
412 |
-
msgid "
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: view/settings-form.php:
|
416 |
-
msgid "
|
417 |
msgstr ""
|
418 |
|
419 |
-
#: view/
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
msgid "Add field"
|
425 |
-
msgstr ""
|
426 |
-
|
427 |
-
#: view/settings-form.php:834
|
428 |
-
msgid "Add static field"
|
429 |
msgstr ""
|
430 |
|
431 |
-
#:
|
432 |
-
msgid "
|
433 |
msgstr ""
|
434 |
|
435 |
-
#:
|
436 |
-
|
437 |
-
msgid "or type meta key here"
|
438 |
msgstr ""
|
439 |
|
440 |
-
#: view/settings-form.php:
|
441 |
-
|
442 |
-
msgid "Hide unused fields"
|
443 |
msgstr ""
|
444 |
|
445 |
-
#:
|
446 |
-
|
447 |
-
#: view/settings-form.php:936 view/settings-form.php:947
|
448 |
-
msgid "Column name"
|
449 |
msgstr ""
|
450 |
|
451 |
-
#:
|
452 |
-
#:
|
453 |
-
|
454 |
-
msgid "Confirm"
|
455 |
msgstr ""
|
456 |
|
457 |
-
#:
|
458 |
-
|
459 |
-
#: view/settings-form.php:942 view/settings-form.php:962
|
460 |
-
msgid "Cancel"
|
461 |
msgstr ""
|
462 |
|
463 |
-
#:
|
464 |
-
|
465 |
-
msgid "Value"
|
466 |
msgstr ""
|
467 |
|
468 |
-
#:
|
469 |
-
msgid "
|
470 |
msgstr ""
|
471 |
|
472 |
-
#: view/settings-form.php:
|
473 |
-
msgid "
|
474 |
msgstr ""
|
475 |
|
476 |
-
#: view/settings-form.php:
|
477 |
-
msgid "
|
478 |
msgstr ""
|
479 |
|
480 |
-
#: view/settings-form.php:
|
481 |
-
msgid "
|
482 |
msgstr ""
|
483 |
|
484 |
-
#: view/settings-form.php:
|
485 |
-
msgid "
|
486 |
msgstr ""
|
487 |
|
488 |
-
#: view/settings-form.php:
|
489 |
-
|
490 |
-
msgid ""
|
491 |
-
"If you see this message after page load, user interface won't work correctly!"
|
492 |
-
"<br>There is a JS error (<a target=blank href='%s'>read here</a> how to view "
|
493 |
-
"it). Probably, it's a conflict with another plugin or active theme."
|
494 |
msgstr ""
|
495 |
|
496 |
-
#: view/settings-form.php:
|
497 |
-
msgid "
|
498 |
msgstr ""
|
499 |
|
500 |
-
#: view/settings-form.php:
|
501 |
-
msgid "
|
502 |
msgstr ""
|
503 |
|
504 |
-
#:
|
505 |
-
|
|
|
506 |
msgstr ""
|
507 |
|
508 |
-
#: view/settings-form.php:
|
509 |
-
msgid "
|
510 |
msgstr ""
|
511 |
|
512 |
-
#:
|
513 |
-
|
|
|
514 |
msgstr ""
|
515 |
|
516 |
-
#: view/settings-form.php:
|
517 |
-
msgid "Export
|
518 |
msgstr ""
|
519 |
|
520 |
-
#: view/
|
521 |
-
msgid "
|
522 |
msgstr ""
|
523 |
|
524 |
-
#:
|
525 |
-
|
|
|
|
|
|
|
526 |
msgstr ""
|
527 |
|
528 |
-
|
529 |
-
|
530 |
-
msgid "Export total: %s orders"
|
531 |
msgstr ""
|
532 |
|
533 |
-
#: view/settings-form.php:
|
534 |
-
msgid "
|
535 |
msgstr ""
|
536 |
|
537 |
-
#: view/settings-form.php:
|
538 |
-
msgid "
|
539 |
msgstr ""
|
540 |
|
541 |
-
#: view/
|
542 |
-
msgid "
|
543 |
msgstr ""
|
544 |
|
545 |
-
#:
|
546 |
-
msgid "
|
547 |
msgstr ""
|
548 |
|
549 |
-
#: view/
|
550 |
-
|
|
|
551 |
msgstr ""
|
552 |
|
553 |
-
#: view/
|
554 |
-
msgid "Export
|
555 |
msgstr ""
|
556 |
|
557 |
-
#:
|
558 |
-
msgid "
|
559 |
msgstr ""
|
560 |
|
561 |
-
#: view/
|
562 |
-
msgid "
|
563 |
msgstr ""
|
564 |
|
565 |
-
#: view/
|
566 |
-
msgid "
|
567 |
msgstr ""
|
568 |
|
569 |
-
#: view/
|
570 |
-
msgid "
|
571 |
msgstr ""
|
572 |
|
573 |
-
#:
|
574 |
-
msgid "
|
575 |
msgstr ""
|
576 |
|
577 |
-
#:
|
578 |
-
msgid "
|
579 |
msgstr ""
|
580 |
|
581 |
-
#:
|
582 |
-
msgid ""
|
583 |
-
"Advanced Order Export For WooCommerce is available <a href=\"admin.php?"
|
584 |
-
"page=wc-order-export\">on this page</a>."
|
585 |
msgstr ""
|
586 |
|
587 |
-
#:
|
588 |
-
msgid "
|
589 |
msgstr ""
|
590 |
|
591 |
-
#:
|
592 |
-
msgid "
|
593 |
msgstr ""
|
594 |
|
595 |
-
#:
|
596 |
-
msgid "
|
597 |
msgstr ""
|
598 |
|
599 |
-
#:
|
600 |
-
|
601 |
-
#: classes/class-wc-order-export-admin.php:228
|
602 |
-
#: classes/class-wc-order-export-admin.php:229
|
603 |
-
msgid "Export Orders"
|
604 |
msgstr ""
|
605 |
|
606 |
-
#:
|
607 |
-
msgid "
|
608 |
msgstr ""
|
609 |
|
610 |
-
#:
|
611 |
-
|
612 |
-
msgid "Add %s fields"
|
613 |
msgstr ""
|
614 |
|
615 |
-
#: classes/class-wc-order-export-
|
616 |
-
msgid "
|
617 |
msgstr ""
|
618 |
|
619 |
-
#: classes/class-wc-order-export-
|
620 |
-
msgid "
|
621 |
msgstr ""
|
622 |
|
623 |
-
#:
|
624 |
-
msgid "
|
625 |
msgstr ""
|
626 |
|
627 |
-
#:
|
628 |
-
msgid "
|
629 |
msgstr ""
|
630 |
|
631 |
-
#: classes/class-wc-order-export-
|
632 |
-
msgid "
|
633 |
msgstr ""
|
634 |
|
635 |
-
#: classes/class-wc-order-export-
|
636 |
-
msgid "
|
637 |
msgstr ""
|
638 |
|
639 |
-
#: classes/class-wc-order-export-
|
640 |
-
msgid "
|
641 |
msgstr ""
|
642 |
|
643 |
-
#: classes/class-wc-order-export-
|
644 |
-
msgid "
|
645 |
msgstr ""
|
646 |
|
647 |
-
#: classes/class-wc-order-export-admin.php:
|
648 |
-
msgid "
|
649 |
msgstr ""
|
650 |
|
651 |
#: classes/class-wc-order-export-admin.php:587
|
652 |
msgid "Grouping by product"
|
653 |
msgstr ""
|
654 |
|
655 |
-
#: classes/class-wc-order-export-
|
656 |
-
msgid "
|
657 |
msgstr ""
|
658 |
|
659 |
-
#:
|
660 |
-
msgid "
|
661 |
msgstr ""
|
662 |
|
663 |
-
#:
|
664 |
-
msgid "
|
665 |
msgstr ""
|
666 |
|
667 |
-
#:
|
668 |
-
|
|
|
669 |
msgstr ""
|
670 |
|
671 |
-
|
672 |
-
msgid "
|
673 |
msgstr ""
|
674 |
|
675 |
-
#:
|
676 |
-
|
|
|
|
|
|
|
|
|
677 |
msgstr ""
|
678 |
|
679 |
-
#: classes/class-wc-order-export-
|
680 |
-
msgid "
|
681 |
msgstr ""
|
682 |
|
683 |
-
#:
|
684 |
-
msgid "
|
685 |
msgstr ""
|
686 |
|
687 |
-
#:
|
688 |
-
msgid "
|
689 |
msgstr ""
|
690 |
|
691 |
-
#:
|
692 |
-
msgid "
|
693 |
msgstr ""
|
694 |
|
695 |
-
#: classes/class-wc-order-export-
|
696 |
-
msgid "
|
697 |
msgstr ""
|
698 |
|
699 |
-
#: classes/class-wc-order-export-
|
700 |
-
msgid "
|
701 |
msgstr ""
|
702 |
|
703 |
-
#: classes/class-wc-order-export-
|
704 |
-
msgid "
|
705 |
msgstr ""
|
706 |
|
707 |
-
#: classes/class-wc-order-export-
|
708 |
-
|
709 |
-
#: classes/core/class-wc-order-export-engine.php:743
|
710 |
-
#: classes/core/class-wc-order-export-engine.php:756
|
711 |
-
msgid "Nothing to export. Please, adjust your filters"
|
712 |
msgstr ""
|
713 |
|
714 |
-
#:
|
715 |
-
|
716 |
-
msgid "empty"
|
717 |
msgstr ""
|
718 |
|
719 |
-
#:
|
720 |
-
|
721 |
-
msgid "Status change job #%s for order #%s. Result: %s"
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: classes/class-wc-order-export-
|
725 |
-
|
726 |
-
msgid "Export as %s"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#:
|
730 |
-
msgid "
|
731 |
msgstr ""
|
732 |
|
733 |
-
#:
|
734 |
-
msgid "
|
735 |
msgstr ""
|
736 |
|
737 |
-
#: classes/class-wc-order-export-
|
738 |
-
|
739 |
-
msgid "Export as profile '%s'"
|
740 |
msgstr ""
|
741 |
|
742 |
-
#: classes/class-wc-order-export-
|
743 |
-
|
744 |
-
|
745 |
-
msgid_plural "%s orders marked."
|
746 |
-
msgstr[0] ""
|
747 |
-
msgstr[1] ""
|
748 |
|
749 |
-
#:
|
750 |
-
|
751 |
-
|
752 |
-
msgid_plural "%s orders unmarked."
|
753 |
-
msgstr[0] ""
|
754 |
-
msgstr[1] ""
|
755 |
|
756 |
-
#: view/tab/tools.php:
|
757 |
-
msgid "
|
758 |
msgstr ""
|
759 |
|
760 |
-
#:
|
761 |
-
msgid ""
|
762 |
-
"Copy these settings and use it to migrate plugin to another WordPress "
|
763 |
-
"install."
|
764 |
msgstr ""
|
765 |
|
766 |
-
#:
|
767 |
-
msgid "
|
768 |
msgstr ""
|
769 |
|
770 |
-
#:
|
771 |
-
msgid "
|
772 |
msgstr ""
|
773 |
|
774 |
-
#: view/
|
775 |
-
msgid "
|
776 |
msgstr ""
|
777 |
|
778 |
-
#:
|
779 |
-
msgid ""
|
780 |
-
"Paste text into this field to import settings into the current WordPress "
|
781 |
-
"install."
|
782 |
msgstr ""
|
783 |
|
784 |
-
#: view/tab/
|
|
|
785 |
msgid ""
|
786 |
-
"
|
787 |
-
"WooCommerce\" !"
|
788 |
msgstr ""
|
789 |
|
790 |
-
#:
|
791 |
-
msgid "
|
792 |
msgstr ""
|
793 |
|
794 |
-
#:
|
795 |
-
msgid "
|
796 |
msgstr ""
|
797 |
|
798 |
-
#: view/
|
799 |
-
|
800 |
-
msgid "Pro version"
|
801 |
msgstr ""
|
802 |
|
803 |
-
#: view/
|
804 |
-
|
805 |
-
msgid "Buy %s to get access to Status change jobs"
|
806 |
msgstr ""
|
807 |
|
808 |
-
#: view/
|
809 |
-
msgid "
|
810 |
msgstr ""
|
811 |
|
812 |
-
#: view/
|
813 |
-
msgid "
|
814 |
msgstr ""
|
815 |
|
816 |
-
#: view/
|
817 |
-
|
|
|
818 |
msgstr ""
|
819 |
|
820 |
-
#:
|
821 |
-
msgid "
|
822 |
msgstr ""
|
823 |
|
824 |
-
#:
|
825 |
-
msgid "
|
826 |
msgstr ""
|
827 |
|
828 |
#: view/tab/help.php:16
|
829 |
-
|
830 |
-
msgid ""
|
831 |
-
"Don't forget to attach your %s or some screenshots. It will significantly "
|
832 |
-
"reduce reply time :)"
|
833 |
msgstr ""
|
834 |
|
835 |
-
#:
|
836 |
-
|
837 |
-
msgid ""
|
838 |
-
"Look at %s for popular plugins or check %s to study how to extend the plugin."
|
839 |
msgstr ""
|
840 |
|
841 |
-
#:
|
842 |
-
|
843 |
-
|
|
|
|
|
844 |
msgstr ""
|
845 |
|
846 |
-
#:
|
847 |
-
|
848 |
-
msgid "Buy %s to get access to Scheduled jobs"
|
849 |
msgstr ""
|
850 |
|
851 |
-
#: classes/
|
852 |
-
|
853 |
-
msgid "<td colspan=10><b>No results</b></td>"
|
854 |
msgstr ""
|
855 |
|
856 |
-
#:
|
857 |
-
msgid "
|
858 |
msgstr ""
|
859 |
|
860 |
-
#:
|
861 |
-
#:
|
862 |
-
msgid "
|
863 |
msgstr ""
|
864 |
|
865 |
-
#:
|
866 |
-
|
|
|
867 |
msgstr ""
|
868 |
|
869 |
-
#:
|
870 |
-
|
|
|
871 |
msgstr ""
|
872 |
|
873 |
-
#:
|
874 |
-
msgid "
|
875 |
msgstr ""
|
876 |
|
877 |
-
#: classes/
|
878 |
-
msgid "
|
879 |
msgstr ""
|
880 |
|
881 |
-
#: classes/
|
882 |
-
msgid "
|
883 |
msgstr ""
|
884 |
|
885 |
-
#: classes/
|
886 |
-
msgid "
|
887 |
msgstr ""
|
888 |
|
889 |
-
#: classes/
|
890 |
-
msgid "
|
891 |
msgstr ""
|
892 |
|
893 |
-
#: classes/
|
894 |
-
|
895 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:1102
|
896 |
-
msgid "Products"
|
897 |
msgstr ""
|
898 |
|
899 |
-
#: classes/
|
900 |
-
msgid "
|
901 |
msgstr ""
|
902 |
|
903 |
-
#: classes/
|
904 |
-
msgid "
|
905 |
msgstr ""
|
906 |
|
907 |
-
#: classes/
|
908 |
-
msgid "
|
909 |
msgstr ""
|
910 |
|
911 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
912 |
-
msgid "
|
913 |
msgstr ""
|
914 |
|
915 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
916 |
-
msgid "
|
917 |
msgstr ""
|
918 |
|
919 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
920 |
-
msgid "
|
921 |
msgstr ""
|
922 |
|
923 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
924 |
-
msgid "
|
925 |
msgstr ""
|
926 |
|
927 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
928 |
-
msgid "
|
929 |
msgstr ""
|
930 |
|
931 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
932 |
-
msgid "
|
933 |
msgstr ""
|
934 |
|
935 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
936 |
-
msgid "
|
937 |
msgstr ""
|
938 |
|
939 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
940 |
-
msgid "
|
941 |
msgstr ""
|
942 |
|
943 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
944 |
-
msgid "
|
945 |
msgstr ""
|
946 |
|
947 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
948 |
-
msgid "
|
949 |
msgstr ""
|
950 |
|
951 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
952 |
-
msgid "
|
953 |
msgstr ""
|
954 |
|
955 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
956 |
-
msgid "
|
957 |
msgstr ""
|
958 |
|
959 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
960 |
-
msgid "
|
961 |
msgstr ""
|
962 |
|
963 |
-
#:
|
964 |
-
msgid "Order
|
965 |
msgstr ""
|
966 |
|
967 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
968 |
-
msgid "Order
|
969 |
msgstr ""
|
970 |
|
971 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
972 |
-
msgid "Order
|
973 |
msgstr ""
|
974 |
|
975 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
976 |
-
msgid "Order
|
977 |
msgstr ""
|
978 |
|
979 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
980 |
-
msgid "Order
|
981 |
msgstr ""
|
982 |
|
983 |
-
#:
|
984 |
-
msgid "Order
|
985 |
msgstr ""
|
986 |
|
987 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
988 |
-
msgid "Order
|
989 |
msgstr ""
|
990 |
|
991 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
992 |
-
msgid "Order
|
993 |
msgstr ""
|
994 |
|
995 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
996 |
-
msgid "Order
|
997 |
msgstr ""
|
998 |
|
999 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1000 |
-
msgid "Order
|
1001 |
msgstr ""
|
1002 |
|
1003 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1004 |
-
msgid "
|
1005 |
msgstr ""
|
1006 |
|
1007 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1008 |
-
msgid "
|
1009 |
msgstr ""
|
1010 |
|
1011 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1012 |
-
msgid "
|
1013 |
msgstr ""
|
1014 |
|
1015 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1016 |
-
msgid "
|
1017 |
msgstr ""
|
1018 |
|
1019 |
-
#: classes/
|
1020 |
-
|
|
|
1021 |
msgstr ""
|
1022 |
|
1023 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1024 |
-
msgid "
|
1025 |
msgstr ""
|
1026 |
|
1027 |
-
#:
|
1028 |
-
|
|
|
1029 |
msgstr ""
|
1030 |
|
1031 |
-
#:
|
1032 |
-
msgid "
|
1033 |
msgstr ""
|
1034 |
|
1035 |
-
#:
|
1036 |
-
|
|
|
1037 |
msgstr ""
|
1038 |
|
1039 |
-
#:
|
1040 |
-
msgid "
|
|
|
|
|
1041 |
msgstr ""
|
1042 |
|
1043 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1044 |
-
msgid "
|
1045 |
msgstr ""
|
1046 |
|
1047 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1048 |
-
msgid "
|
1049 |
msgstr ""
|
1050 |
|
1051 |
-
#:
|
1052 |
-
msgid "
|
1053 |
msgstr ""
|
1054 |
|
1055 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1056 |
-
msgid "
|
1057 |
msgstr ""
|
1058 |
|
1059 |
-
#:
|
1060 |
-
msgid "
|
|
|
|
|
1061 |
msgstr ""
|
1062 |
|
1063 |
-
#:
|
1064 |
-
msgid "
|
|
|
|
|
1065 |
msgstr ""
|
1066 |
|
1067 |
-
#:
|
1068 |
-
msgid "
|
1069 |
msgstr ""
|
1070 |
|
1071 |
-
#: classes/
|
1072 |
-
msgid "
|
1073 |
msgstr ""
|
1074 |
|
1075 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1076 |
-
msgid "
|
1077 |
msgstr ""
|
1078 |
|
1079 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1080 |
-
msgid "
|
1081 |
msgstr ""
|
1082 |
|
1083 |
-
#:
|
1084 |
-
msgid "
|
1085 |
msgstr ""
|
1086 |
|
1087 |
-
#:
|
1088 |
-
msgid "
|
1089 |
msgstr ""
|
1090 |
|
1091 |
-
#:
|
1092 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1093 |
msgstr ""
|
1094 |
|
1095 |
-
#:
|
1096 |
-
msgid "
|
1097 |
msgstr ""
|
1098 |
|
1099 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1100 |
-
msgid "
|
1101 |
msgstr ""
|
1102 |
|
1103 |
-
#:
|
1104 |
-
msgid "
|
1105 |
msgstr ""
|
1106 |
|
1107 |
-
#:
|
1108 |
-
msgid "
|
1109 |
msgstr ""
|
1110 |
|
1111 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1112 |
-
msgid "
|
1113 |
msgstr ""
|
1114 |
|
1115 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1116 |
-
msgid "
|
1117 |
msgstr ""
|
1118 |
|
1119 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1120 |
-
msgid "
|
1121 |
msgstr ""
|
1122 |
|
1123 |
-
#:
|
1124 |
-
msgid "
|
1125 |
msgstr ""
|
1126 |
|
1127 |
-
#:
|
1128 |
-
msgid "
|
1129 |
msgstr ""
|
1130 |
|
1131 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1132 |
-
msgid "
|
1133 |
msgstr ""
|
1134 |
|
1135 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1136 |
-
msgid "
|
1137 |
msgstr ""
|
1138 |
|
1139 |
-
#: classes/
|
1140 |
-
|
|
|
|
|
1141 |
msgstr ""
|
1142 |
|
1143 |
-
#: classes/
|
1144 |
-
msgid "
|
1145 |
msgstr ""
|
1146 |
|
1147 |
-
#:
|
1148 |
-
msgid "
|
1149 |
msgstr ""
|
1150 |
|
1151 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1152 |
-
msgid "
|
1153 |
msgstr ""
|
1154 |
|
1155 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1156 |
-
msgid "
|
1157 |
msgstr ""
|
1158 |
|
1159 |
-
#:
|
1160 |
-
msgid "
|
1161 |
msgstr ""
|
1162 |
|
1163 |
-
#: classes/
|
1164 |
-
msgid "
|
1165 |
msgstr ""
|
1166 |
|
1167 |
-
#:
|
1168 |
-
msgid "
|
1169 |
msgstr ""
|
1170 |
|
1171 |
-
#:
|
1172 |
-
msgid "
|
1173 |
msgstr ""
|
1174 |
|
1175 |
-
#: classes/
|
1176 |
-
msgid "
|
1177 |
msgstr ""
|
1178 |
|
1179 |
-
#: classes/
|
1180 |
-
msgid "
|
1181 |
msgstr ""
|
1182 |
|
1183 |
-
#:
|
1184 |
-
msgid "
|
1185 |
msgstr ""
|
1186 |
|
1187 |
-
#:
|
1188 |
-
msgid "
|
1189 |
msgstr ""
|
1190 |
|
1191 |
-
#:
|
1192 |
-
msgid "
|
1193 |
msgstr ""
|
1194 |
|
1195 |
-
#:
|
1196 |
-
msgid "
|
1197 |
msgstr ""
|
1198 |
|
1199 |
-
#: classes/
|
1200 |
-
msgid "
|
1201 |
msgstr ""
|
1202 |
|
1203 |
-
#:
|
1204 |
-
msgid "
|
1205 |
msgstr ""
|
1206 |
|
1207 |
-
#: classes/
|
1208 |
-
msgid "
|
1209 |
msgstr ""
|
1210 |
|
1211 |
-
#:
|
1212 |
-
msgid "
|
1213 |
msgstr ""
|
1214 |
|
1215 |
-
#: classes/
|
1216 |
-
msgid "
|
1217 |
msgstr ""
|
1218 |
|
1219 |
-
#: classes/
|
1220 |
-
msgid "
|
1221 |
msgstr ""
|
1222 |
|
1223 |
-
#:
|
1224 |
-
msgid "
|
1225 |
msgstr ""
|
1226 |
|
1227 |
-
#:
|
1228 |
-
msgid "
|
1229 |
msgstr ""
|
1230 |
|
1231 |
-
#:
|
1232 |
-
msgid "
|
1233 |
msgstr ""
|
1234 |
|
1235 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1236 |
-
msgid "
|
1237 |
msgstr ""
|
1238 |
|
1239 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1240 |
-
msgid "
|
1241 |
msgstr ""
|
1242 |
|
1243 |
-
#:
|
1244 |
-
msgid "
|
1245 |
msgstr ""
|
1246 |
|
1247 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1248 |
-
msgid "
|
1249 |
msgstr ""
|
1250 |
|
1251 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1252 |
-
msgid "
|
1253 |
msgstr ""
|
1254 |
|
1255 |
-
#:
|
1256 |
-
msgid "
|
1257 |
msgstr ""
|
1258 |
|
1259 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1260 |
-
msgid "
|
1261 |
msgstr ""
|
1262 |
|
1263 |
-
#:
|
1264 |
-
msgid "
|
1265 |
msgstr ""
|
1266 |
|
1267 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1268 |
-
msgid "
|
1269 |
msgstr ""
|
1270 |
|
1271 |
-
#:
|
1272 |
-
|
|
|
1273 |
msgstr ""
|
1274 |
|
1275 |
-
#: classes/
|
1276 |
-
msgid "
|
1277 |
msgstr ""
|
1278 |
|
1279 |
-
#:
|
1280 |
-
msgid "
|
1281 |
msgstr ""
|
1282 |
|
1283 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1284 |
-
msgid "
|
1285 |
msgstr ""
|
1286 |
|
1287 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1288 |
-
msgid "Shipping
|
1289 |
msgstr ""
|
1290 |
|
1291 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1292 |
-
msgid "
|
1293 |
msgstr ""
|
1294 |
|
1295 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1296 |
-
msgid "
|
1297 |
msgstr ""
|
1298 |
|
1299 |
-
#: classes/
|
1300 |
-
|
|
|
1301 |
msgstr ""
|
1302 |
|
1303 |
-
#:
|
1304 |
-
msgid "
|
1305 |
msgstr ""
|
1306 |
|
1307 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1308 |
-
msgid "
|
1309 |
msgstr ""
|
1310 |
|
1311 |
-
#:
|
1312 |
-
msgid "
|
1313 |
msgstr ""
|
1314 |
|
1315 |
-
#:
|
1316 |
-
msgid "
|
1317 |
msgstr ""
|
1318 |
|
1319 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1320 |
-
msgid "
|
1321 |
msgstr ""
|
1322 |
|
1323 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1324 |
-
msgid "
|
1325 |
msgstr ""
|
1326 |
|
1327 |
-
#: classes/
|
1328 |
-
msgid "
|
1329 |
msgstr ""
|
1330 |
|
1331 |
-
#: classes/
|
1332 |
-
msgid "
|
1333 |
msgstr ""
|
1334 |
|
1335 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1336 |
-
msgid "
|
1337 |
msgstr ""
|
1338 |
|
1339 |
-
#:
|
1340 |
-
msgid "
|
1341 |
msgstr ""
|
1342 |
|
1343 |
-
#: classes/core/class-wc-order-export-
|
1344 |
-
|
|
|
1345 |
msgstr ""
|
1346 |
|
1347 |
-
#:
|
1348 |
-
msgid "
|
|
|
|
|
1349 |
msgstr ""
|
1350 |
|
1351 |
-
#:
|
1352 |
-
msgid "
|
1353 |
msgstr ""
|
1354 |
|
1355 |
-
#:
|
1356 |
-
msgid "
|
1357 |
msgstr ""
|
1358 |
|
1359 |
-
#:
|
1360 |
-
msgid "
|
|
|
|
|
1361 |
msgstr ""
|
1362 |
|
1363 |
-
#: classes/
|
1364 |
-
msgid "
|
1365 |
msgstr ""
|
1366 |
|
1367 |
-
#:
|
1368 |
-
msgid "
|
1369 |
msgstr ""
|
1370 |
|
1371 |
-
#: classes/
|
1372 |
-
msgid "
|
1373 |
msgstr ""
|
1374 |
|
1375 |
-
#:
|
1376 |
-
msgid "
|
1377 |
msgstr ""
|
1378 |
|
1379 |
-
#:
|
1380 |
-
msgid "
|
1381 |
msgstr ""
|
1382 |
|
1383 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1384 |
-
msgid "
|
1385 |
msgstr ""
|
1386 |
|
1387 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1388 |
-
msgid "
|
1389 |
msgstr ""
|
1390 |
|
1391 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1392 |
msgid "Total weight"
|
1393 |
msgstr ""
|
1394 |
|
1395 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1396 |
-
msgid "
|
1397 |
-
msgstr ""
|
1398 |
-
|
1399 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:1072
|
1400 |
-
msgid "Exported items"
|
1401 |
msgstr ""
|
1402 |
|
1403 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1404 |
-
msgid "
|
1405 |
msgstr ""
|
1406 |
|
1407 |
-
#:
|
1408 |
-
msgid "
|
1409 |
msgstr ""
|
1410 |
|
1411 |
-
#: classes/
|
1412 |
-
msgid "
|
1413 |
msgstr ""
|
1414 |
|
1415 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1416 |
-
msgid "
|
1417 |
msgstr ""
|
1418 |
|
1419 |
-
#: classes/
|
1420 |
-
msgid "
|
1421 |
msgstr ""
|
1422 |
|
1423 |
-
#:
|
1424 |
-
msgid "
|
1425 |
msgstr ""
|
1426 |
|
1427 |
-
#:
|
1428 |
-
msgid "
|
1429 |
msgstr ""
|
1430 |
|
1431 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1432 |
-
msgid "
|
1433 |
msgstr ""
|
1434 |
|
1435 |
-
#:
|
1436 |
-
msgid "
|
1437 |
msgstr ""
|
1438 |
|
1439 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1440 |
-
msgid "
|
1441 |
msgstr ""
|
1442 |
|
1443 |
-
#:
|
1444 |
-
msgid "
|
1445 |
msgstr ""
|
1446 |
|
1447 |
-
#:
|
1448 |
-
|
|
|
1449 |
msgstr ""
|
1450 |
|
1451 |
-
#:
|
1452 |
-
msgid "
|
1453 |
msgstr ""
|
1454 |
|
1455 |
-
#: classes/core/class-wc-order-export-
|
1456 |
-
|
1457 |
-
msgid "No destination selected"
|
1458 |
msgstr ""
|
1459 |
|
1460 |
-
#:
|
1461 |
-
msgid "
|
1462 |
msgstr ""
|
1463 |
|
1464 |
-
#: classes/
|
1465 |
-
msgid "
|
1466 |
msgstr ""
|
1467 |
|
1468 |
-
#: classes/core/class-wc-order-export-
|
1469 |
-
msgid "
|
1470 |
msgstr ""
|
1471 |
|
1472 |
-
#: classes/core/class-wc-order-export-
|
1473 |
-
|
1474 |
-
msgid "The code you are trying to save produced a fatal error on line %d:"
|
1475 |
msgstr ""
|
1476 |
|
1477 |
-
#: classes/core/class-wc-order-export-engine.php:
|
1478 |
-
msgid "
|
1479 |
msgstr ""
|
1480 |
|
1481 |
-
|
1482 |
-
msgid "
|
1483 |
msgstr ""
|
1484 |
|
1485 |
-
|
1486 |
-
msgid "
|
1487 |
msgstr ""
|
1488 |
|
1489 |
-
|
1490 |
-
msgid "
|
1491 |
msgstr ""
|
1492 |
|
1493 |
-
|
1494 |
-
msgid "
|
1495 |
msgstr ""
|
1 |
#, fuzzy
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
+
"Project-Id-Version: Advanced Order Export For WooCommerce\n"
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
+
"POT-Creation-Date: 2018-11-13 06:12+0000\n"
|
7 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
8 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
9 |
"Language-Team: \n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
"X-Generator: Loco https://localise.biz/"
|
16 |
|
17 |
+
#: classes/class-wc-order-export-admin.php:910
|
18 |
+
#, php-format
|
19 |
+
msgid "%s order marked."
|
20 |
+
msgid_plural "%s orders marked."
|
21 |
+
msgstr[0] ""
|
22 |
+
msgstr[1] ""
|
23 |
|
24 |
+
#: classes/class-wc-order-export-admin.php:919
|
25 |
+
#, php-format
|
26 |
+
msgid "%s order unmarked."
|
27 |
+
msgid_plural "%s orders unmarked."
|
28 |
+
msgstr[0] ""
|
29 |
+
msgstr[1] ""
|
30 |
|
31 |
+
#: view/settings-form.php:31 view/settings-form.php:316
|
32 |
+
#: view/settings-form.php:342
|
33 |
msgid "-"
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: view/settings-form.php:396
|
37 |
+
msgid "- don't modify -"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: classes/class-wc-order-export-admin.php:585
|
41 |
+
msgid "1st row only"
|
|
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: classes/formats/abstract-class-woe-formatter-sv.php:103
|
45 |
+
#: classes/formats/class-woe-formatter-xls.php:186
|
46 |
+
msgid "<td colspan=10><b>No results</b></td>"
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: classes/core/class-wc-order-export-data-extractor.php:1996
|
50 |
+
msgid "[Rest of the World]"
|
|
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: view/settings-form.php:1044
|
54 |
+
msgid "Actions"
|
|
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: classes/class-wc-order-export-admin.php:580
|
58 |
+
msgid "Add"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: classes/class-wc-order-export-admin.php:573
|
62 |
+
#, php-format
|
63 |
+
msgid "Add %s fields"
|
64 |
msgstr ""
|
65 |
|
66 |
+
#: view/settings-form.php:1047
|
67 |
+
msgid "Add field"
|
68 |
msgstr ""
|
69 |
|
70 |
+
#: view/settings-form.php:1050
|
71 |
+
msgid "Add static field"
|
72 |
msgstr ""
|
73 |
|
74 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:775
|
75 |
+
msgid "Address 1 (Billing)"
|
76 |
msgstr ""
|
77 |
|
78 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:860
|
79 |
+
msgid "Address 1 (Shipping)"
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:770
|
83 |
+
msgid "Address 1&2 (Billing)"
|
84 |
msgstr ""
|
85 |
|
86 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:855
|
87 |
+
msgid "Address 1&2 (Shipping)"
|
88 |
msgstr ""
|
89 |
|
90 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:780
|
91 |
+
msgid "Address 2 (Billing)"
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:865
|
95 |
+
msgid "Address 2 (Shipping)"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#. Name of the plugin
|
99 |
+
msgid "Advanced Order Export For WooCommerce"
|
|
|
100 |
msgstr ""
|
101 |
|
102 |
+
#: classes/class-wc-order-export-admin.php:133
|
103 |
+
msgid ""
|
104 |
+
"Advanced Order Export For WooCommerce is available <a href=\"admin.php?"
|
105 |
+
"page=wc-order-export\">on this page</a>."
|
106 |
msgstr ""
|
107 |
|
108 |
+
#. Author of the plugin
|
109 |
+
msgid "AlgolPlus"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: view/tab/tools.php:41
|
113 |
+
msgid "All"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: classes/class-wc-order-export-admin.php:584
|
117 |
+
msgid "all rows"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: view/settings-form.php:817
|
121 |
+
msgid "Any coupon used"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: view/settings-form.php:257
|
125 |
+
msgid "Append XML"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: view/tab/tools.php:105
|
129 |
+
msgid "Are you sure to continue?"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: classes/class-wc-order-export-admin.php:581
|
133 |
+
msgid "as"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: view/settings-form.php:380
|
137 |
+
msgid "Ascending"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: view/settings-form.php:189
|
141 |
+
msgid "Auto column width"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1122
|
145 |
+
msgid "Billing Address"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: view/settings-form.php:840
|
149 |
+
msgid "Billing locations"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: view/tab/profiles.php:7
|
153 |
+
#, php-format
|
154 |
+
msgid "Buy %s to get access to profiles"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: view/tab/schedules.php:7
|
158 |
+
#, php-format
|
159 |
+
msgid "Buy %s to get access to Scheduled jobs"
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: view/tab/order-actions.php:7
|
163 |
+
#, php-format
|
164 |
+
msgid "Buy %s to get access to Status change jobs"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: classes/formats/abstract-class-woe-formatter.php:49
|
168 |
+
msgid "can not open for output"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: classes/admin/class-wc-order-export-ajax.php:246
|
172 |
+
msgid "Can't create temporary file"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: classes/admin/class-wc-order-export-ajax.php:268
|
176 |
+
msgid "Can't find exported file"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: view/settings-form.php:1086 view/settings-form.php:1107
|
180 |
+
#: view/settings-form.php:1150 view/settings-form.php:1172
|
181 |
+
#: view/settings-form.php:1198 view/settings-form.php:1221
|
182 |
+
msgid "Cancel"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1126
|
186 |
+
msgid "Cart"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:959
|
190 |
+
msgid "Cart Discount Amount"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:964
|
194 |
+
msgid "Cart Discount Amount Tax"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:474
|
198 |
+
msgid "Category"
|
|
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: view/settings-form.php:391
|
202 |
+
msgid "Change order status to"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: view/settings-form.php:230 view/settings-form.php:292
|
206 |
+
msgid "Character encoding"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:785
|
210 |
+
msgid "City (Billing)"
|
|
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:870
|
214 |
+
msgid "City (Shipping)"
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:795
|
218 |
+
msgid "City, State, Zip (Billing)"
|
219 |
msgstr ""
|
220 |
|
221 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:880
|
222 |
+
msgid "City, State, Zip (Shipping)"
|
|
|
223 |
msgstr ""
|
224 |
|
225 |
+
#: view/settings-form.php:438
|
226 |
+
msgid "Cleanup phone (export only digits)"
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: view/settings-form.php:1296
|
230 |
+
msgid "Click here to download"
|
231 |
msgstr ""
|
232 |
|
233 |
+
#: view/tab/help.php:8
|
234 |
+
msgid "code snippets"
|
235 |
msgstr ""
|
236 |
|
237 |
+
#: view/settings-form.php:1076 view/settings-form.php:1092
|
238 |
+
#: view/settings-form.php:1142 view/settings-form.php:1156
|
239 |
+
#: view/settings-form.php:1189 view/settings-form.php:1204
|
240 |
+
msgid "Column name"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: classes/class-wc-order-export-admin.php:576
|
244 |
+
msgid "columns"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1120
|
248 |
+
msgid "Common"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:765
|
252 |
+
msgid "Company (Billing)"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:850
|
256 |
+
msgid "Company (Shipping)"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: view/settings-form.php:112
|
260 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:680
|
261 |
+
msgid "Completed Date"
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: view/settings-form.php:1084 view/settings-form.php:1105
|
265 |
+
#: view/settings-form.php:1148 view/settings-form.php:1170
|
266 |
+
#: view/settings-form.php:1196 view/settings-form.php:1218
|
267 |
+
msgid "Confirm"
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: view/settings-form.php:212
|
271 |
+
msgid "Convert line breaks to literals"
|
|
|
|
|
272 |
msgstr ""
|
273 |
|
274 |
+
#: classes/class-wc-order-export-admin.php:542
|
275 |
+
msgid "Copied from \"Export now\""
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: view/tab/tools.php:35
|
279 |
+
msgid ""
|
280 |
+
"Copy these settings and use it to migrate plugin to another WordPress "
|
281 |
+
"install."
|
282 |
msgstr ""
|
283 |
|
284 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:810
|
285 |
+
msgid "Country Code (Billing)"
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:895
|
289 |
+
msgid "Country Code (Shipping)"
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:815
|
293 |
+
msgid "Country Name (Billing)"
|
294 |
msgstr ""
|
295 |
|
296 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:900
|
297 |
+
msgid "Country Name (Shipping)"
|
298 |
msgstr ""
|
299 |
|
300 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:590
|
301 |
+
msgid "Coupon Amount"
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:561
|
305 |
+
msgid "Coupon Code"
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:581
|
309 |
+
msgid "Coupon Description"
|
|
|
|
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: view/settings-form.php:254
|
313 |
+
msgid "Coupon tag"
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:585
|
317 |
+
msgid "Coupon Type"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: view/settings-form.php:820
|
321 |
+
#: classes/admin/class-wc-order-export-manage.php:715
|
322 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:923
|
323 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1125
|
324 |
+
msgid "Coupons"
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: classes/class-wc-order-export-admin.php:595
|
328 |
+
msgid "coupons"
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:954
|
332 |
+
msgid "Coupons Used"
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: view/settings-form.php:195
|
336 |
+
msgid "CSV options"
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:675
|
340 |
+
msgid "Currency"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: view/settings-form.php:320 view/settings-form.php:346
|
344 |
+
msgid "custom"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: view/settings-form.php:507 view/settings-form.php:771
|
348 |
+
msgid "Custom fields"
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: view/settings-form.php:450
|
352 |
+
msgid "Custom PHP code to modify output"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:710
|
356 |
+
msgid "Customer IP address"
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:695
|
360 |
+
msgid "Customer Note"
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:735
|
364 |
+
msgid "Customer Role"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:740
|
368 |
+
msgid "Customer Total Orders"
|
369 |
msgstr ""
|
370 |
|
371 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:730
|
372 |
+
msgid "Customer User Email"
|
373 |
msgstr ""
|
374 |
|
375 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:715
|
376 |
+
msgid "Customer User ID"
|
|
|
|
|
|
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:720
|
380 |
+
msgid "Customer Username"
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: view/settings-form.php:302
|
384 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1138
|
385 |
+
msgid "Date"
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: classes/class-wc-order-export-admin.php:645
|
389 |
+
msgid "Date From is greater than Date To"
|
390 |
msgstr ""
|
391 |
|
392 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:690
|
393 |
+
msgid "Date of first refund"
|
394 |
msgstr ""
|
395 |
|
396 |
+
#: view/settings-form.php:120
|
397 |
+
msgid "Date range"
|
398 |
msgstr ""
|
399 |
|
400 |
+
#: view/settings-form.php:378
|
401 |
+
msgid "Descending"
|
402 |
msgstr ""
|
403 |
|
404 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:524
|
405 |
+
msgid "Description"
|
406 |
msgstr ""
|
407 |
|
408 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:566
|
409 |
+
msgid "Discount Amount"
|
410 |
msgstr ""
|
411 |
|
412 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:576
|
413 |
+
msgid "Discount Amount + Tax"
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:571
|
417 |
+
msgid "Discount Amount Tax"
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: classes/class-wc-order-export-admin.php:143
|
421 |
+
msgid "Docs"
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: view/settings-form.php:481
|
425 |
+
msgid "Don't export child orders"
|
426 |
msgstr ""
|
427 |
|
428 |
+
#: view/tab/help.php:21
|
429 |
+
#, php-format
|
430 |
+
msgid ""
|
431 |
+
"Don't forget to attach your %s or some screenshots. It will significantly "
|
432 |
+
"reduce reply time :)"
|
|
|
|
|
|
|
|
|
|
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: classes/core/class-wc-order-export-engine.php:419
|
436 |
+
msgid "Don't Panic"
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:509
|
440 |
+
msgid "Download URL"
|
|
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: view/settings-form.php:1011
|
444 |
+
msgid "Drag rows to reorder exported fields"
|
|
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:820
|
448 |
+
msgid "Email (Billing)"
|
|
|
|
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: classes/class-wc-order-export-admin.php:649
|
452 |
+
#: classes/core/class-wc-order-export-data-extractor.php:225
|
453 |
+
msgid "empty"
|
|
|
454 |
msgstr ""
|
455 |
|
456 |
+
#: classes/class-wc-order-export-admin.php:639
|
457 |
+
msgid "empty column name"
|
|
|
|
|
458 |
msgstr ""
|
459 |
|
460 |
+
#: classes/class-wc-order-export-admin.php:640
|
461 |
+
msgid "empty meta key"
|
|
|
462 |
msgstr ""
|
463 |
|
464 |
+
#: classes/class-wc-order-export-admin.php:643
|
465 |
+
msgid "empty value"
|
466 |
msgstr ""
|
467 |
|
468 |
+
#: view/settings-form.php:444
|
469 |
+
msgid "Enable debug output"
|
470 |
msgstr ""
|
471 |
|
472 |
+
#: view/settings-form.php:217
|
473 |
+
msgid "Enclosure"
|
474 |
msgstr ""
|
475 |
|
476 |
+
#: view/settings-form.php:271
|
477 |
+
msgid "End tag"
|
478 |
msgstr ""
|
479 |
|
480 |
+
#: view/settings-form.php:1269
|
481 |
+
msgid "Export"
|
482 |
msgstr ""
|
483 |
|
484 |
+
#: view/settings-form.php:1273
|
485 |
+
msgid "Export [w/o progressbar]"
|
|
|
|
|
|
|
|
|
486 |
msgstr ""
|
487 |
|
488 |
+
#: view/settings-form.php:420
|
489 |
+
msgid "Export all order notes"
|
490 |
msgstr ""
|
491 |
|
492 |
+
#: view/settings-form.php:557
|
493 |
+
msgid "Export all products from the order"
|
494 |
msgstr ""
|
495 |
|
496 |
+
#: classes/class-wc-order-export-admin.php:826
|
497 |
+
#, php-format
|
498 |
+
msgid "Export as %s"
|
499 |
msgstr ""
|
500 |
|
501 |
+
#: view/settings-form.php:177
|
502 |
+
msgid "Export as .xls (Binary File Format)"
|
503 |
msgstr ""
|
504 |
|
505 |
+
#: classes/class-wc-order-export-admin.php:839
|
506 |
+
#, php-format
|
507 |
+
msgid "Export as profile '%s'"
|
508 |
msgstr ""
|
509 |
|
510 |
+
#: view/settings-form.php:144
|
511 |
+
msgid "Export filename"
|
512 |
msgstr ""
|
513 |
|
514 |
+
#: view/main.php:11 view/tab/tools.php:45
|
515 |
+
msgid "Export now"
|
516 |
msgstr ""
|
517 |
|
518 |
+
#: classes/class-wc-order-export-admin.php:223
|
519 |
+
#: classes/class-wc-order-export-admin.php:224
|
520 |
+
#: classes/class-wc-order-export-admin.php:228
|
521 |
+
#: classes/class-wc-order-export-admin.php:229
|
522 |
+
msgid "Export Orders"
|
523 |
msgstr ""
|
524 |
|
525 |
+
#. Description of the plugin
|
526 |
+
msgid "Export orders from WooCommerce with ease (Excel/CSV/XML/JSON supported)"
|
|
|
527 |
msgstr ""
|
528 |
|
529 |
+
#: view/settings-form.php:426
|
530 |
+
msgid "Export refund notes as Customer Note"
|
531 |
msgstr ""
|
532 |
|
533 |
+
#: view/settings-form.php:485
|
534 |
+
msgid "Export refunds"
|
535 |
msgstr ""
|
536 |
|
537 |
+
#: view/tab/tools.php:32
|
538 |
+
msgid "Export settings"
|
539 |
msgstr ""
|
540 |
|
541 |
+
#: classes/class-wc-order-export-admin.php:91
|
542 |
+
msgid "Export Status"
|
543 |
msgstr ""
|
544 |
|
545 |
+
#: view/settings-form.php:1281
|
546 |
+
#, php-format
|
547 |
+
msgid "Export total: %s orders"
|
548 |
msgstr ""
|
549 |
|
550 |
+
#: view/settings-form.php:493
|
551 |
+
msgid "Export unmarked orders only"
|
552 |
msgstr ""
|
553 |
|
554 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1094
|
555 |
+
msgid "Exported items"
|
556 |
msgstr ""
|
557 |
|
558 |
+
#: view/settings-form.php:128
|
559 |
+
msgid "Express export"
|
560 |
msgstr ""
|
561 |
|
562 |
+
#: view/settings-form.php:221
|
563 |
+
msgid "Field Delimiter"
|
564 |
msgstr ""
|
565 |
|
566 |
+
#: view/settings-form.php:28
|
567 |
+
msgid "Field format"
|
568 |
msgstr ""
|
569 |
|
570 |
+
#: classes/class-wc-order-export-admin.php:583
|
571 |
+
msgid "Fill order columns for"
|
572 |
msgstr ""
|
573 |
|
574 |
+
#: view/settings-form.php:837
|
575 |
+
msgid "Filter by billing"
|
576 |
msgstr ""
|
577 |
|
578 |
+
#: view/settings-form.php:811
|
579 |
+
msgid "Filter by coupons"
|
|
|
|
|
580 |
msgstr ""
|
581 |
|
582 |
+
#: view/settings-form.php:743
|
583 |
+
msgid "Filter by customers"
|
584 |
msgstr ""
|
585 |
|
586 |
+
#: view/settings-form.php:928
|
587 |
+
msgid "Filter by item and metadata"
|
588 |
msgstr ""
|
589 |
|
590 |
+
#: view/settings-form.php:476
|
591 |
+
msgid "Filter by order"
|
592 |
msgstr ""
|
593 |
|
594 |
+
#: view/settings-form.php:552
|
595 |
+
msgid "Filter by product"
|
|
|
|
|
|
|
596 |
msgstr ""
|
597 |
|
598 |
+
#: view/settings-form.php:883
|
599 |
+
msgid "Filter by shipping"
|
600 |
msgstr ""
|
601 |
|
602 |
+
#: view/settings-form.php:85
|
603 |
+
msgid "Filter orders by"
|
|
|
604 |
msgstr ""
|
605 |
|
606 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:750
|
607 |
+
msgid "First Name (Billing)"
|
608 |
msgstr ""
|
609 |
|
610 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:835
|
611 |
+
msgid "First Name (Shipping)"
|
612 |
msgstr ""
|
613 |
|
614 |
+
#: view/settings-form.php:155
|
615 |
+
msgid "Format"
|
616 |
msgstr ""
|
617 |
|
618 |
+
#: view/settings-form.php:414
|
619 |
+
msgid "Format numbers (use WC decimal separator)"
|
620 |
msgstr ""
|
621 |
|
622 |
+
#: classes/admin/class-wc-order-export-manage.php:26
|
623 |
+
msgid "Fri"
|
624 |
msgstr ""
|
625 |
|
626 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:760
|
627 |
+
msgid "Full Name (Billing)"
|
628 |
msgstr ""
|
629 |
|
630 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:845
|
631 |
+
msgid "Full Name (Shipping)"
|
632 |
msgstr ""
|
633 |
|
634 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:534
|
635 |
+
msgid "Full names for categories"
|
636 |
msgstr ""
|
637 |
|
638 |
+
#: classes/class-wc-order-export-admin.php:588
|
639 |
+
msgid "Grouping by coupon"
|
640 |
msgstr ""
|
641 |
|
642 |
#: classes/class-wc-order-export-admin.php:587
|
643 |
msgid "Grouping by product"
|
644 |
msgstr ""
|
645 |
|
646 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:494
|
647 |
+
msgid "Height"
|
648 |
msgstr ""
|
649 |
|
650 |
+
#: view/main.php:16
|
651 |
+
msgid "Help"
|
652 |
msgstr ""
|
653 |
|
654 |
+
#: view/tab/help.php:17
|
655 |
+
msgid "helpdesk system"
|
656 |
msgstr ""
|
657 |
|
658 |
+
#: view/settings-form.php:1072 view/settings-form.php:1115
|
659 |
+
#: view/settings-form.php:1180
|
660 |
+
msgid "Hide unused fields"
|
661 |
msgstr ""
|
662 |
|
663 |
+
#. Author URI of the plugin
|
664 |
+
msgid "https://algolplus.com/"
|
665 |
msgstr ""
|
666 |
|
667 |
+
#: view/settings-form.php:1249
|
668 |
+
#, php-format
|
669 |
+
msgid ""
|
670 |
+
"If you see this message after page load, user interface won't work correctly!"
|
671 |
+
"<br>There is a JS error (<a target=blank href='%s'>read here</a> how to view "
|
672 |
+
"it). Probably, it's a conflict with another plugin or active theme."
|
673 |
msgstr ""
|
674 |
|
675 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:514
|
676 |
+
msgid "Image URL"
|
677 |
msgstr ""
|
678 |
|
679 |
+
#: view/tab/tools.php:81
|
680 |
+
msgid "Import"
|
681 |
msgstr ""
|
682 |
|
683 |
+
#: view/tab/tools.php:66
|
684 |
+
msgid "Import settings"
|
685 |
msgstr ""
|
686 |
|
687 |
+
#: view/settings-form.php:1274
|
688 |
+
msgid "It might not work for huge datasets!"
|
689 |
msgstr ""
|
690 |
|
691 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:349
|
692 |
+
msgid "Item #"
|
693 |
msgstr ""
|
694 |
|
695 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:399
|
696 |
+
msgid "Item Cost"
|
697 |
msgstr ""
|
698 |
|
699 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:459
|
700 |
+
msgid "Item Discount Amount"
|
701 |
msgstr ""
|
702 |
|
703 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:344
|
704 |
+
msgid "Item ID"
|
|
|
|
|
|
|
705 |
msgstr ""
|
706 |
|
707 |
+
#: view/settings-form.php:703
|
708 |
+
msgid "Item meta data"
|
|
|
709 |
msgstr ""
|
710 |
|
711 |
+
#: view/settings-form.php:958
|
712 |
+
msgid "Item metadata"
|
|
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:359
|
716 |
+
msgid "Item Name"
|
|
|
717 |
msgstr ""
|
718 |
|
719 |
+
#: view/settings-form.php:931
|
720 |
+
msgid "Item names"
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: view/settings-form.php:216
|
724 |
+
msgid "Item rows start from new line"
|
725 |
msgstr ""
|
726 |
|
727 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:384
|
728 |
+
msgid "Item Seller"
|
|
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:464
|
732 |
+
msgid "Item Tax Rate"
|
733 |
+
msgstr ""
|
|
|
|
|
|
|
734 |
|
735 |
+
#: view/settings-form.php:266
|
736 |
+
msgid "JSON options"
|
737 |
+
msgstr ""
|
|
|
|
|
|
|
738 |
|
739 |
+
#: view/tab/tools.php:56
|
740 |
+
msgid "Just click inside the textarea and copy (Ctrl+C)"
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:755
|
744 |
+
msgid "Last Name (Billing)"
|
|
|
|
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:840
|
748 |
+
msgid "Last Name (Shipping)"
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:489
|
752 |
+
msgid "Length"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: view/settings-form.php:225 view/settings-form.php:287
|
756 |
+
msgid "Line Break"
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:640
|
760 |
+
msgid "Line number"
|
|
|
|
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: view/tab/help.php:24
|
764 |
+
#, php-format
|
765 |
msgid ""
|
766 |
+
"Look at %s for popular plugins or check %s to study how to extend the plugin."
|
|
|
767 |
msgstr ""
|
768 |
|
769 |
+
#: classes/core/class-wc-order-export-engine.php:546
|
770 |
+
msgid "Main SQL queries are listed below"
|
771 |
msgstr ""
|
772 |
|
773 |
+
#: classes/class-wc-order-export-admin.php:832
|
774 |
+
msgid "Mark exported"
|
775 |
msgstr ""
|
776 |
|
777 |
+
#: view/settings-form.php:489
|
778 |
+
msgid "Mark exported orders"
|
|
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: view/settings-form.php:1056 view/settings-form.php:1177
|
782 |
+
msgid "Meta key"
|
|
|
783 |
msgstr ""
|
784 |
|
785 |
+
#: view/settings-form.php:1256
|
786 |
+
msgid "Might be different from actual export!"
|
787 |
msgstr ""
|
788 |
|
789 |
+
#: view/settings-form.php:408
|
790 |
+
msgid "Misc settings"
|
791 |
msgstr ""
|
792 |
|
793 |
+
#: view/settings-form.php:98 view/settings-form.php:361
|
794 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:665
|
795 |
+
msgid "Modification Date"
|
796 |
msgstr ""
|
797 |
|
798 |
+
#: classes/admin/class-wc-order-export-manage.php:22
|
799 |
+
msgid "Mon"
|
800 |
msgstr ""
|
801 |
|
802 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1136
|
803 |
+
msgid "Money"
|
804 |
msgstr ""
|
805 |
|
806 |
#: view/tab/help.php:16
|
807 |
+
msgid "Need help? Create ticket in"
|
|
|
|
|
|
|
808 |
msgstr ""
|
809 |
|
810 |
+
#: classes/core/class-wc-order-export-engine.php:19
|
811 |
+
#: classes/core/class-wc-order-export-engine.php:63
|
812 |
+
msgid "No destination selected"
|
|
|
813 |
msgstr ""
|
814 |
|
815 |
+
#: classes/class-wc-order-export-admin.php:647
|
816 |
+
#: classes/admin/class-wc-order-export-ajax.php:356
|
817 |
+
#: classes/core/class-wc-order-export-engine.php:747
|
818 |
+
#: classes/core/class-wc-order-export-engine.php:760
|
819 |
+
msgid "Nothing to export. Please, adjust your filters"
|
820 |
msgstr ""
|
821 |
|
822 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1137
|
823 |
+
msgid "Number"
|
|
|
824 |
msgstr ""
|
825 |
|
826 |
+
#: classes/class-wc-order-export-admin.php:577
|
827 |
+
msgid "one row"
|
|
|
828 |
msgstr ""
|
829 |
|
830 |
+
#: view/settings-form.php:1129
|
831 |
+
msgid "OR"
|
832 |
msgstr ""
|
833 |
|
834 |
+
#: view/settings-form.php:1067 view/settings-form.php:1127
|
835 |
+
#: view/settings-form.php:1186
|
836 |
+
msgid "or type meta key here"
|
837 |
msgstr ""
|
838 |
|
839 |
+
#: view/settings-form.php:91 view/settings-form.php:360
|
840 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:660
|
841 |
+
msgid "Order Date"
|
842 |
msgstr ""
|
843 |
|
844 |
+
#: view/settings-form.php:359
|
845 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:645
|
846 |
+
msgid "Order ID"
|
847 |
msgstr ""
|
848 |
|
849 |
+
#: view/settings-form.php:1122
|
850 |
+
msgid "Order item fields"
|
851 |
msgstr ""
|
852 |
|
853 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:409
|
854 |
+
msgid "Order Line (w/o tax)"
|
855 |
msgstr ""
|
856 |
|
857 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:429
|
858 |
+
msgid "Order Line Subtotal"
|
859 |
msgstr ""
|
860 |
|
861 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:434
|
862 |
+
msgid "Order Line Subtotal Tax"
|
863 |
msgstr ""
|
864 |
|
865 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:414
|
866 |
+
msgid "Order Line Tax"
|
867 |
msgstr ""
|
868 |
|
869 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:424
|
870 |
+
msgid "Order Line Tax (- Refund)"
|
|
|
|
|
871 |
msgstr ""
|
872 |
|
873 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:419
|
874 |
+
msgid "Order Line Tax Refunded"
|
875 |
msgstr ""
|
876 |
|
877 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:439
|
878 |
+
msgid "Order Line Total"
|
879 |
msgstr ""
|
880 |
|
881 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:454
|
882 |
+
msgid "Order Line Total (- Refund)"
|
883 |
msgstr ""
|
884 |
|
885 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:444
|
886 |
+
msgid "Order Line Total (include tax)"
|
887 |
msgstr ""
|
888 |
|
889 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:449
|
890 |
+
msgid "Order Line Total Refunded"
|
891 |
msgstr ""
|
892 |
|
893 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:700
|
894 |
+
msgid "Order Notes"
|
895 |
msgstr ""
|
896 |
|
897 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:650
|
898 |
+
msgid "Order Number"
|
899 |
msgstr ""
|
900 |
|
901 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1044
|
902 |
+
msgid "Order Refund Amount"
|
903 |
msgstr ""
|
904 |
|
905 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1004
|
906 |
+
msgid "Order Shipping + Tax Amount"
|
907 |
msgstr ""
|
908 |
|
909 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:999
|
910 |
+
msgid "Order Shipping Amount"
|
911 |
msgstr ""
|
912 |
|
913 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1014
|
914 |
+
msgid "Order Shipping Amount (- Refund)"
|
915 |
msgstr ""
|
916 |
|
917 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1009
|
918 |
+
msgid "Order Shipping Amount Refunded"
|
919 |
msgstr ""
|
920 |
|
921 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1019
|
922 |
+
msgid "Order Shipping Tax Amount"
|
923 |
msgstr ""
|
924 |
|
925 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1029
|
926 |
+
msgid "Order Shipping Tax Amount (- Refund)"
|
927 |
msgstr ""
|
928 |
|
929 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1024
|
930 |
+
msgid "Order Shipping Tax Refunded"
|
931 |
msgstr ""
|
932 |
|
933 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:655
|
934 |
+
msgid "Order Status"
|
935 |
msgstr ""
|
936 |
|
937 |
+
#: view/settings-form.php:495
|
938 |
+
msgid "Order statuses"
|
939 |
msgstr ""
|
940 |
|
941 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:974
|
942 |
+
msgid "Order Subtotal - Cart Discount"
|
943 |
msgstr ""
|
944 |
|
945 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:969
|
946 |
+
msgid "Order Subtotal Amount"
|
947 |
msgstr ""
|
948 |
|
949 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:984
|
950 |
+
msgid "Order Subtotal Amount (- Refund)"
|
951 |
msgstr ""
|
952 |
|
953 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:979
|
954 |
+
msgid "Order Subtotal Amount Refunded"
|
955 |
msgstr ""
|
956 |
|
957 |
+
#: view/settings-form.php:248
|
958 |
+
msgid "Order tag"
|
959 |
msgstr ""
|
960 |
|
961 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:989
|
962 |
+
msgid "Order Tax Amount"
|
963 |
msgstr ""
|
964 |
|
965 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1054
|
966 |
+
msgid "Order Total Amount"
|
967 |
msgstr ""
|
968 |
|
969 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1049
|
970 |
+
msgid "Order Total Amount (- Refund)"
|
971 |
msgstr ""
|
972 |
|
973 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1059
|
974 |
+
msgid "Order Total Amount without Tax"
|
975 |
msgstr ""
|
976 |
|
977 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1039
|
978 |
+
msgid "Order Total Fee"
|
979 |
msgstr ""
|
980 |
|
981 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1064
|
982 |
+
msgid "Order Total Tax Amount"
|
983 |
msgstr ""
|
984 |
|
985 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1074
|
986 |
+
msgid "Order Total Tax Amount (- Refund)"
|
987 |
msgstr ""
|
988 |
|
989 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1069
|
990 |
+
msgid "Order Total Tax Amount Refunded"
|
991 |
msgstr ""
|
992 |
|
993 |
+
#: classes/formats/class-woe-formatter-xls.php:109
|
994 |
+
#: classes/admin/class-wc-order-export-manage.php:206
|
995 |
+
msgid "Orders"
|
996 |
msgstr ""
|
997 |
|
998 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1129
|
999 |
+
msgid "Others"
|
1000 |
msgstr ""
|
1001 |
|
1002 |
+
#: view/settings-form.php:185 view/settings-form.php:208
|
1003 |
+
#: view/settings-form.php:286
|
1004 |
+
msgid "Output column titles as first line"
|
1005 |
msgstr ""
|
1006 |
|
1007 |
+
#: view/settings-form.php:204 view/settings-form.php:282
|
1008 |
+
msgid "Output UTF-8 BOM"
|
1009 |
msgstr ""
|
1010 |
|
1011 |
+
#: view/settings-form.php:105
|
1012 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:685
|
1013 |
+
msgid "Paid Date"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
+
#: view/tab/tools.php:69
|
1017 |
+
msgid ""
|
1018 |
+
"Paste text into this field to import settings into the current WordPress "
|
1019 |
+
"install."
|
1020 |
msgstr ""
|
1021 |
|
1022 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:949
|
1023 |
+
msgid "Payment Method"
|
1024 |
msgstr ""
|
1025 |
|
1026 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:944
|
1027 |
+
msgid "Payment Method Title"
|
1028 |
msgstr ""
|
1029 |
|
1030 |
+
#: view/settings-form.php:867
|
1031 |
+
msgid "Payment methods"
|
1032 |
msgstr ""
|
1033 |
|
1034 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:825
|
1035 |
+
msgid "Phone (Billing)"
|
1036 |
msgstr ""
|
1037 |
|
1038 |
+
#: view/settings-form.php:455
|
1039 |
+
msgid ""
|
1040 |
+
"Please check permissions for your role. You must have capability "
|
1041 |
+
"“edit_themes” to use this box."
|
1042 |
msgstr ""
|
1043 |
|
1044 |
+
#: woo-order-export-lite.php:48
|
1045 |
+
msgid ""
|
1046 |
+
"Please, <a href=\"plugins.php\">deactivate</a> Free version of Advanced "
|
1047 |
+
"Order Export For WooCommerce!"
|
1048 |
msgstr ""
|
1049 |
|
1050 |
+
#: view/settings-form.php:239
|
1051 |
+
msgid "Please, install/enable PHP XML Extension!"
|
1052 |
msgstr ""
|
1053 |
|
1054 |
+
#: classes/class-wc-order-export-admin.php:646
|
1055 |
+
msgid "Please, set up fields to export"
|
1056 |
msgstr ""
|
1057 |
|
1058 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:805
|
1059 |
+
msgid "Postcode (Billing)"
|
1060 |
msgstr ""
|
1061 |
|
1062 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:890
|
1063 |
+
msgid "Postcode (Shipping)"
|
1064 |
msgstr ""
|
1065 |
|
1066 |
+
#: view/settings-form.php:242
|
1067 |
+
msgid "Prepend XML"
|
1068 |
msgstr ""
|
1069 |
|
1070 |
+
#: view/settings-form.php:1295
|
1071 |
+
msgid "Press 'Esc' to cancel the export"
|
1072 |
msgstr ""
|
1073 |
|
1074 |
+
#: view/settings-form.php:1255
|
1075 |
+
msgid "Preview"
|
1076 |
+
msgstr ""
|
1077 |
+
|
1078 |
+
#: view/settings-form.php:1283
|
1079 |
+
msgid "Preview size"
|
1080 |
+
msgstr ""
|
1081 |
+
|
1082 |
+
#: view/tab/order-actions.php:5 view/tab/profiles.php:5
|
1083 |
+
#: view/tab/schedules.php:5
|
1084 |
+
msgid "Pro version"
|
1085 |
+
msgstr ""
|
1086 |
+
|
1087 |
+
#: view/settings-form.php:595
|
1088 |
+
msgid "Product"
|
1089 |
msgstr ""
|
1090 |
|
1091 |
+
#: view/settings-form.php:563
|
1092 |
+
msgid "Product categories"
|
1093 |
msgstr ""
|
1094 |
|
1095 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:404
|
1096 |
+
msgid "Product Current Price"
|
1097 |
msgstr ""
|
1098 |
|
1099 |
+
#: view/settings-form.php:638
|
1100 |
+
msgid "Product custom fields"
|
1101 |
msgstr ""
|
1102 |
|
1103 |
+
#: view/settings-form.php:1118
|
1104 |
+
msgid "Product fields"
|
1105 |
msgstr ""
|
1106 |
|
1107 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:364
|
1108 |
+
msgid "Product Id"
|
1109 |
msgstr ""
|
1110 |
|
1111 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:369
|
1112 |
+
msgid "Product Name"
|
1113 |
msgstr ""
|
1114 |
|
1115 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:519
|
1116 |
+
msgid "Product Shipping Class"
|
1117 |
msgstr ""
|
1118 |
|
1119 |
+
#: view/settings-form.php:251
|
1120 |
+
msgid "Product tag"
|
1121 |
msgstr ""
|
1122 |
|
1123 |
+
#: view/settings-form.php:609
|
1124 |
+
msgid "Product taxonomies"
|
1125 |
msgstr ""
|
1126 |
|
1127 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:504
|
1128 |
+
msgid "Product URL"
|
1129 |
msgstr ""
|
1130 |
|
1131 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:379
|
1132 |
+
msgid "Product Variation"
|
1133 |
msgstr ""
|
1134 |
|
1135 |
+
#: classes/admin/class-wc-order-export-manage.php:672
|
1136 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:911
|
1137 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1124
|
1138 |
+
msgid "Products"
|
1139 |
msgstr ""
|
1140 |
|
1141 |
+
#: classes/class-wc-order-export-admin.php:594
|
1142 |
+
msgid "products"
|
1143 |
msgstr ""
|
1144 |
|
1145 |
+
#: view/main.php:12 view/tab/tools.php:22
|
1146 |
+
msgid "Profiles"
|
1147 |
msgstr ""
|
1148 |
|
1149 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:389
|
1150 |
+
msgid "Quantity"
|
1151 |
msgstr ""
|
1152 |
|
1153 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:394
|
1154 |
+
msgid "Quantity (- Refund)"
|
1155 |
msgstr ""
|
1156 |
|
1157 |
+
#: view/settings-form.php:1017
|
1158 |
+
msgid "Remove all fields"
|
1159 |
msgstr ""
|
1160 |
|
1161 |
+
#: classes/class-wc-order-export-admin.php:597
|
1162 |
+
msgid "Remove all fields?"
|
1163 |
msgstr ""
|
1164 |
|
1165 |
+
#: view/settings-form.php:193
|
1166 |
+
msgid "Right-to-Left direction"
|
1167 |
msgstr ""
|
1168 |
|
1169 |
+
#: view/settings-form.php:245
|
1170 |
+
msgid "Root tag"
|
1171 |
msgstr ""
|
1172 |
|
1173 |
+
#: classes/class-wc-order-export-admin.php:575
|
1174 |
+
msgid "rows"
|
1175 |
msgstr ""
|
1176 |
|
1177 |
+
#: classes/admin/class-wc-order-export-manage.php:27
|
1178 |
+
msgid "Sat"
|
1179 |
msgstr ""
|
1180 |
|
1181 |
+
#: view/settings-form.php:1262
|
1182 |
+
msgid "Save & Exit"
|
1183 |
msgstr ""
|
1184 |
|
1185 |
+
#: view/settings-form.php:1278
|
1186 |
+
msgid "Save as a profile"
|
1187 |
msgstr ""
|
1188 |
|
1189 |
+
#: view/settings-form.php:1259 view/settings-form.php:1264
|
1190 |
+
msgid "Save settings"
|
1191 |
msgstr ""
|
1192 |
|
1193 |
+
#: view/main.php:14 view/tab/tools.php:24
|
1194 |
+
msgid "Scheduled jobs"
|
1195 |
msgstr ""
|
1196 |
|
1197 |
+
#: classes/class-wc-order-export-admin.php:641
|
1198 |
+
msgid "select product field or item field or taxonomy"
|
1199 |
msgstr ""
|
1200 |
|
1201 |
+
#: view/settings-form.php:260
|
1202 |
+
msgid "Self closing tags"
|
1203 |
msgstr ""
|
1204 |
|
1205 |
+
#: classes/class-wc-order-export-admin.php:593
|
1206 |
+
msgid "Set up coupon fields"
|
1207 |
msgstr ""
|
1208 |
|
1209 |
+
#: view/settings-form.php:995
|
1210 |
+
msgid "Set up fields to export"
|
1211 |
msgstr ""
|
1212 |
|
1213 |
+
#: classes/class-wc-order-export-admin.php:592
|
1214 |
+
msgid "Set up product fields"
|
1215 |
msgstr ""
|
1216 |
|
1217 |
+
#: classes/class-wc-order-export-admin.php:142
|
1218 |
+
msgid "Settings"
|
1219 |
msgstr ""
|
1220 |
|
1221 |
+
#: view/tab/help.php:6
|
1222 |
+
msgid "settings"
|
1223 |
msgstr ""
|
1224 |
|
1225 |
+
#: view/main.php:8
|
1226 |
+
msgid "Settings saved"
|
1227 |
msgstr ""
|
1228 |
|
1229 |
+
#: view/settings-form.php:1290
|
1230 |
+
msgid "Settings were successfully updated!"
|
1231 |
msgstr ""
|
1232 |
|
1233 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1127
|
1234 |
+
msgid "Shipping"
|
1235 |
msgstr ""
|
1236 |
|
1237 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1123
|
1238 |
+
msgid "Shipping Address"
|
1239 |
msgstr ""
|
1240 |
|
1241 |
+
#: view/settings-form.php:886
|
1242 |
+
msgid "Shipping locations"
|
1243 |
msgstr ""
|
1244 |
|
1245 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:939
|
1246 |
+
msgid "Shipping Method"
|
1247 |
msgstr ""
|
1248 |
|
1249 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:934
|
1250 |
+
msgid "Shipping Method Title"
|
1251 |
msgstr ""
|
1252 |
|
1253 |
+
#: view/settings-form.php:913
|
1254 |
+
msgid "Shipping methods"
|
1255 |
msgstr ""
|
1256 |
|
1257 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:529
|
1258 |
+
msgid "Short Description"
|
1259 |
msgstr ""
|
1260 |
|
1261 |
+
#: view/settings-form.php:561
|
1262 |
+
msgid "Skip fully refunded items"
|
1263 |
msgstr ""
|
1264 |
|
1265 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:354
|
1266 |
+
msgid "SKU"
|
1267 |
msgstr ""
|
1268 |
|
1269 |
+
#: view/settings-form.php:385
|
1270 |
+
#, php-format
|
1271 |
+
msgid "Sort orders by %s in %s order"
|
1272 |
msgstr ""
|
1273 |
|
1274 |
+
#: classes/class-wc-order-export-admin.php:582
|
1275 |
+
msgid "Split values by"
|
1276 |
msgstr ""
|
1277 |
|
1278 |
+
#: view/settings-form.php:268
|
1279 |
+
msgid "Start tag"
|
1280 |
msgstr ""
|
1281 |
|
1282 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:790
|
1283 |
+
msgid "State Code (Billing)"
|
1284 |
msgstr ""
|
1285 |
|
1286 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:875
|
1287 |
+
msgid "State Code (Shipping)"
|
1288 |
msgstr ""
|
1289 |
|
1290 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:800
|
1291 |
+
msgid "State Name (Billing)"
|
1292 |
msgstr ""
|
1293 |
|
1294 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:885
|
1295 |
+
msgid "State Name (Shipping)"
|
1296 |
msgstr ""
|
1297 |
|
1298 |
+
#: classes/class-wc-order-export-admin.php:763
|
1299 |
+
#, php-format
|
1300 |
+
msgid "Status change job #%s for order #%s. Result: %s"
|
1301 |
msgstr ""
|
1302 |
|
1303 |
+
#: view/main.php:13 view/tab/tools.php:23
|
1304 |
+
msgid "Status change jobs"
|
1305 |
msgstr ""
|
1306 |
|
1307 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1135
|
1308 |
+
msgid "String"
|
1309 |
msgstr ""
|
1310 |
|
1311 |
+
#: view/settings-form.php:432
|
1312 |
+
msgid "Strip tags from Product Description/Variation"
|
1313 |
msgstr ""
|
1314 |
|
1315 |
+
#: view/settings-form.php:135
|
1316 |
+
msgid "Summary Report By Products"
|
1317 |
msgstr ""
|
1318 |
|
1319 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:544
|
1320 |
+
msgid "Summary Report Total Amount"
|
1321 |
msgstr ""
|
1322 |
|
1323 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:539
|
1324 |
+
msgid "Summary Report Total Quantity"
|
1325 |
msgstr ""
|
1326 |
|
1327 |
+
#: classes/admin/class-wc-order-export-manage.php:21
|
1328 |
+
msgid "Sun"
|
1329 |
msgstr ""
|
1330 |
|
1331 |
+
#: classes/class-wc-order-export-admin.php:145
|
1332 |
+
msgid "Support"
|
1333 |
msgstr ""
|
1334 |
|
1335 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:479
|
1336 |
+
msgid "Tags"
|
1337 |
msgstr ""
|
1338 |
|
1339 |
+
#: view/settings-form.php:1131
|
1340 |
+
msgid "Taxonomy"
|
1341 |
msgstr ""
|
1342 |
|
1343 |
+
#: classes/core/class-wc-order-export-engine.php:420
|
1344 |
+
#, php-format
|
1345 |
+
msgid "The code you are trying to save produced a fatal error on line %d:"
|
1346 |
msgstr ""
|
1347 |
|
1348 |
+
#: view/settings-form.php:550
|
1349 |
+
msgid ""
|
1350 |
+
"The filters won't work correctly.<br>Another plugin(or theme) has loaded "
|
1351 |
+
"outdated Select2.js"
|
1352 |
msgstr ""
|
1353 |
|
1354 |
+
#: view/settings-form.php:117
|
1355 |
+
msgid "This date range should not be saved in the scheduled task"
|
1356 |
msgstr ""
|
1357 |
|
1358 |
+
#: view/tab/help.php:10
|
1359 |
+
msgid "this page"
|
1360 |
msgstr ""
|
1361 |
|
1362 |
+
#: view/tab/tools.php:74
|
1363 |
+
msgid ""
|
1364 |
+
"This process will overwrite your settings for \"Advanced Order Export For "
|
1365 |
+
"WooCommerce\" !"
|
1366 |
msgstr ""
|
1367 |
|
1368 |
+
#: classes/admin/class-wc-order-export-manage.php:25
|
1369 |
+
msgid "Thu"
|
1370 |
msgstr ""
|
1371 |
|
1372 |
+
#: view/settings-form.php:329
|
1373 |
+
msgid "Time"
|
1374 |
msgstr ""
|
1375 |
|
1376 |
+
#: classes/class-wc-order-export-admin.php:644
|
1377 |
+
msgid "title is empty"
|
1378 |
msgstr ""
|
1379 |
|
1380 |
+
#: view/settings-form.php:123
|
1381 |
+
msgid "to"
|
1382 |
msgstr ""
|
1383 |
|
1384 |
+
#: view/main.php:15
|
1385 |
+
msgid "Tools"
|
1386 |
msgstr ""
|
1387 |
|
1388 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1089
|
1389 |
+
msgid "Total items"
|
1390 |
msgstr ""
|
1391 |
|
1392 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1099
|
1393 |
+
msgid "Total products"
|
1394 |
msgstr ""
|
1395 |
|
1396 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1084
|
1397 |
msgid "Total weight"
|
1398 |
msgstr ""
|
1399 |
|
1400 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1128
|
1401 |
+
msgid "Totals"
|
|
|
|
|
|
|
|
|
1402 |
msgstr ""
|
1403 |
|
1404 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:670
|
1405 |
+
msgid "Transaction ID"
|
1406 |
msgstr ""
|
1407 |
|
1408 |
+
#: view/settings-form.php:275
|
1409 |
+
msgid "TSV options"
|
1410 |
msgstr ""
|
1411 |
|
1412 |
+
#: classes/admin/class-wc-order-export-manage.php:23
|
1413 |
+
msgid "Tue"
|
1414 |
msgstr ""
|
1415 |
|
1416 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:469
|
1417 |
+
msgid "Type"
|
1418 |
msgstr ""
|
1419 |
|
1420 |
+
#: classes/class-wc-order-export-admin.php:833
|
1421 |
+
msgid "Unmark exported"
|
1422 |
msgstr ""
|
1423 |
|
1424 |
+
#: view/settings-form.php:459
|
1425 |
+
msgid "Use only unnamed functions!"
|
1426 |
msgstr ""
|
1427 |
|
1428 |
+
#: view/settings-form.php:179
|
1429 |
+
msgid "Use sheet name"
|
1430 |
msgstr ""
|
1431 |
|
1432 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1121
|
1433 |
+
msgid "User"
|
1434 |
msgstr ""
|
1435 |
|
1436 |
+
#: view/settings-form.php:760
|
1437 |
+
msgid "User roles"
|
1438 |
msgstr ""
|
1439 |
|
1440 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:725
|
1441 |
+
msgid "User Website"
|
1442 |
msgstr ""
|
1443 |
|
1444 |
+
#: view/settings-form.php:747
|
1445 |
+
msgid "Usernames"
|
1446 |
msgstr ""
|
1447 |
|
1448 |
+
#: view/settings-form.php:1097 view/settings-form.php:1161
|
1449 |
+
#: view/settings-form.php:1209
|
1450 |
+
msgid "Value"
|
1451 |
msgstr ""
|
1452 |
|
1453 |
+
#: view/settings-form.php:672
|
1454 |
+
msgid "Variable product attributes"
|
1455 |
msgstr ""
|
1456 |
|
1457 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:374
|
1458 |
+
msgid "Variation Id"
|
|
|
1459 |
msgstr ""
|
1460 |
|
1461 |
+
#: view/settings-form.php:580
|
1462 |
+
msgid "Vendor/creator"
|
1463 |
msgstr ""
|
1464 |
|
1465 |
+
#: classes/admin/class-wc-order-export-manage.php:24
|
1466 |
+
msgid "Wed"
|
1467 |
msgstr ""
|
1468 |
|
1469 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:499
|
1470 |
+
msgid "Weight"
|
1471 |
msgstr ""
|
1472 |
|
1473 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:484
|
1474 |
+
msgid "Width"
|
|
|
1475 |
msgstr ""
|
1476 |
|
1477 |
+
#: classes/core/class-wc-order-export-engine.php:73
|
1478 |
+
msgid "Wrong export type"
|
1479 |
msgstr ""
|
1480 |
|
1481 |
+
#: classes/core/class-wc-order-export-engine.php:29
|
1482 |
+
msgid "Wrong format"
|
1483 |
msgstr ""
|
1484 |
|
1485 |
+
#: classes/admin/class-wc-order-export-ajax.php:20
|
1486 |
+
msgid "Wrong key for cron url!"
|
1487 |
msgstr ""
|
1488 |
|
1489 |
+
#: view/settings-form.php:168
|
1490 |
+
msgid "XLS options"
|
1491 |
msgstr ""
|
1492 |
|
1493 |
+
#: view/settings-form.php:236
|
1494 |
+
msgid "XML options"
|
1495 |
msgstr ""
|
readme.txt
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
Contributors: algolplus
|
3 |
Donate link: https://algolplus.com/plugins/
|
4 |
Tags: woocommerce,export,order,xls,csv,xml,woo export lite,export orders,orders export,csv export,xml export,xls export,tsv
|
5 |
-
Requires PHP: 5.
|
6 |
Requires at least: 4.7
|
7 |
-
Tested up to:
|
8 |
-
Stable tag: 2.0.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -103,6 +103,13 @@ Yes, you can email a request to aprokaev@gmail.com. We intensively develop this
|
|
103 |
|
104 |
== Changelog ==
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
= 2.0.0 - 2018-10-24 =
|
107 |
* It's a **major update**. Backup settings (tab "Tools") before upgrading
|
108 |
* New section "Set up fields to export" - simplify UI, format fields, allow duplicates
|
2 |
Contributors: algolplus
|
3 |
Donate link: https://algolplus.com/plugins/
|
4 |
Tags: woocommerce,export,order,xls,csv,xml,woo export lite,export orders,orders export,csv export,xml export,xls export,tsv
|
5 |
+
Requires PHP: 5.4.0
|
6 |
Requires at least: 4.7
|
7 |
+
Tested up to: 5.0
|
8 |
+
Stable tag: 2.0.1
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
103 |
|
104 |
== Changelog ==
|
105 |
|
106 |
+
= 2.0.1 - 2018-11-14 =
|
107 |
+
* Fixed bug - "total weight" and "count of unique products" were empty
|
108 |
+
* Fixed bug - message "wrong Select2 loaded"
|
109 |
+
* Fixed bug - UI issues after switching formats (CSV-XML-CSV)
|
110 |
+
* Shows some instructions if user gets popup with empty error message
|
111 |
+
* Shows warning if XML can not be built (PHP extension is not installed)
|
112 |
+
|
113 |
= 2.0.0 - 2018-10-24 =
|
114 |
* It's a **major update**. Backup settings (tab "Tools") before upgrading
|
115 |
* New section "Set up fields to export" - simplify UI, format fields, allow duplicates
|
view/settings-form.php
CHANGED
@@ -1,34 +1,34 @@
|
|
1 |
<?php
|
2 |
-
if ( !defined( 'ABSPATH' ) ) {
|
3 |
exit; // Exit if accessed directly
|
4 |
}
|
5 |
/**
|
6 |
* @var WC_Order_Export_Admin $WC_Order_Export WC_Order_Export_Admin instance
|
7 |
-
* @var string
|
8 |
-
* @var integer
|
9 |
-
* @var string
|
10 |
-
* @var array
|
11 |
*
|
12 |
*/
|
13 |
$settings = WC_Order_Export_Manage::get( $mode, $id );
|
14 |
-
$settings = apply_filters('woe_settings_page_prepare', $settings );
|
15 |
$order_custom_meta_fields = WC_Order_Export_Data_Extractor_UI::get_all_order_custom_meta_fields();
|
16 |
-
$readonly_php
|
17 |
|
18 |
function print_formats_field( $type, $segment = "" ) {
|
19 |
if ( ! $type && $type !== 'meta' && $type !== 'field' ) {
|
20 |
-
|
21 |
-
|
22 |
$margin_left = 'meta' == $type ? '1px' : '4px';
|
23 |
-
|
24 |
-
|
25 |
|
26 |
$formats_fields_html =
|
27 |
'<label for="' . $id . '">' .
|
28 |
__( 'Field format', 'woo-order-export-lite' ) . ':' .
|
29 |
'</label>' .
|
30 |
-
|
31 |
-
'<option value="" >' . __('-', 'woo-order-export-lite') . '</option>';
|
32 |
|
33 |
foreach ( WC_Order_Export_Data_Extractor_UI::get_format_fields() as $format_id => $format_label ) {
|
34 |
$formats_fields_html .= "<option value='$format_id' >$format_label</option>";
|
@@ -39,18 +39,17 @@ function print_formats_field( $type, $segment = "" ) {
|
|
39 |
}
|
40 |
|
41 |
|
42 |
-
|
43 |
?>
|
44 |
|
45 |
<script>
|
46 |
var mode = '<?php echo $mode ?>';
|
47 |
var job_id = '<?php echo $id ?>';
|
48 |
-
var output_format = '<?php echo $settings[
|
49 |
-
var selected_order_fields = <?php echo json_encode( $settings[
|
50 |
-
var selected_order_products_fields = <?php echo json_encode( $settings[
|
51 |
-
var selected_order_coupons_fields = <?php echo json_encode( $settings[
|
52 |
-
var duplicated_fields_settings = <?php echo json_encode( $settings[
|
53 |
-
var all_fields = <?php echo json_encode( WC_Order_Export_Manage::make_all_fields( $settings[
|
54 |
var order_custom_meta_fields = <?php echo json_encode( $order_custom_meta_fields ) ?>;
|
55 |
var order_products_custom_meta_fields = <?php echo json_encode( WC_Order_Export_Data_Extractor_UI::get_product_custom_fields() ) ?>;
|
56 |
var order_order_item_custom_meta_fields = <?php echo json_encode( WC_Order_Export_Data_Extractor_UI::get_product_itemmeta() ) ?>;
|
@@ -63,188 +62,298 @@ function print_formats_field( $type, $segment = "" ) {
|
|
63 |
|
64 |
<form method="post" id="export_job_settings">
|
65 |
<?php if ( $mode !== WC_Order_Export_Manage::EXPORT_NOW ): ?>
|
66 |
-
|
67 |
<?php endif; ?>
|
68 |
|
69 |
-
|
70 |
<?php
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
?>
|
79 |
|
80 |
-
|
|
|
81 |
|
82 |
-
<?php if ( $show[
|
83 |
-
|
84 |
-
|
85 |
<?php _e( 'Filter orders by', 'woo-order-export-lite' ) ?>:
|
86 |
-
|
87 |
-
|
88 |
-
|
|
|
|
|
89 |
<?php _e( 'Order Date', 'woo-order-export-lite' ) ?>
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
|
|
94 |
<?php _e( 'Modification Date', 'woo-order-export-lite' ) ?>
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
|
|
|
|
99 |
<?php _e( 'Paid Date', 'woo-order-export-lite' ) ?>
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
|
|
104 |
<?php _e( 'Completed Date', 'woo-order-export-lite' ) ?>
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
|
|
|
|
|
|
112 |
<?php _e( 'to', 'woo-order-export-lite' ) ?>
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
<?php endif; ?>
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
|
|
132 |
|
133 |
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
<?php foreach ( WC_Order_Export_Admin::$formats as $format ) { ?>
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
|
|
|
|
143 |
<?php } ?>
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
<?php _e( '
|
168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
<?php if ( function_exists( 'iconv' ) ): ?>
|
170 |
-
<?php _e( 'Character encoding', 'woo-order-export-lite' ) ?><input type=text
|
|
|
|
|
|
|
171 |
<?php endif ?>
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
<input type=hidden name="settings[format_tsv_add_utf8_bom]" value=0>
|
189 |
<input type=hidden name="settings[format_tsv_display_column_names]" value=0>
|
190 |
-
<input type=checkbox name="settings[format_tsv_add_utf8_bom]"
|
191 |
-
|
192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
<?php if ( function_exists( 'iconv' ) ): ?>
|
194 |
-
<?php _e( 'Character encoding', 'woo-order-export-lite' ) ?><input type=text
|
|
|
|
|
|
|
195 |
<?php endif ?>
|
196 |
</div>
|
197 |
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
<?php
|
203 |
$date_format = array(
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
);
|
210 |
$date_format = apply_filters( 'woe_date_format', $date_format );
|
211 |
?>
|
212 |
-
|
213 |
-
<?php foreach( $date_format as $format ):
|
214 |
-
|
|
|
|
|
215 |
<?php endforeach; ?>
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
|
|
|
|
225 |
<?php
|
226 |
$time_format = array(
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
);
|
232 |
$time_format = apply_filters( 'woe_time_format', $time_format );
|
233 |
?>
|
234 |
-
|
235 |
-
<?php foreach( $time_format as $format ):
|
236 |
-
|
|
|
|
|
237 |
<?php endforeach; ?>
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
|
|
|
|
248 |
<?php
|
249 |
$sort = array(
|
250 |
'order_id' => __( 'Order ID', 'woo-order-export-lite' ),
|
@@ -254,37 +363,46 @@ function print_formats_field( $type, $segment = "" ) {
|
|
254 |
ob_start();
|
255 |
?>
|
256 |
<select name="settings[sort]">
|
257 |
-
<?php foreach( $sort as $value => $text ):
|
258 |
-
|
|
|
259 |
<?php endforeach; ?>
|
260 |
</select>
|
261 |
-
|
262 |
-
|
263 |
|
264 |
ob_start();
|
265 |
?>
|
266 |
<select name="settings[sort_direction]">
|
267 |
-
<option value='DESC' <?php echo selected( @$settings[
|
268 |
-
|
|
|
|
|
269 |
</select>
|
270 |
-
|
271 |
-
|
272 |
|
273 |
-
|
274 |
-
|
|
|
275 |
|
276 |
<?php if ( $mode === WC_Order_Export_Manage::EXPORT_SCHEDULE ): ?>
|
277 |
<div>
|
278 |
-
<label for="change_order_status_to"><?php _e( 'Change order status to',
|
|
|
279 |
<select id="change_order_status_to" name="settings[change_order_status_to]">
|
280 |
-
<option value="" <?php if ( empty( $settings[
|
281 |
-
|
282 |
-
|
283 |
-
|
|
|
|
|
|
|
|
|
284 |
</select>
|
285 |
</div>
|
286 |
<?php endif; ?>
|
287 |
-
|
288 |
<br>
|
289 |
<div class="my-block">
|
290 |
<span class="my-hide-next "><?php _e( 'Misc settings', 'woo-order-export-lite' ) ?>
|
@@ -292,156 +410,209 @@ function print_formats_field( $type, $segment = "" ) {
|
|
292 |
<div id="my-misc" hidden="hidden">
|
293 |
<div>
|
294 |
<input type="hidden" name="settings[format_number_fields]" value="0"/>
|
295 |
-
<label><input type="checkbox" name="settings[format_number_fields]"
|
|
|
|
|
296 |
</div>
|
297 |
<div>
|
298 |
<input type="hidden" name="settings[export_all_comments]" value="0"/>
|
299 |
-
<label><input type="checkbox" name="settings[export_all_comments]"
|
|
|
|
|
300 |
</div>
|
301 |
<div>
|
302 |
<input type="hidden" name="settings[export_refund_notes]" value="0"/>
|
303 |
-
<label><input type="checkbox" name="settings[export_refund_notes]"
|
|
|
|
|
304 |
</div>
|
305 |
<div>
|
306 |
<input type="hidden" name="settings[strip_tags_product_fields]" value="0"/>
|
307 |
-
<label><input type="checkbox" name="settings[strip_tags_product_fields]"
|
|
|
|
|
308 |
</div>
|
309 |
<div>
|
310 |
<input type="hidden" name="settings[cleanup_phone]" value="0"/>
|
311 |
-
<label><input type="checkbox" name="settings[cleanup_phone]"
|
|
|
|
|
312 |
</div>
|
313 |
<div>
|
314 |
<input type="hidden" name="settings[enable_debug]" value="0"/>
|
315 |
-
<label><input type="checkbox" name="settings[enable_debug]"
|
|
|
|
|
316 |
</div>
|
317 |
-
|
318 |
<input type="hidden" name="settings[custom_php]" value="0"/>
|
319 |
-
<label><input type="checkbox" name="settings[custom_php]"
|
|
|
|
|
320 |
<div id="custom_php_code_textarea" <?php echo $settings['custom_php'] ? '' : 'style="display: none"' ?>>
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
|
|
|
|
|
|
327 |
</div>
|
328 |
-
|
329 |
</div>
|
330 |
</div>
|
331 |
-
|
332 |
|
333 |
-
|
334 |
<?php
|
335 |
-
if ( in_array( $mode,
|
|
|
336 |
include "pro-version/destinations.php";
|
337 |
endif; ?>
|
338 |
|
339 |
-
|
340 |
<span class="my-hide-next "><?php _e( 'Filter by order', 'woo-order-export-lite' ) ?>
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
<?php } ?>
|
352 |
-
|
353 |
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
<?php foreach ( WC_Order_Export_Data_Extractor_UI::get_order_custom_fields() as $cf_name ) { ?>
|
358 |
-
|
359 |
<?php } ?>
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
|
|
|
|
379 |
<?php
|
380 |
-
if ( $settings[
|
381 |
-
foreach ( $settings[
|
382 |
?>
|
383 |
-
|
384 |
-
<?php }
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
401 |
<?php
|
402 |
-
if ( $settings[
|
403 |
-
foreach ( $settings[
|
404 |
$cat_term = get_term( $cat, 'product_cat' );
|
405 |
-
if ($cat_term) {
|
406 |
-
|
407 |
-
<option selected
|
|
|
408 |
<?php
|
409 |
-
|
410 |
?>
|
411 |
-
<?php }
|
412 |
-
|
413 |
-
|
414 |
-
|
|
|
|
|
415 |
<?php
|
416 |
-
if ( $settings[
|
417 |
-
foreach ( $settings[
|
418 |
$user = get_user_by( 'id', $user_id );
|
419 |
?>
|
420 |
-
|
421 |
-
<?php }
|
422 |
-
|
|
|
423 |
|
424 |
-
|
425 |
|
426 |
-
|
427 |
|
428 |
-
|
|
|
429 |
<?php
|
430 |
-
if ( $settings[
|
431 |
-
foreach ( $settings[
|
432 |
$p = get_the_title( $prod );
|
433 |
?>
|
434 |
-
|
435 |
-
<?php }
|
436 |
-
|
|
|
437 |
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
<?php foreach ( WC_Order_Export_Data_Extractor_UI::get_product_taxonomies() as $attr_id => $attr_name ) { ?>
|
442 |
-
|
443 |
<?php } ?>
|
444 |
-
|
445 |
|
446 |
<select id="taxonomies_compare" class="select_compare">
|
447 |
<option>=</option>
|
@@ -450,135 +621,152 @@ function print_formats_field( $type, $segment = "" ) {
|
|
450 |
|
451 |
<input type="text" id="text_taxonomies" disabled style="display: none;">
|
452 |
|
453 |
-
<button id="add_taxonomies" class="button-secondary"><span class="dashicons dashicons-plus-alt"></span
|
454 |
-
|
455 |
-
|
|
|
|
|
456 |
<?php
|
457 |
-
if ( $settings[
|
458 |
-
foreach ( $settings[
|
459 |
?>
|
460 |
-
|
461 |
-
<?php }
|
462 |
-
|
|
|
463 |
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
<?php foreach ( WC_Order_Export_Data_Extractor_UI::get_product_custom_fields() as $cf_name ) { ?>
|
468 |
-
|
469 |
<?php } ?>
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
|
|
|
|
487 |
<?php
|
488 |
-
if ( $settings[
|
489 |
-
foreach ( $settings[
|
490 |
?>
|
491 |
-
|
492 |
-
<?php }
|
493 |
-
|
|
|
494 |
|
495 |
-
|
496 |
-
|
497 |
-
|
|
|
498 |
<?php foreach ( WC_Order_Export_Data_Extractor_UI::get_product_attributes() as $attr_id => $attr_name ) { ?>
|
499 |
-
|
500 |
<?php } ?>
|
501 |
-
|
502 |
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
|
509 |
-
|
510 |
|
511 |
-
|
512 |
-
|
513 |
-
|
|
|
|
|
514 |
<?php
|
515 |
-
if ( $settings[
|
516 |
-
foreach ( $settings[
|
517 |
?>
|
518 |
-
|
519 |
-
<?php }
|
520 |
-
|
|
|
521 |
|
522 |
<span class="wc-oe-header"><?php _e( 'Item meta data', 'woo-order-export-lite' ) ?></span>
|
523 |
-
|
524 |
-
|
525 |
<?php foreach ( WC_Order_Export_Data_Extractor_UI::get_product_itemmeta() as $attr_name ) { ?>
|
526 |
-
|
527 |
<?php } ?>
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
|
|
|
|
545 |
<?php
|
546 |
-
if ( $settings[
|
547 |
-
foreach ( $settings[
|
548 |
?>
|
549 |
-
|
550 |
-
<?php }
|
551 |
-
|
|
|
552 |
|
553 |
-
|
554 |
-
|
555 |
|
556 |
-
|
557 |
|
558 |
-
|
559 |
<span class="my-hide-next "><?php _e( 'Filter by customers', 'woo-order-export-lite' ) ?>
|
560 |
-
|
561 |
-
|
562 |
|
563 |
-
|
564 |
-
|
|
|
565 |
<?php
|
566 |
-
if ( $settings[
|
567 |
-
foreach ( $settings[
|
568 |
$user = get_user_by( 'id', $user_id );
|
569 |
?>
|
570 |
-
|
571 |
-
|
572 |
-
|
|
|
573 |
|
574 |
-
|
575 |
-
|
|
|
576 |
<?php
|
577 |
global $wp_roles;
|
578 |
foreach ( $wp_roles->role_names as $k => $v ) { ?>
|
579 |
-
|
|
|
580 |
<?php } ?>
|
581 |
-
|
582 |
|
583 |
<span class="wc-oe-header"><?php _e( 'Custom fields', 'woo-order-export-lite' ) ?></span>
|
584 |
<br>
|
@@ -601,47 +789,54 @@ function print_formats_field( $type, $segment = "" ) {
|
|
601 |
|
602 |
<input type="text" id="text_user_custom_fields" disabled class="like-input" style="display: none;">
|
603 |
|
604 |
-
<button id="add_user_custom_fields" class="button-secondary"><span
|
|
|
605 |
<br>
|
606 |
-
<select id="user_custom_fields_check" multiple name="settings[user_custom_fields][]"
|
|
|
607 |
<?php
|
608 |
-
if ( ! empty($settings[
|
609 |
-
foreach ( $settings[
|
610 |
?>
|
611 |
<option selected value="<?php echo $value; ?>"> <?php echo $value; ?></option>
|
612 |
-
<?php }
|
|
|
613 |
</select>
|
614 |
-
|
615 |
-
|
616 |
|
617 |
-
|
618 |
|
619 |
-
|
620 |
<span class="my-hide-next "><?php _e( 'Filter by coupons', 'woo-order-export-lite' ) ?>
|
621 |
-
|
622 |
-
|
623 |
<div>
|
624 |
<input type="hidden" name="settings[any_coupon_used]" value="0"/>
|
625 |
-
<label><input type="checkbox" name="settings[any_coupon_used]"
|
|
|
|
|
626 |
</div>
|
627 |
-
|
628 |
-
|
|
|
629 |
<?php
|
630 |
-
if ( $settings['coupons'] )
|
631 |
foreach ( $settings['coupons'] as $coupon ) {
|
632 |
?>
|
633 |
-
|
634 |
-
<?php }
|
635 |
-
|
636 |
-
|
637 |
-
|
|
|
638 |
|
639 |
-
|
640 |
|
641 |
-
|
642 |
<span class="my-hide-next "><?php _e( 'Filter by billing', 'woo-order-export-lite' ) ?>
|
643 |
-
|
644 |
-
|
645 |
<span class="wc-oe-header"><?php _e( 'Billing locations', 'woo-order-export-lite' ) ?></span>
|
646 |
<br>
|
647 |
<select id="billing_locations">
|
@@ -655,136 +850,156 @@ function print_formats_field( $type, $segment = "" ) {
|
|
655 |
<option><></option>
|
656 |
</select>
|
657 |
|
658 |
-
<button id="add_billing_locations" class="button-secondary"><span
|
|
|
659 |
<br>
|
660 |
-
<select id="billing_locations_check" multiple name="settings[billing_locations][]"
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
|
|
665 |
<option selected value="<?php echo $location; ?>"> <?php echo $location; ?></option>
|
666 |
-
|
|
|
667 |
</select>
|
668 |
|
669 |
-
|
670 |
-
|
|
|
671 |
<?php foreach ( WC()->payment_gateways->payment_gateways() as $gateway ) { ?>
|
672 |
-
|
|
|
|
|
|
|
673 |
<?php } ?>
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
|
678 |
-
|
679 |
|
680 |
-
|
681 |
<span class="my-hide-next "><?php _e( 'Filter by shipping', 'woo-order-export-lite' ) ?>
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
|
|
|
|
700 |
<?php
|
701 |
-
if ( $settings[
|
702 |
-
foreach ( $settings[
|
703 |
?>
|
704 |
-
|
705 |
-
<?php }
|
706 |
-
|
|
|
707 |
|
708 |
-
|
709 |
-
|
|
|
710 |
<?php foreach ( WC_Order_Export_Data_Extractor_UI::get_shipping_methods() as $i => $title ) { ?>
|
711 |
-
|
|
|
|
|
712 |
<?php } ?>
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
|
717 |
-
|
718 |
|
719 |
-
|
720 |
<span class="my-hide-next "><?php _e( 'Filter by item and metadata', 'woo-order-export-lite' ) ?>
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
|
|
|
|
739 |
<?php
|
740 |
-
if ( $settings[
|
741 |
-
foreach ( $settings[
|
742 |
?>
|
743 |
-
|
744 |
-
<?php }
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
|
|
756 |
<?php } ?>
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
|
|
|
|
765 |
<?php
|
766 |
-
if ( $settings[
|
767 |
-
foreach ( $settings[
|
768 |
?>
|
769 |
-
|
770 |
-
<?php }
|
771 |
-
|
|
|
772 |
|
773 |
-
|
774 |
-
|
775 |
|
776 |
-
|
777 |
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
<span id='adjust-fields-btn' class="my-hide-next "><?php _e( 'Set up fields to export',
|
782 |
-
|
783 |
-
|
|
|
784 |
<div style="display: grid; grid-template-columns: 10fr 1fr 10fr;">
|
785 |
<div class="clear"></div>
|
786 |
<div></div>
|
787 |
-
<div
|
788 |
<br class="clear"/>
|
789 |
</div>
|
790 |
<div id='fields' style='display:none;'>
|
@@ -793,16 +1008,17 @@ function print_formats_field( $type, $segment = "" ) {
|
|
793 |
<div class="fields-control">
|
794 |
<div style="display: inline-block; float: left">
|
795 |
<label style="font-size: medium;">
|
796 |
-
|
797 |
</label>
|
798 |
</div>
|
799 |
<div style="display: inline-block; float: right; margin-bottom: 15px">
|
800 |
-
<a id="clear_selected_fields" class="button"
|
801 |
-
|
|
|
802 |
</a>
|
803 |
</div>
|
804 |
</div>
|
805 |
-
<div
|
806 |
<br class="clear"/>
|
807 |
</div>
|
808 |
<ul id="order_fields"></ul>
|
@@ -810,16 +1026,16 @@ function print_formats_field( $type, $segment = "" ) {
|
|
810 |
<div></div>
|
811 |
<div id='unselected_fields'>
|
812 |
<ul class="subsubsub">
|
813 |
-
|
814 |
-
|
815 |
<li>
|
816 |
<a class="segment_choice"
|
817 |
data-segment="<?php echo $id; ?>" href="#segment=<?php echo $id; ?>">
|
818 |
-
|
819 |
</a>
|
820 |
-
|
821 |
</li>
|
822 |
-
|
823 |
</ul>
|
824 |
<br class="clear">
|
825 |
<div class="tab-controls">
|
@@ -828,137 +1044,181 @@ function print_formats_field( $type, $segment = "" ) {
|
|
828 |
<strong><?php _e( 'Actions', 'woo-order-export-lite' ) ?>:</strong>
|
829 |
</span>
|
830 |
<button class='button-secondary add-meta'>
|
831 |
-
|
832 |
</button>
|
833 |
-
<button
|
834 |
-
|
835 |
</button>
|
836 |
</div>
|
837 |
<div class="tab-actions-forms">
|
838 |
<div class='div_meta segment-form all-segments'>
|
839 |
<label for="select_custom_meta_order">
|
840 |
-
|
841 |
</label><br/>
|
842 |
<select id='select_custom_meta_order'>
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
</select>
|
849 |
<div id="custom_meta_order_mode" style="margin-bottom: 10px;">
|
850 |
-
<input style="width: 80%;" type='text' id='text_custom_meta_order'
|
|
|
|
|
851 |
</div>
|
852 |
<div style="margin-bottom: 8px;">
|
853 |
-
<input id="custom_meta_order_mode_used" type="checkbox"
|
|
|
|
|
854 |
</div>
|
855 |
<hr>
|
856 |
-
<div style="margin-top: 20px;"><label for="colname_custom_meta"><?php _e( 'Column name',
|
|
|
|
|
857 |
</div>
|
858 |
<div style="margin-top: 20px;">
|
859 |
-
|
860 |
</div>
|
861 |
<div style="text-align: right;">
|
862 |
-
<button
|
863 |
-
|
|
|
|
|
864 |
</div>
|
865 |
</div>
|
866 |
<div class='div_custom segment-form all-segments'>
|
867 |
<div>
|
868 |
-
<label for="colname_custom_field"><?php _e( 'Column name',
|
|
|
869 |
<input type='text' id='colname_custom_field'/>
|
870 |
</div>
|
871 |
<div>
|
872 |
-
<label for="value_custom_field"><?php _e( 'Value', 'woo-order-export-lite' )
|
|
|
873 |
<input type='text' id='value_custom_field'/>
|
874 |
</div>
|
875 |
<div>
|
876 |
-
|
877 |
</div>
|
878 |
<div style="text-align: right;">
|
879 |
-
<button
|
880 |
-
|
|
|
|
|
881 |
</div>
|
882 |
</div>
|
883 |
-
<div class='div_meta products-segment segment-form products-add-field'
|
884 |
<div id="custom_meta_products_mode" class="hide">
|
885 |
-
<label><input id="custom_meta_products_mode_used" type="checkbox"
|
|
|
|
|
|
|
886 |
</div>
|
887 |
-
<label for="select_custom_meta_products"><?php _e('Product fields',
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
<
|
892 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
893 |
<option></option>
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
</select>
|
900 |
<hr>
|
901 |
<div style="margin-top: 15px;"></div>
|
902 |
-
<label><?php _e('Column name', 'woo-order-export-lite')?>:</label><input
|
|
|
903 |
<div style="margin-top: 15px;"></div>
|
904 |
-
|
905 |
<div style="text-align: right;">
|
906 |
-
<button
|
907 |
-
|
|
|
|
|
|
|
908 |
</div>
|
909 |
</div>
|
910 |
<div class='div_custom products-segment segment-form products-add-static-field'>
|
911 |
<div>
|
912 |
-
<label for="colname_custom_field_products"><?php _e('Column name',
|
|
|
913 |
<input type='text' id='colname_custom_field_products'/>
|
914 |
</div>
|
915 |
<div>
|
916 |
-
<label for="value_custom_field_products"><?php _e('Value',
|
|
|
917 |
<input type='text' id='value_custom_field_products'/>
|
918 |
</div>
|
919 |
<div>
|
920 |
-
|
921 |
</div>
|
922 |
<div style="text-align: right;">
|
923 |
-
<button
|
924 |
-
|
|
|
|
|
|
|
925 |
</div>
|
926 |
</div>
|
927 |
-
<div class='div_meta coupons-segment segment-form coupons-add-field'
|
928 |
-
<label><?php _e('Meta key', 'woo-order-export-lite')?>:</label
|
929 |
-
|
|
|
|
|
|
|
930 |
</div>
|
931 |
<br>
|
932 |
<select id='select_custom_meta_coupons'></select>
|
933 |
-
<input style="width: 80%;margin-bottom: 10px;" type='text' id='text_custom_meta_coupons'
|
|
|
|
|
934 |
<hr>
|
935 |
-
<label><?php _e('Column name', 'woo-order-export-lite')?>:</label><input
|
|
|
936 |
<div style="margin-top: 20px;">
|
937 |
-
|
938 |
</div>
|
939 |
<div style="text-align: right;">
|
940 |
-
<button
|
941 |
-
|
|
|
|
|
|
|
942 |
</div>
|
943 |
</div>
|
944 |
<div class='div_custom coupons-segment segment-form coupons-add-static-field'>
|
945 |
<div>
|
946 |
-
<label for="colname_custom_field_coupons"><?php _e('Column name',
|
|
|
947 |
<input type='text' id='colname_custom_field_coupons'/>
|
948 |
</div>
|
949 |
<div>
|
950 |
-
<label for="value_custom_field_coupons"><?php _e('Value',
|
|
|
951 |
<input type='text' id='value_custom_field_coupons'/>
|
952 |
</div>
|
953 |
<div>
|
954 |
-
|
955 |
</div>
|
956 |
<div style="text-align: right;">
|
957 |
-
<button
|
958 |
-
|
959 |
</button>
|
960 |
-
<button
|
961 |
-
|
962 |
</button>
|
963 |
</div>
|
964 |
</div>
|
@@ -968,59 +1228,78 @@ function print_formats_field( $type, $segment = "" ) {
|
|
968 |
<div id="unselected_fields_list"></div>
|
969 |
|
970 |
|
971 |
-
<!-- <div class="section settings-segment" id="order_segment">-->
|
972 |
-
<!-- <h1>ORDER</h1>-->
|
973 |
-
<!-- </div>-->
|
974 |
-
<!-- <div class="section settings-segment" id="products_segment">-->
|
975 |
-
<!-- <h1>PRODUCT</h1>-->
|
976 |
-
<!-- </div>-->
|
977 |
-
<!-- <div class="section settings-segment" id="coupons_segment">-->
|
978 |
-
<!-- <h1>COUPON</h1>-->
|
979 |
-
<!-- </div>-->
|
980 |
|
981 |
</div>
|
982 |
</div>
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1000 |
<?php } ?>
|
1001 |
-
<?php if ( $show[
|
1002 |
-
|
|
|
|
|
1003 |
<?php } ?>
|
1004 |
<?php if ( $mode === WC_Order_Export_Manage::EXPORT_NOW && $WC_Order_Export::is_full_version() ): ?>
|
1005 |
-
<input type="submit" id='copy-to-profiles' class="button-secondary"
|
|
|
1006 |
<?php endif; ?>
|
1007 |
-
|
1008 |
-
<strong id="output_preview_total"><?php echo sprintf( __( 'Export total: %s orders',
|
|
|
1009 |
<?php _e( 'Preview size', 'woo-order-export-lite' ); ?>
|
1010 |
-
<?php foreach( array( 5, 10, 25, 50 ) as $n ): ?>
|
1011 |
-
|
1012 |
<?php endforeach ?>
|
1013 |
</span>
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
|
|
|
|
|
|
|
|
|
|
1024 |
<?php } ?>
|
1025 |
|
1026 |
</form>
|
@@ -1030,9 +1309,9 @@ function print_formats_field( $type, $segment = "" ) {
|
|
1030 |
<iframe id='export_new_window_frame' width=0 height=0 style='display:none'></iframe>
|
1031 |
|
1032 |
<form id='export_wo_pb_form' method='post' target='export_wo_pb_window'>
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
</form>
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
exit; // Exit if accessed directly
|
4 |
}
|
5 |
/**
|
6 |
* @var WC_Order_Export_Admin $WC_Order_Export WC_Order_Export_Admin instance
|
7 |
+
* @var string $mode ( now | profiles | cron | order-action )
|
8 |
+
* @var integer $id job id
|
9 |
+
* @var string $ajaxurl
|
10 |
+
* @var array $show
|
11 |
*
|
12 |
*/
|
13 |
$settings = WC_Order_Export_Manage::get( $mode, $id );
|
14 |
+
$settings = apply_filters( 'woe_settings_page_prepare', $settings );
|
15 |
$order_custom_meta_fields = WC_Order_Export_Data_Extractor_UI::get_all_order_custom_meta_fields();
|
16 |
+
$readonly_php = WC_Order_Export_Admin::user_can_add_custom_php() ? '' : 'readonly';
|
17 |
|
18 |
function print_formats_field( $type, $segment = "" ) {
|
19 |
if ( ! $type && $type !== 'meta' && $type !== 'field' ) {
|
20 |
+
return '';
|
21 |
+
}
|
22 |
$margin_left = 'meta' == $type ? '1px' : '4px';
|
23 |
+
// colname_custom_field
|
24 |
+
$id = $segment ? 'format_custom_' . $type . '_' . $segment : 'format_custom_' . $type;
|
25 |
|
26 |
$formats_fields_html =
|
27 |
'<label for="' . $id . '">' .
|
28 |
__( 'Field format', 'woo-order-export-lite' ) . ':' .
|
29 |
'</label>' .
|
30 |
+
'<select type="text" id="' . $id . '" style="max-width: 215px; margin-left: ' . $margin_left . '">' .
|
31 |
+
'<option value="" >' . __( '-', 'woo-order-export-lite' ) . '</option>';
|
32 |
|
33 |
foreach ( WC_Order_Export_Data_Extractor_UI::get_format_fields() as $format_id => $format_label ) {
|
34 |
$formats_fields_html .= "<option value='$format_id' >$format_label</option>";
|
39 |
}
|
40 |
|
41 |
|
|
|
42 |
?>
|
43 |
|
44 |
<script>
|
45 |
var mode = '<?php echo $mode ?>';
|
46 |
var job_id = '<?php echo $id ?>';
|
47 |
+
var output_format = '<?php echo $settings['format'] ?>';
|
48 |
+
var selected_order_fields = <?php echo json_encode( $settings['order_fields'] ) ?>;
|
49 |
+
var selected_order_products_fields = <?php echo json_encode( $settings['order_product_fields'] ) ?>;
|
50 |
+
var selected_order_coupons_fields = <?php echo json_encode( $settings['order_coupon_fields'] ) ?>;
|
51 |
+
var duplicated_fields_settings = <?php echo json_encode( $settings['duplicated_fields_settings'] ) ?>;
|
52 |
+
var all_fields = <?php echo json_encode( WC_Order_Export_Manage::make_all_fields( $settings['format'] ) ); ?>;
|
53 |
var order_custom_meta_fields = <?php echo json_encode( $order_custom_meta_fields ) ?>;
|
54 |
var order_products_custom_meta_fields = <?php echo json_encode( WC_Order_Export_Data_Extractor_UI::get_product_custom_fields() ) ?>;
|
55 |
var order_order_item_custom_meta_fields = <?php echo json_encode( WC_Order_Export_Data_Extractor_UI::get_product_itemmeta() ) ?>;
|
62 |
|
63 |
<form method="post" id="export_job_settings">
|
64 |
<?php if ( $mode !== WC_Order_Export_Manage::EXPORT_NOW ): ?>
|
65 |
+
<div style="width: 100%;"> </div>
|
66 |
<?php endif; ?>
|
67 |
|
68 |
+
<div id="my-left" style="float: left; width: 49%; max-width: 500px;">
|
69 |
<?php
|
70 |
+
if ( $mode === WC_Order_Export_Manage::EXPORT_PROFILE ):
|
71 |
+
include 'pro-version/top-profile.php';
|
72 |
+
elseif ( $mode === WC_Order_Export_Manage::EXPORT_ORDER_ACTION ):
|
73 |
+
include 'pro-version/top-order-actions.php';
|
74 |
+
elseif ( $mode === WC_Order_Export_Manage::EXPORT_SCHEDULE ):
|
75 |
+
include 'pro-version/top-scheduled-jobs.php';
|
76 |
+
endif;
|
77 |
?>
|
78 |
|
79 |
+
<input type="hidden" name="settings[version]"
|
80 |
+
value="<?php echo isset( $settings['version'] ) ? $settings['version'] : '2.0' ?>">
|
81 |
|
82 |
+
<?php if ( $show['date_filter'] ) : ?>
|
83 |
+
<div id="my-export-date-field" class="my-block">
|
84 |
+
<div class="wc-oe-header">
|
85 |
<?php _e( 'Filter orders by', 'woo-order-export-lite' ) ?>:
|
86 |
+
</div>
|
87 |
+
<label>
|
88 |
+
<input type="radio" name="settings[export_rule_field]"
|
89 |
+
class="width-100" <?php echo ( ! isset( $settings['export_rule_field'] ) || ( $settings['export_rule_field'] == 'date' ) ) ? 'checked' : '' ?>
|
90 |
+
value="date">
|
91 |
<?php _e( 'Order Date', 'woo-order-export-lite' ) ?>
|
92 |
+
</label>
|
93 |
+
		
|
94 |
+
<label>
|
95 |
+
<input type="radio" name="settings[export_rule_field]"
|
96 |
+
class="width-100" <?php echo ( isset( $settings['export_rule_field'] ) && ( $settings['export_rule_field'] == 'modified' ) ) ? 'checked' : '' ?>
|
97 |
+
value="modified">
|
98 |
<?php _e( 'Modification Date', 'woo-order-export-lite' ) ?>
|
99 |
+
</label>
|
100 |
+
		
|
101 |
+
<label>
|
102 |
+
<input type="radio" name="settings[export_rule_field]"
|
103 |
+
class="width-100" <?php echo ( isset( $settings['export_rule_field'] ) && ( $settings['export_rule_field'] == 'date_paid' ) ) ? 'checked' : '' ?>
|
104 |
+
value="date_paid">
|
105 |
<?php _e( 'Paid Date', 'woo-order-export-lite' ) ?>
|
106 |
+
</label>
|
107 |
+
		
|
108 |
+
<label>
|
109 |
+
<input type="radio" name="settings[export_rule_field]"
|
110 |
+
class="width-100" <?php echo ( isset( $settings['export_rule_field'] ) && ( $settings['export_rule_field'] == 'date_completed' ) ) ? 'checked' : '' ?>
|
111 |
+
value="date_completed">
|
112 |
<?php _e( 'Completed Date', 'woo-order-export-lite' ) ?>
|
113 |
+
</label>
|
114 |
+
</div>
|
115 |
+
<br>
|
116 |
+
<div id="my-date-filter" class="my-block"
|
117 |
+
title="<?php _e( 'This date range should not be saved in the scheduled task',
|
118 |
+
'woo-order-export-lite' ) ?>">
|
119 |
+
<div style="display: inline;">
|
120 |
+
<span class="wc-oe-header"><?php _e( 'Date range', 'woo-order-export-lite' ) ?></span>
|
121 |
+
<input type=text class='date' name="settings[from_date]" id="from_date"
|
122 |
+
value='<?php echo $settings['from_date'] ?>'>
|
123 |
<?php _e( 'to', 'woo-order-export-lite' ) ?>
|
124 |
+
<input type=text class='date' name="settings[to_date]" id="to_date"
|
125 |
+
value='<?php echo $settings['to_date'] ?>'>
|
126 |
+
</div>
|
127 |
+
|
128 |
+
<button id="my-quick-export-btn" class="button-primary"><?php _e( 'Express export',
|
129 |
+
'woo-order-export-lite' ) ?></button>
|
130 |
+
<div id="summary_report_by_products" style="display:inline-block"><input type="hidden"
|
131 |
+
name="settings[summary_report_by_products]"
|
132 |
+
value="0"/><label><input
|
133 |
+
type="checkbox" id=summary_report_by_products_checkbox
|
134 |
+
name="settings[summary_report_by_products]"
|
135 |
+
value="1" <?php checked( $settings['summary_report_by_products'] ) ?> /> <?php _e( "Summary Report By Products",
|
136 |
+
'woo-order-export-lite' ) ?></label>
|
137 |
+
</div>
|
138 |
+
</div>
|
139 |
+
<br>
|
140 |
<?php endif; ?>
|
141 |
|
142 |
+
<div id="my-export-file" class="my-block">
|
143 |
+
<div class="wc-oe-header">
|
144 |
+
<?php _e( 'Export filename', 'woo-order-export-lite' ) ?>:
|
145 |
+
</div>
|
146 |
+
<label id="export_filename" class="width-100">
|
147 |
+
<input type="text" name="settings[export_filename]" class="width-100"
|
148 |
+
value="<?php echo isset( $settings['export_filename'] ) ? $settings['export_filename'] : 'orders-%y-%m-%d-%h-%i-%s.xlsx' ?>">
|
149 |
+
</label>
|
150 |
+
</div>
|
151 |
+
<br>
|
152 |
|
153 |
|
154 |
+
<div id="my-format" class="my-block">
|
155 |
+
<span class="wc-oe-header"><?php _e( 'Format', 'woo-order-export-lite' ) ?></span><br>
|
156 |
+
<p>
|
157 |
<?php foreach ( WC_Order_Export_Admin::$formats as $format ) { ?>
|
158 |
+
<label class="button-secondary">
|
159 |
+
<input type=radio name="settings[format]" class="output_format" value="<?php echo $format ?>"
|
160 |
+
<?php if ( $format == $settings['format'] ) {
|
161 |
+
echo 'checked';
|
162 |
+
} ?> ><?php echo $format ?>
|
163 |
+
<span class="ui-icon ui-icon-triangle-1-s my-icon-triangle"></span>
|
164 |
+
</label>
|
165 |
<?php } ?>
|
166 |
+
</p>
|
167 |
+
|
168 |
+
<div id='XLS_options' style='display:none'><strong><?php _e( 'XLS options',
|
169 |
+
'woo-order-export-lite' ) ?></strong><br>
|
170 |
+
<input type=hidden name="settings[format_xls_use_xls_format]" value=0>
|
171 |
+
<input type=hidden name="settings[format_xls_display_column_names]" value=0>
|
172 |
+
<input type=hidden name="settings[format_xls_auto_width]" value=0>
|
173 |
+
<input type=hidden name="settings[format_xls_direction_rtl]" value=0>
|
174 |
+
<input type=checkbox name="settings[format_xls_use_xls_format]"
|
175 |
+
value=1 <?php if ( @$settings['format_xls_use_xls_format'] ) {
|
176 |
+
echo 'checked';
|
177 |
+
} ?> id="format_xls_use_xls_format"> <?php _e( 'Export as .xls (Binary File Format)',
|
178 |
+
'woo-order-export-lite' ) ?><br>
|
179 |
+
<input type=checkbox checked disabled><?php _e( 'Use sheet name', 'woo-order-export-lite' ) ?></b>
|
180 |
+
<input type=text name="settings[format_xls_sheet_name]"
|
181 |
+
value='<?php echo $settings['format_xls_sheet_name'] ?>' size=10><br>
|
182 |
+
<input type=checkbox name="settings[format_xls_display_column_names]"
|
183 |
+
value=1 <?php if ( @$settings['format_xls_display_column_names'] ) {
|
184 |
+
echo 'checked';
|
185 |
+
} ?> > <?php _e( 'Output column titles as first line', 'woo-order-export-lite' ) ?><br>
|
186 |
+
<input type=checkbox name="settings[format_xls_auto_width]"
|
187 |
+
value=1 <?php if ( @$settings['format_xls_auto_width'] ) {
|
188 |
+
echo 'checked';
|
189 |
+
} ?> > <?php _e( 'Auto column width', 'woo-order-export-lite' ) ?><br>
|
190 |
+
<input type=checkbox name="settings[format_xls_direction_rtl]"
|
191 |
+
value=1 <?php if ( @$settings['format_xls_direction_rtl'] ) {
|
192 |
+
echo 'checked';
|
193 |
+
} ?> > <?php _e( 'Right-to-Left direction', 'woo-order-export-lite' ) ?><br>
|
194 |
+
</div>
|
195 |
+
<div id='CSV_options' style='display:none'><strong><?php _e( 'CSV options',
|
196 |
+
'woo-order-export-lite' ) ?></strong><br>
|
197 |
+
<input type=hidden name="settings[format_csv_add_utf8_bom]" value=0>
|
198 |
+
<input type=hidden name="settings[format_csv_display_column_names]" value=0>
|
199 |
+
<input type=hidden name="settings[format_csv_delete_linebreaks]" value=0>
|
200 |
+
<input type=hidden name="settings[format_csv_item_rows_start_from_new_line]" value=0>
|
201 |
+
<input type=checkbox name="settings[format_csv_add_utf8_bom]"
|
202 |
+
value=1 <?php if ( @$settings['format_csv_add_utf8_bom'] ) {
|
203 |
+
echo 'checked';
|
204 |
+
} ?> > <?php _e( 'Output UTF-8 BOM', 'woo-order-export-lite' ) ?><br>
|
205 |
+
<input type=checkbox name="settings[format_csv_display_column_names]"
|
206 |
+
value=1 <?php if ( @$settings['format_csv_display_column_names'] ) {
|
207 |
+
echo 'checked';
|
208 |
+
} ?> > <?php _e( 'Output column titles as first line', 'woo-order-export-lite' ) ?><br>
|
209 |
+
<input type=checkbox name="settings[format_csv_delete_linebreaks]"
|
210 |
+
value=1 <?php if ( @$settings['format_csv_delete_linebreaks'] ) {
|
211 |
+
echo 'checked';
|
212 |
+
} ?> > <?php _e( 'Convert line breaks to literals', 'woo-order-export-lite' ) ?><br>
|
213 |
+
<input type=checkbox name="settings[format_csv_item_rows_start_from_new_line]"
|
214 |
+
value=1 <?php if ( @$settings['format_csv_item_rows_start_from_new_line'] ) {
|
215 |
+
echo 'checked';
|
216 |
+
} ?> > <?php _e( 'Item rows start from new line', 'woo-order-export-lite' ) ?><br>
|
217 |
+
<?php _e( 'Enclosure', 'woo-order-export-lite' ) ?> <input type=text
|
218 |
+
name="settings[format_csv_enclosure]"
|
219 |
+
value='<?php echo $settings['format_csv_enclosure'] ?>'
|
220 |
+
size=1>
|
221 |
+
<?php _e( 'Field Delimiter', 'woo-order-export-lite' ) ?> <input type=text
|
222 |
+
name="settings[format_csv_delimiter]"
|
223 |
+
value='<?php echo $settings['format_csv_delimiter'] ?>'
|
224 |
+
size=1>
|
225 |
+
<?php _e( 'Line Break', 'woo-order-export-lite' ) ?><input type=text
|
226 |
+
name="settings[format_csv_linebreak]"
|
227 |
+
value='<?php echo $settings['format_csv_linebreak'] ?>'
|
228 |
+
size=4><br>
|
229 |
<?php if ( function_exists( 'iconv' ) ): ?>
|
230 |
+
<?php _e( 'Character encoding', 'woo-order-export-lite' ) ?><input type=text
|
231 |
+
name="settings[format_csv_encoding]"
|
232 |
+
value="<?php echo $settings['format_csv_encoding'] ?>">
|
233 |
+
<br>
|
234 |
<?php endif ?>
|
235 |
+
</div>
|
236 |
+
<div id='XML_options' style='display:none'><strong><?php _e( 'XML options',
|
237 |
+
'woo-order-export-lite' ) ?></strong><br>
|
238 |
+
<?php if( !class_exists("XMLWriter") ): ?>
|
239 |
+
<div style="color:red"><?php _e( 'Please, install/enable PHP XML Extension!','woo-order-export-lite' ) ?></div>
|
240 |
+
<?php endif ?>
|
241 |
+
<input type=hidden name="settings[format_xml_self_closing_tags]" value=0>
|
242 |
+
<span class="xml-title"><?php _e( 'Prepend XML', 'woo-order-export-lite' ) ?></span><input type=text
|
243 |
+
name="settings[format_xml_prepend_raw_xml]"
|
244 |
+
value='<?php echo $settings['format_xml_prepend_raw_xml'] ?>'><br>
|
245 |
+
<span class="xml-title"><?php _e( 'Root tag', 'woo-order-export-lite' ) ?></span><input type=text
|
246 |
+
name="settings[format_xml_root_tag]"
|
247 |
+
value='<?php echo $settings['format_xml_root_tag'] ?>'><br>
|
248 |
+
<span class="xml-title"><?php _e( 'Order tag', 'woo-order-export-lite' ) ?></span><input type=text
|
249 |
+
name="settings[format_xml_order_tag]"
|
250 |
+
value='<?php echo $settings['format_xml_order_tag'] ?>'><br>
|
251 |
+
<span class="xml-title"><?php _e( 'Product tag', 'woo-order-export-lite' ) ?></span><input type=text
|
252 |
+
name="settings[format_xml_product_tag]"
|
253 |
+
value='<?php echo $settings['format_xml_product_tag'] ?>'><br>
|
254 |
+
<span class="xml-title"><?php _e( 'Coupon tag', 'woo-order-export-lite' ) ?></span><input type=text
|
255 |
+
name="settings[format_xml_coupon_tag]"
|
256 |
+
value='<?php echo $settings['format_xml_coupon_tag'] ?>'><br>
|
257 |
+
<span class="xml-title"><?php _e( 'Append XML', 'woo-order-export-lite' ) ?></span><input type=text
|
258 |
+
name="settings[format_xml_append_raw_xml]"
|
259 |
+
value='<?php echo $settings['format_xml_append_raw_xml'] ?>'><br>
|
260 |
+
<span class="xml-title"><?php _e( 'Self closing tags', 'woo-order-export-lite' ) ?></span><input
|
261 |
+
type=checkbox name="settings[format_xml_self_closing_tags]"
|
262 |
+
value=1 <?php if ( @$settings['format_xml_self_closing_tags'] ) {
|
263 |
+
echo 'checked';
|
264 |
+
} ?> ><br>
|
265 |
+
</div>
|
266 |
+
<div id='JSON_options' style='display:none'><strong><?php _e( 'JSON options',
|
267 |
+
'woo-order-export-lite' ) ?></strong><br>
|
268 |
+
<span class="xml-title"><?php _e( 'Start tag', 'woo-order-export-lite' ) ?></span><input type=text
|
269 |
+
name="settings[format_json_start_tag]"
|
270 |
+
value='<?php echo @$settings['format_json_start_tag'] ?>'><br>
|
271 |
+
<span class="xml-title"><?php _e( 'End tag', 'woo-order-export-lite' ) ?></span><input type=text
|
272 |
+
name="settings[format_json_end_tag]"
|
273 |
+
value='<?php echo @$settings['format_json_end_tag'] ?>'>
|
274 |
+
</div>
|
275 |
+
<div id='TSV_options' style='display:none'><strong><?php _e( 'TSV options',
|
276 |
+
'woo-order-export-lite' ) ?></strong><br>
|
277 |
<input type=hidden name="settings[format_tsv_add_utf8_bom]" value=0>
|
278 |
<input type=hidden name="settings[format_tsv_display_column_names]" value=0>
|
279 |
+
<input type=checkbox name="settings[format_tsv_add_utf8_bom]"
|
280 |
+
value=1 <?php if ( @$settings['format_tsv_add_utf8_bom'] ) {
|
281 |
+
echo 'checked';
|
282 |
+
} ?> > <?php _e( 'Output UTF-8 BOM', 'woo-order-export-lite' ) ?><br>
|
283 |
+
<input type=checkbox name="settings[format_tsv_display_column_names]"
|
284 |
+
value=1 <?php if ( @$settings['format_tsv_display_column_names'] ) {
|
285 |
+
echo 'checked';
|
286 |
+
} ?> > <?php _e( 'Output column titles as first line', 'woo-order-export-lite' ) ?><br>
|
287 |
+
<?php _e( 'Line Break', 'woo-order-export-lite' ) ?><input type=text
|
288 |
+
name="settings[format_tsv_linebreak]"
|
289 |
+
value='<?php echo $settings['format_tsv_linebreak'] ?>'
|
290 |
+
size=4><br>
|
291 |
<?php if ( function_exists( 'iconv' ) ): ?>
|
292 |
+
<?php _e( 'Character encoding', 'woo-order-export-lite' ) ?><input type=text
|
293 |
+
name="settings[format_tsv_encoding]"
|
294 |
+
value="<?php echo $settings['format_tsv_encoding'] ?>">
|
295 |
+
<br>
|
296 |
<?php endif ?>
|
297 |
</div>
|
298 |
|
299 |
+
<br>
|
300 |
+
<div id="my-date-time-format" class="">
|
301 |
+
<div id="date_format_block">
|
302 |
+
<span class="wc-oe-header"><?php _e( 'Date', 'woo-order-export-lite' ) ?></span>
|
303 |
<?php
|
304 |
$date_format = array(
|
305 |
+
'',
|
306 |
+
'F j, Y',
|
307 |
+
'Y-m-d',
|
308 |
+
'm/d/Y',
|
309 |
+
'd/m/Y',
|
310 |
);
|
311 |
$date_format = apply_filters( 'woe_date_format', $date_format );
|
312 |
?>
|
313 |
+
<select>
|
314 |
+
<?php foreach ( $date_format as $format ): ?>
|
315 |
+
<option value="<?php echo $format ?>" <?php echo selected( @$settings['date_format'],
|
316 |
+
$format ) ?> ><?php echo ! empty( $format ) ? current_time( $format ) : __( '-',
|
317 |
+
'woo-order-export-lite' ) ?></option>
|
318 |
<?php endforeach; ?>
|
319 |
+
<option value="custom" <?php echo selected( in_array( @$settings['date_format'], $date_format ),
|
320 |
+
false ) ?> ><?php echo __( 'custom', 'woo-order-export-lite' ) ?></option>
|
321 |
+
</select>
|
322 |
+
<div id="custom_date_format_block" style="<?php echo in_array( @$settings['date_format'],
|
323 |
+
$date_format ) ? 'display: none' : '' ?>">
|
324 |
+
<input type="text" name="settings[date_format]" value="<?php echo $settings['date_format'] ?>">
|
325 |
+
</div>
|
326 |
+
</div>
|
327 |
+
|
328 |
+
<div id="time_format_block">
|
329 |
+
<span class="wc-oe-header"><?php _e( 'Time', 'woo-order-export-lite' ) ?></span>
|
330 |
<?php
|
331 |
$time_format = array(
|
332 |
+
'',
|
333 |
+
'g:i a',
|
334 |
+
'g:i A',
|
335 |
+
'H:i',
|
336 |
);
|
337 |
$time_format = apply_filters( 'woe_time_format', $time_format );
|
338 |
?>
|
339 |
+
<select>
|
340 |
+
<?php foreach ( $time_format as $format ): ?>
|
341 |
+
<option value="<?php echo $format ?>" <?php echo selected( @$settings['time_format'],
|
342 |
+
$format ) ?> ><?php echo ! empty( $format ) ? current_time( $format ) : __( '-',
|
343 |
+
'woo-order-export-lite' ) ?></option>
|
344 |
<?php endforeach; ?>
|
345 |
+
<option value="custom" <?php echo selected( in_array( @$settings['time_format'], $time_format ),
|
346 |
+
false ) ?> ><?php echo __( 'custom', 'woo-order-export-lite' ) ?></option>
|
347 |
+
</select>
|
348 |
+
<div id="custom_time_format_block" style="<?php echo in_array( @$settings['time_format'],
|
349 |
+
$time_format ) ? 'display: none' : '' ?>">
|
350 |
+
<input type="text" name="settings[time_format]" value="<?php echo $settings['time_format'] ?>">
|
351 |
+
</div>
|
352 |
+
</div>
|
353 |
+
</div>
|
354 |
+
</div>
|
355 |
+
<br/>
|
356 |
+
<div id="my-sort" class="my-block">
|
357 |
<?php
|
358 |
$sort = array(
|
359 |
'order_id' => __( 'Order ID', 'woo-order-export-lite' ),
|
363 |
ob_start();
|
364 |
?>
|
365 |
<select name="settings[sort]">
|
366 |
+
<?php foreach ( $sort as $value => $text ): ?>
|
367 |
+
<option value='<?php echo $value ?>' <?php echo selected( @$settings['sort'],
|
368 |
+
$value ) ?> ><?php echo $text; ?></option>
|
369 |
<?php endforeach; ?>
|
370 |
</select>
|
371 |
+
<?php
|
372 |
+
$sort_html = ob_get_clean();
|
373 |
|
374 |
ob_start();
|
375 |
?>
|
376 |
<select name="settings[sort_direction]">
|
377 |
+
<option value='DESC' <?php echo selected( @$settings['sort_direction'],
|
378 |
+
'DESC' ) ?> ><?php _e( 'Descending', 'woo-order-export-lite' ) ?></option>
|
379 |
+
<option value='ASC' <?php echo selected( @$settings['sort_direction'],
|
380 |
+
'ASC' ) ?> ><?php _e( 'Ascending', 'woo-order-export-lite' ) ?></option>
|
381 |
</select>
|
382 |
+
<?php
|
383 |
+
$sort_direction_html = ob_get_clean();
|
384 |
|
385 |
+
echo sprintf( __( 'Sort orders by %s in %s order', 'woo-order-export-lite' ), $sort_html,
|
386 |
+
$sort_direction_html );
|
387 |
+
?>
|
388 |
|
389 |
<?php if ( $mode === WC_Order_Export_Manage::EXPORT_SCHEDULE ): ?>
|
390 |
<div>
|
391 |
+
<label for="change_order_status_to"><?php _e( 'Change order status to',
|
392 |
+
'woo-order-export-lite' ) ?></label>
|
393 |
<select id="change_order_status_to" name="settings[change_order_status_to]">
|
394 |
+
<option value="" <?php if ( empty( $settings['change_order_status_to'] ) ) {
|
395 |
+
echo 'selected';
|
396 |
+
} ?>><?php _e( "- don't modify -", 'woo-order-export-lite' ) ?></option>
|
397 |
+
<?php foreach ( wc_get_order_statuses() as $i => $status ) { ?>
|
398 |
+
<option value="<?php echo $i ?>" <?php if ( $i === $settings['change_order_status_to'] ) {
|
399 |
+
echo 'selected';
|
400 |
+
} ?>><?php echo $status ?></option>
|
401 |
+
<?php } ?>
|
402 |
</select>
|
403 |
</div>
|
404 |
<?php endif; ?>
|
405 |
+
</div>
|
406 |
<br>
|
407 |
<div class="my-block">
|
408 |
<span class="my-hide-next "><?php _e( 'Misc settings', 'woo-order-export-lite' ) ?>
|
410 |
<div id="my-misc" hidden="hidden">
|
411 |
<div>
|
412 |
<input type="hidden" name="settings[format_number_fields]" value="0"/>
|
413 |
+
<label><input type="checkbox" name="settings[format_number_fields]"
|
414 |
+
value="1" <?php checked( $settings['format_number_fields'] ) ?>/><?php _e( 'Format numbers (use WC decimal separator)',
|
415 |
+
'woo-order-export-lite' ) ?></label>
|
416 |
</div>
|
417 |
<div>
|
418 |
<input type="hidden" name="settings[export_all_comments]" value="0"/>
|
419 |
+
<label><input type="checkbox" name="settings[export_all_comments]"
|
420 |
+
value="1" <?php checked( $settings['export_all_comments'] ) ?>/><?php _e( 'Export all order notes',
|
421 |
+
'woo-order-export-lite' ) ?></label>
|
422 |
</div>
|
423 |
<div>
|
424 |
<input type="hidden" name="settings[export_refund_notes]" value="0"/>
|
425 |
+
<label><input type="checkbox" name="settings[export_refund_notes]"
|
426 |
+
value="1" <?php checked( $settings['export_refund_notes'] ) ?>/><?php _e( 'Export refund notes as Customer Note',
|
427 |
+
'woo-order-export-lite' ) ?></label>
|
428 |
</div>
|
429 |
<div>
|
430 |
<input type="hidden" name="settings[strip_tags_product_fields]" value="0"/>
|
431 |
+
<label><input type="checkbox" name="settings[strip_tags_product_fields]"
|
432 |
+
value="1" <?php checked( $settings['strip_tags_product_fields'] ) ?>/><?php _e( 'Strip tags from Product Description/Variation',
|
433 |
+
'woo-order-export-lite' ) ?></label>
|
434 |
</div>
|
435 |
<div>
|
436 |
<input type="hidden" name="settings[cleanup_phone]" value="0"/>
|
437 |
+
<label><input type="checkbox" name="settings[cleanup_phone]"
|
438 |
+
value="1" <?php checked( $settings['cleanup_phone'] ) ?>/><?php _e( 'Cleanup phone (export only digits)',
|
439 |
+
'woo-order-export-lite' ) ?></label>
|
440 |
</div>
|
441 |
<div>
|
442 |
<input type="hidden" name="settings[enable_debug]" value="0"/>
|
443 |
+
<label><input type="checkbox" name="settings[enable_debug]"
|
444 |
+
value="1" <?php checked( $settings['enable_debug'] ) ?>/><?php _e( 'Enable debug output',
|
445 |
+
'woo-order-export-lite' ) ?></label>
|
446 |
</div>
|
447 |
+
<div>
|
448 |
<input type="hidden" name="settings[custom_php]" value="0"/>
|
449 |
+
<label><input type="checkbox" name="settings[custom_php]"
|
450 |
+
value="1" <?php checked( $settings['custom_php'] ) ?>/><?php _e( 'Custom PHP code to modify output',
|
451 |
+
'woo-order-export-lite' ) ?></label>
|
452 |
<div id="custom_php_code_textarea" <?php echo $settings['custom_php'] ? '' : 'style="display: none"' ?>>
|
453 |
+
<?php if ( $readonly_php == 'readonly' ): ?>
|
454 |
+
<strong>
|
455 |
+
<?php _e( 'Please check permissions for your role. You must have capability “edit_themes” to use this box.',
|
456 |
+
'woo-order-export-lite' ); ?>
|
457 |
+
</strong>
|
458 |
+
<?php endif; ?>
|
459 |
+
<textarea placeholder="<?php _e( 'Use only unnamed functions!', 'woo-order-export-lite' ) ?>"
|
460 |
+
name="settings[custom_php_code]" <?php echo $readonly_php ?> class="width-100"
|
461 |
+
rows="10"><?php echo $settings['custom_php_code'] ?></textarea>
|
462 |
</div>
|
463 |
+
</div>
|
464 |
</div>
|
465 |
</div>
|
466 |
+
</div>
|
467 |
|
468 |
+
<div id="my-right" style="float: left; width: 48%; margin: 0px 10px; max-width: 500px;">
|
469 |
<?php
|
470 |
+
if ( in_array( $mode,
|
471 |
+
array( WC_Order_Export_Manage::EXPORT_SCHEDULE, WC_Order_Export_Manage::EXPORT_ORDER_ACTION ) ) ):
|
472 |
include "pro-version/destinations.php";
|
473 |
endif; ?>
|
474 |
|
475 |
+
<div class="my-block">
|
476 |
<span class="my-hide-next "><?php _e( 'Filter by order', 'woo-order-export-lite' ) ?>
|
477 |
+
<span class="ui-icon ui-icon-triangle-1-s my-icon-triangle"></span></span>
|
478 |
+
<div id="my-order" hidden="hidden">
|
479 |
+
<div><input type="hidden" name="settings[skip_suborders]" value="0"/><label><input type="checkbox"
|
480 |
+
name="settings[skip_suborders]"
|
481 |
+
value="1" <?php checked( $settings['skip_suborders'] ) ?> /> <?php _e( "Don't export child orders",
|
482 |
+
'woo-order-export-lite' ) ?></label></div>
|
483 |
+
<div><input type="hidden" name="settings[export_refunds]" value="0"/><label><input type="checkbox"
|
484 |
+
name="settings[export_refunds]"
|
485 |
+
value="1" <?php checked( $settings['export_refunds'] ) ?> /> <?php _e( "Export refunds",
|
486 |
+
'woo-order-export-lite' ) ?></label></div>
|
487 |
+
<div><input type="hidden" name="settings[mark_exported_orders]" value="0"/><label><input type="checkbox"
|
488 |
+
name="settings[mark_exported_orders]"
|
489 |
+
value="1" <?php checked( $settings['mark_exported_orders'] ) ?> /> <?php _e( "Mark exported orders",
|
490 |
+
'woo-order-export-lite' ) ?></label></div>
|
491 |
+
<div><input type="hidden" name="settings[export_unmarked_orders]" value="0"/><label><input
|
492 |
+
type="checkbox" name="settings[export_unmarked_orders]"
|
493 |
+
value="1" <?php checked( $settings['export_unmarked_orders'] ) ?> /> <?php _e( "Export unmarked orders only",
|
494 |
+
'woo-order-export-lite' ) ?></label></div>
|
495 |
+
<span class="wc-oe-header"><?php _e( 'Order statuses', 'woo-order-export-lite' ) ?></span>
|
496 |
+
<select id="statuses" name="settings[statuses][]" multiple="multiple"
|
497 |
+
style="width: 100%; max-width: 25%;">
|
498 |
+
<?php foreach (
|
499 |
+
apply_filters( 'woe_settings_order_statuses', wc_get_order_statuses() ) as $i => $status
|
500 |
+
) { ?>
|
501 |
+
<option value="<?php echo $i ?>" <?php if ( in_array( $i, $settings['statuses'] ) ) {
|
502 |
+
echo 'selected';
|
503 |
+
} ?>><?php echo $status ?></option>
|
504 |
<?php } ?>
|
505 |
+
</select>
|
506 |
|
507 |
+
<span class="wc-oe-header"><?php _e( 'Custom fields', 'woo-order-export-lite' ) ?></span>
|
508 |
+
<br>
|
509 |
+
<select id="custom_fields" style="width: auto;">
|
510 |
<?php foreach ( WC_Order_Export_Data_Extractor_UI::get_order_custom_fields() as $cf_name ) { ?>
|
511 |
+
<option><?php echo $cf_name; ?></option>
|
512 |
<?php } ?>
|
513 |
+
</select>
|
514 |
+
|
515 |
+
<select id="custom_fields_compare" class="select_compare">
|
516 |
+
<option>=</option>
|
517 |
+
<option><></option>
|
518 |
+
<option>LIKE</option>
|
519 |
+
<option>></option>
|
520 |
+
<option>>=</option>
|
521 |
+
<option><</option>
|
522 |
+
<option><=</option>
|
523 |
+
<option>NOT SET</option>
|
524 |
+
<option>IS SET</option>
|
525 |
+
</select>
|
526 |
+
|
527 |
+
<input type="text" id="text_custom_fields" disabled class="like-input" style="display: none;">
|
528 |
+
|
529 |
+
<button id="add_custom_fields" class="button-secondary"><span
|
530 |
+
class="dashicons dashicons-plus-alt"></span></button>
|
531 |
+
<br>
|
532 |
+
<select id="custom_fields_check" multiple name="settings[order_custom_fields][]"
|
533 |
+
style="width: 100%; max-width: 25%;">
|
534 |
<?php
|
535 |
+
if ( $settings['order_custom_fields'] ) {
|
536 |
+
foreach ( $settings['order_custom_fields'] as $prod ) {
|
537 |
?>
|
538 |
+
<option selected value="<?php echo $prod; ?>"> <?php echo $prod; ?></option>
|
539 |
+
<?php }
|
540 |
+
} ?>
|
541 |
+
</select>
|
542 |
+
|
543 |
+
</div>
|
544 |
+
</div>
|
545 |
+
|
546 |
+
<br>
|
547 |
+
|
548 |
+
<div class="my-block">
|
549 |
+
<div id=select2_warning
|
550 |
+
style='display:none;color:red;font-size: 120%;'><?php _e( "The filters won't work correctly.<br>Another plugin(or theme) has loaded outdated Select2.js",
|
551 |
+
'woo-order-export-lite' ) ?></div>
|
552 |
+
<span class="my-hide-next "><?php _e( 'Filter by product', 'woo-order-export-lite' ) ?>
|
553 |
+
<span class="ui-icon ui-icon-triangle-1-s my-icon-triangle"></span></span>
|
554 |
+
<div id="my-products" hidden="hidden">
|
555 |
+
<div><input type="hidden" name="settings[all_products_from_order]" value="0"/><label><input
|
556 |
+
type="checkbox" name="settings[all_products_from_order]"
|
557 |
+
value="1" <?php checked( $settings['all_products_from_order'] ) ?> /> <?php _e( 'Export all products from the order',
|
558 |
+
'woo-order-export-lite' ) ?></label></div>
|
559 |
+
<div><input type="hidden" name="settings[skip_refunded_items]" value="0"/><label><input type="checkbox"
|
560 |
+
name="settings[skip_refunded_items]"
|
561 |
+
value="1" <?php checked( $settings['skip_refunded_items'] ) ?> /> <?php _e( 'Skip fully refunded items',
|
562 |
+
'woo-order-export-lite' ) ?></label></div>
|
563 |
+
<span class="wc-oe-header"><?php _e( 'Product categories', 'woo-order-export-lite' ) ?></span>
|
564 |
+
<select id="product_categories" name="settings[product_categories][]" multiple="multiple"
|
565 |
+
style="width: 100%; max-width: 25%;">
|
566 |
<?php
|
567 |
+
if ( $settings['product_categories'] ) {
|
568 |
+
foreach ( $settings['product_categories'] as $cat ) {
|
569 |
$cat_term = get_term( $cat, 'product_cat' );
|
570 |
+
if ( $cat_term ) {
|
571 |
+
?>
|
572 |
+
<option selected
|
573 |
+
value="<?php echo $cat_term->term_id ?>"> <?php echo $cat_term->name; ?></option>
|
574 |
<?php
|
575 |
+
}
|
576 |
?>
|
577 |
+
<?php }
|
578 |
+
} ?>
|
579 |
+
</select>
|
580 |
+
<span class="wc-oe-header"><?php _e( 'Vendor/creator', 'woo-order-export-lite' ) ?></span>
|
581 |
+
<select id="product_vendors" name="settings[product_vendors][]" multiple="multiple"
|
582 |
+
style="width: 100%; max-width: 25%;">
|
583 |
<?php
|
584 |
+
if ( $settings['product_vendors'] ) {
|
585 |
+
foreach ( $settings['product_vendors'] as $user_id ) {
|
586 |
$user = get_user_by( 'id', $user_id );
|
587 |
?>
|
588 |
+
<option selected value="<?php echo $user_id ?>"> <?php echo $user->display_name; ?></option>
|
589 |
+
<?php }
|
590 |
+
} ?>
|
591 |
+
</select>
|
592 |
|
593 |
+
<?php do_action( "woe_settings_filter_by_product_after_vendors", $settings ); ?>
|
594 |
|
595 |
+
<span class="wc-oe-header"><?php _e( 'Product', 'woo-order-export-lite' ) ?></span>
|
596 |
|
597 |
+
<select id="products" name="settings[products][]" multiple="multiple"
|
598 |
+
style="width: 100%; max-width: 25%;">
|
599 |
<?php
|
600 |
+
if ( $settings['products'] ) {
|
601 |
+
foreach ( $settings['products'] as $prod ) {
|
602 |
$p = get_the_title( $prod );
|
603 |
?>
|
604 |
+
<option selected value="<?php echo $prod ?>"> <?php echo $p; ?></option>
|
605 |
+
<?php }
|
606 |
+
} ?>
|
607 |
+
</select>
|
608 |
|
609 |
+
<span class="wc-oe-header"><?php _e( 'Product taxonomies', 'woo-order-export-lite' ) ?></span>
|
610 |
+
<br>
|
611 |
+
<select id="taxonomies" style="width: auto;">
|
612 |
<?php foreach ( WC_Order_Export_Data_Extractor_UI::get_product_taxonomies() as $attr_id => $attr_name ) { ?>
|
613 |
+
<option><?php echo $attr_name; ?></option>
|
614 |
<?php } ?>
|
615 |
+
</select>
|
616 |
|
617 |
<select id="taxonomies_compare" class="select_compare">
|
618 |
<option>=</option>
|
621 |
|
622 |
<input type="text" id="text_taxonomies" disabled style="display: none;">
|
623 |
|
624 |
+
<button id="add_taxonomies" class="button-secondary"><span class="dashicons dashicons-plus-alt"></span>
|
625 |
+
</button>
|
626 |
+
<br>
|
627 |
+
<select id="taxonomies_check" multiple name="settings[product_taxonomies][]"
|
628 |
+
style="width: 100%; max-width: 25%;">
|
629 |
<?php
|
630 |
+
if ( $settings['product_taxonomies'] ) {
|
631 |
+
foreach ( $settings['product_taxonomies'] as $prod ) {
|
632 |
?>
|
633 |
+
<option selected value="<?php echo $prod; ?>"> <?php echo $prod; ?></option>
|
634 |
+
<?php }
|
635 |
+
} ?>
|
636 |
+
</select>
|
637 |
|
638 |
+
<span class="wc-oe-header"><?php _e( 'Product custom fields', 'woo-order-export-lite' ) ?></span>
|
639 |
+
<br>
|
640 |
+
<select id="product_custom_fields" style="width: auto;">
|
641 |
<?php foreach ( WC_Order_Export_Data_Extractor_UI::get_product_custom_fields() as $cf_name ) { ?>
|
642 |
+
<option><?php echo $cf_name; ?></option>
|
643 |
<?php } ?>
|
644 |
+
</select>
|
645 |
+
|
646 |
+
<select id="product_custom_fields_compare" class="select_compare">
|
647 |
+
<option>=</option>
|
648 |
+
<option><></option>
|
649 |
+
<option>LIKE</option>
|
650 |
+
<option>></option>
|
651 |
+
<option>>=</option>
|
652 |
+
<option><</option>
|
653 |
+
<option><=</option>
|
654 |
+
</select>
|
655 |
+
|
656 |
+
<input type="text" id="text_product_custom_fields" disabled class="like-input" style="display: none;">
|
657 |
+
|
658 |
+
<button id="add_product_custom_fields" class="button-secondary"><span
|
659 |
+
class="dashicons dashicons-plus-alt"></span></button>
|
660 |
+
<br>
|
661 |
+
<select id="product_custom_fields_check" multiple name="settings[product_custom_fields][]"
|
662 |
+
style="width: 100%; max-width: 25%;">
|
663 |
<?php
|
664 |
+
if ( $settings['product_custom_fields'] ) {
|
665 |
+
foreach ( $settings['product_custom_fields'] as $prod ) {
|
666 |
?>
|
667 |
+
<option selected value="<?php echo $prod; ?>"> <?php echo $prod; ?></option>
|
668 |
+
<?php }
|
669 |
+
} ?>
|
670 |
+
</select>
|
671 |
|
672 |
+
<span class="wc-oe-header"><?php _e( 'Variable product attributes',
|
673 |
+
'woo-order-export-lite' ) ?></span>
|
674 |
+
<br>
|
675 |
+
<select id="attributes" style="width: auto;">
|
676 |
<?php foreach ( WC_Order_Export_Data_Extractor_UI::get_product_attributes() as $attr_id => $attr_name ) { ?>
|
677 |
+
<option><?php echo $attr_name; ?></option>
|
678 |
<?php } ?>
|
679 |
+
</select>
|
680 |
|
681 |
+
<select id="attributes_compare" class="select_compare">
|
682 |
+
<option>=</option>
|
683 |
+
<option><></option>
|
684 |
+
<option>LIKE</option>
|
685 |
+
</select>
|
686 |
|
687 |
+
<input type="text" id="text_attributes" disabled class="like-input" style="display: none;">
|
688 |
|
689 |
+
<button id="add_attributes" class="button-secondary"><span class="dashicons dashicons-plus-alt"></span>
|
690 |
+
</button>
|
691 |
+
<br>
|
692 |
+
<select id="attributes_check" multiple name="settings[product_attributes][]"
|
693 |
+
style="width: 100%; max-width: 25%;">
|
694 |
<?php
|
695 |
+
if ( $settings['product_attributes'] ) {
|
696 |
+
foreach ( $settings['product_attributes'] as $prod ) {
|
697 |
?>
|
698 |
+
<option selected value="<?php echo $prod; ?>"> <?php echo $prod; ?></option>
|
699 |
+
<?php }
|
700 |
+
} ?>
|
701 |
+
</select>
|
702 |
|
703 |
<span class="wc-oe-header"><?php _e( 'Item meta data', 'woo-order-export-lite' ) ?></span>
|
704 |
+
<br>
|
705 |
+
<select id="itemmeta" style="width: auto;">
|
706 |
<?php foreach ( WC_Order_Export_Data_Extractor_UI::get_product_itemmeta() as $attr_name ) { ?>
|
707 |
+
<option data-base64="<?php echo base64_encode( $attr_name ); ?>"><?php echo $attr_name; ?></option>
|
708 |
<?php } ?>
|
709 |
+
</select>
|
710 |
+
|
711 |
+
<select id="itemmeta_compare" class="select_compare">
|
712 |
+
<option>=</option>
|
713 |
+
<option><></option>
|
714 |
+
<option>LIKE</option>
|
715 |
+
<option>></option>
|
716 |
+
<option>>=</option>
|
717 |
+
<option><</option>
|
718 |
+
<option><=</option>
|
719 |
+
</select>
|
720 |
+
|
721 |
+
<input type="text" id="text_itemmeta" disabled class="like-input" style="display: none;">
|
722 |
+
|
723 |
+
<button id="add_itemmeta" class="button-secondary"><span class="dashicons dashicons-plus-alt"></span>
|
724 |
+
</button>
|
725 |
+
<br>
|
726 |
+
<select id="itemmeta_check" multiple name="settings[product_itemmeta][]"
|
727 |
+
style="width: 100%; max-width: 25%;">
|
728 |
<?php
|
729 |
+
if ( $settings['product_itemmeta'] ) {
|
730 |
+
foreach ( $settings['product_itemmeta'] as $prod ) {
|
731 |
?>
|
732 |
+
<option selected value="<?php echo $prod; ?>"> <?php echo $prod; ?></option>
|
733 |
+
<?php }
|
734 |
+
} ?>
|
735 |
+
</select>
|
736 |
|
737 |
+
</div>
|
738 |
+
</div>
|
739 |
|
740 |
+
<br>
|
741 |
|
742 |
+
<div class="my-block">
|
743 |
<span class="my-hide-next "><?php _e( 'Filter by customers', 'woo-order-export-lite' ) ?>
|
744 |
+
<span class="ui-icon ui-icon-triangle-1-s my-icon-triangle"></span></span>
|
745 |
+
<div id="my-users" hidden="hidden">
|
746 |
|
747 |
+
<span class="wc-oe-header"><?php _e( 'Usernames', 'woo-order-export-lite' ) ?></span>
|
748 |
+
<select id="user_names" name="settings[user_names][]" multiple="multiple"
|
749 |
+
style="width: 100%; max-width: 25%;">
|
750 |
<?php
|
751 |
+
if ( $settings['user_names'] ) {
|
752 |
+
foreach ( $settings['user_names'] as $user_id ) {
|
753 |
$user = get_user_by( 'id', $user_id );
|
754 |
?>
|
755 |
+
<option selected value="<?php echo $user_id ?>"> <?php echo $user->display_name; ?></option>
|
756 |
+
<?php }
|
757 |
+
} ?>
|
758 |
+
</select>
|
759 |
|
760 |
+
<span class="wc-oe-header"><?php _e( 'User roles', 'woo-order-export-lite' ) ?></span>
|
761 |
+
<select id="user_roles" name="settings[user_roles][]" multiple="multiple"
|
762 |
+
style="width: 100%; max-width: 25%;">
|
763 |
<?php
|
764 |
global $wp_roles;
|
765 |
foreach ( $wp_roles->role_names as $k => $v ) { ?>
|
766 |
+
<option value="<?php echo $k ?>" <?php echo( in_array( $k,
|
767 |
+
$settings['user_roles'] ) ? selected( true ) : '' ) ?>> <?php echo $v ?></option>
|
768 |
<?php } ?>
|
769 |
+
</select>
|
770 |
|
771 |
<span class="wc-oe-header"><?php _e( 'Custom fields', 'woo-order-export-lite' ) ?></span>
|
772 |
<br>
|
789 |
|
790 |
<input type="text" id="text_user_custom_fields" disabled class="like-input" style="display: none;">
|
791 |
|
792 |
+
<button id="add_user_custom_fields" class="button-secondary"><span
|
793 |
+
class="dashicons dashicons-plus-alt"></span></button>
|
794 |
<br>
|
795 |
+
<select id="user_custom_fields_check" multiple name="settings[user_custom_fields][]"
|
796 |
+
style="width: 100%; max-width: 25%;">
|
797 |
<?php
|
798 |
+
if ( ! empty( $settings['user_custom_fields'] ) ) {
|
799 |
+
foreach ( $settings['user_custom_fields'] as $value ) {
|
800 |
?>
|
801 |
<option selected value="<?php echo $value; ?>"> <?php echo $value; ?></option>
|
802 |
+
<?php }
|
803 |
+
} ?>
|
804 |
</select>
|
805 |
+
</div>
|
806 |
+
</div>
|
807 |
|
808 |
+
<br>
|
809 |
|
810 |
+
<div class="my-block">
|
811 |
<span class="my-hide-next "><?php _e( 'Filter by coupons', 'woo-order-export-lite' ) ?>
|
812 |
+
<span class="ui-icon ui-icon-triangle-1-s my-icon-triangle"></span></span>
|
813 |
+
<div id="my-coupons" hidden="hidden">
|
814 |
<div>
|
815 |
<input type="hidden" name="settings[any_coupon_used]" value="0"/>
|
816 |
+
<label><input type="checkbox" name="settings[any_coupon_used]"
|
817 |
+
value="1" <?php checked( $settings['any_coupon_used'] ) ?>/><?php _e( 'Any coupon used',
|
818 |
+
'woo-order-export-lite' ) ?></label>
|
819 |
</div>
|
820 |
+
<span class="wc-oe-header"><?php _e( 'Coupons', 'woo-order-export-lite' ) ?></span>
|
821 |
+
<select id="coupons" name="settings[coupons][]" multiple="multiple"
|
822 |
+
style="width: 100%; max-width: 25%;">
|
823 |
<?php
|
824 |
+
if ( $settings['coupons'] ) {
|
825 |
foreach ( $settings['coupons'] as $coupon ) {
|
826 |
?>
|
827 |
+
<option selected value="<?php echo $coupon; ?>"> <?php echo $coupon; ?></option>
|
828 |
+
<?php }
|
829 |
+
} ?>
|
830 |
+
</select>
|
831 |
+
</div>
|
832 |
+
</div>
|
833 |
|
834 |
+
<br>
|
835 |
|
836 |
+
<div class="my-block">
|
837 |
<span class="my-hide-next "><?php _e( 'Filter by billing', 'woo-order-export-lite' ) ?>
|
838 |
+
<span class="ui-icon ui-icon-triangle-1-s my-icon-triangle"></span></span>
|
839 |
+
<div id="my-billing" hidden="hidden">
|
840 |
<span class="wc-oe-header"><?php _e( 'Billing locations', 'woo-order-export-lite' ) ?></span>
|
841 |
<br>
|
842 |
<select id="billing_locations">
|
850 |
<option><></option>
|
851 |
</select>
|
852 |
|
853 |
+
<button id="add_billing_locations" class="button-secondary"><span
|
854 |
+
class="dashicons dashicons-plus-alt"></span></button>
|
855 |
<br>
|
856 |
+
<select id="billing_locations_check" multiple name="settings[billing_locations][]"
|
857 |
+
style="width: 100%; max-width: 25%;">
|
858 |
+
<?php
|
859 |
+
if ( $settings['billing_locations'] ) {
|
860 |
+
foreach ( $settings['billing_locations'] as $location ) {
|
861 |
+
?>
|
862 |
<option selected value="<?php echo $location; ?>"> <?php echo $location; ?></option>
|
863 |
+
<?php }
|
864 |
+
} ?>
|
865 |
</select>
|
866 |
|
867 |
+
<span class="wc-oe-header"><?php _e( 'Payment methods', 'woo-order-export-lite' ) ?></span>
|
868 |
+
<select id="payment_methods" name="settings[payment_methods][]" multiple="multiple"
|
869 |
+
style="width: 100%; max-width: 25%;">
|
870 |
<?php foreach ( WC()->payment_gateways->payment_gateways() as $gateway ) { ?>
|
871 |
+
<option value="<?php echo $gateway->id ?>" <?php if ( in_array( $gateway->id,
|
872 |
+
$settings['payment_methods'] ) ) {
|
873 |
+
echo 'selected';
|
874 |
+
} ?>><?php echo $gateway->get_title() ?></option>
|
875 |
<?php } ?>
|
876 |
+
</select>
|
877 |
+
</div>
|
878 |
+
</div>
|
879 |
|
880 |
+
<br>
|
881 |
|
882 |
+
<div class="my-block">
|
883 |
<span class="my-hide-next "><?php _e( 'Filter by shipping', 'woo-order-export-lite' ) ?>
|
884 |
+
<span class="ui-icon ui-icon-triangle-1-s my-icon-triangle"></span></span>
|
885 |
+
<div id="my-shipping" hidden="hidden">
|
886 |
+
<span class="wc-oe-header"><?php _e( 'Shipping locations', 'woo-order-export-lite' ) ?></span>
|
887 |
+
<br>
|
888 |
+
<select id="shipping_locations">
|
889 |
+
<option>City</option>
|
890 |
+
<option>State</option>
|
891 |
+
<option>Postcode</option>
|
892 |
+
<option>Country</option>
|
893 |
+
</select>
|
894 |
+
<select id="shipping_compare" class="select_compare">
|
895 |
+
<option>=</option>
|
896 |
+
<option><></option>
|
897 |
+
</select>
|
898 |
+
|
899 |
+
<button id="add_shipping_locations" class="button-secondary"><span
|
900 |
+
class="dashicons dashicons-plus-alt"></span></button>
|
901 |
+
<br>
|
902 |
+
<select id="shipping_locations_check" multiple name="settings[shipping_locations][]"
|
903 |
+
style="width: 100%; max-width: 25%;">
|
904 |
<?php
|
905 |
+
if ( $settings['shipping_locations'] ) {
|
906 |
+
foreach ( $settings['shipping_locations'] as $location ) {
|
907 |
?>
|
908 |
+
<option selected value="<?php echo $location; ?>"> <?php echo $location; ?></option>
|
909 |
+
<?php }
|
910 |
+
} ?>
|
911 |
+
</select>
|
912 |
|
913 |
+
<span class="wc-oe-header"><?php _e( 'Shipping methods', 'woo-order-export-lite' ) ?></span>
|
914 |
+
<select id="shipping_methods" name="settings[shipping_methods][]" multiple="multiple"
|
915 |
+
style="width: 100%; max-width: 25%;">
|
916 |
<?php foreach ( WC_Order_Export_Data_Extractor_UI::get_shipping_methods() as $i => $title ) { ?>
|
917 |
+
<option value="<?php echo $i ?>" <?php if ( in_array( $i, $settings['shipping_methods'] ) ) {
|
918 |
+
echo 'selected';
|
919 |
+
} ?>><?php echo $title ?></option>
|
920 |
<?php } ?>
|
921 |
+
</select>
|
922 |
+
</div>
|
923 |
+
</div>
|
924 |
|
925 |
+
<br>
|
926 |
|
927 |
+
<div class="my-block">
|
928 |
<span class="my-hide-next "><?php _e( 'Filter by item and metadata', 'woo-order-export-lite' ) ?>
|
929 |
+
<span class="ui-icon ui-icon-triangle-1-s my-icon-triangle"></span></span>
|
930 |
+
<div id="my-items-meta" hidden="hidden">
|
931 |
+
<span class="wc-oe-header"><?php _e( 'Item names', 'woo-order-export-lite' ) ?></span>
|
932 |
+
<br>
|
933 |
+
<select id="item_names">
|
934 |
+
<option>coupon</option>
|
935 |
+
<option>fee</option>
|
936 |
+
<option>line_item</option>
|
937 |
+
<option>shipping</option>
|
938 |
+
<option>tax</option>
|
939 |
+
</select>
|
940 |
+
<select id="item_name_compare" class="select_compare">
|
941 |
+
<option>=</option>
|
942 |
+
<option><></option>
|
943 |
+
</select>
|
944 |
+
<button id="add_item_names" class="button-secondary"><span class="dashicons dashicons-plus-alt"></span>
|
945 |
+
</button>
|
946 |
+
<br>
|
947 |
+
<select id="item_names_check" multiple name="settings[item_names][]"
|
948 |
+
style="width: 100%; max-width: 25%;">
|
949 |
<?php
|
950 |
+
if ( $settings['item_names'] ) {
|
951 |
+
foreach ( $settings['item_names'] as $name ) {
|
952 |
?>
|
953 |
+
<option selected value="<?php echo $name; ?>"> <?php echo $name; ?></option>
|
954 |
+
<?php }
|
955 |
+
} ?>
|
956 |
+
</select>
|
957 |
+
|
958 |
+
<span class="wc-oe-header"><?php _e( 'Item metadata', 'woo-order-export-lite' ) ?></span>
|
959 |
+
<br>
|
960 |
+
<select id="item_metadata">
|
961 |
+
<?php foreach ( WC_Order_Export_Data_Extractor_UI::get_item_meta_keys() as $type => $meta_keys ) { ?>
|
962 |
+
<optgroup label="<?php echo ucwords( $type ); ?>">
|
963 |
+
<?php foreach ( $meta_keys as $item_meta_key ) { ?>
|
964 |
+
<option value="<?php echo $type . ":" . $item_meta_key; ?>"><?php echo $item_meta_key; ?></option>
|
965 |
+
<?php } ?>
|
966 |
+
</optgroup>
|
967 |
<?php } ?>
|
968 |
+
</select>
|
969 |
+
<select id="item_metadata_compare" class="select_compare">
|
970 |
+
<option>=</option>
|
971 |
+
<option><></option>
|
972 |
+
</select>
|
973 |
+
<button id="add_item_metadata" class="button-secondary"><span
|
974 |
+
class="dashicons dashicons-plus-alt"></span></button>
|
975 |
+
<br>
|
976 |
+
<select id="item_metadata_check" multiple name="settings[item_metadata][]"
|
977 |
+
style="width: 100%; max-width: 25%;">
|
978 |
<?php
|
979 |
+
if ( $settings['item_metadata'] ) {
|
980 |
+
foreach ( $settings['item_metadata'] as $meta ) {
|
981 |
?>
|
982 |
+
<option selected value="<?php echo $meta; ?>"> <?php echo $meta; ?></option>
|
983 |
+
<?php }
|
984 |
+
} ?>
|
985 |
+
</select>
|
986 |
|
987 |
+
</div>
|
988 |
+
</div>
|
989 |
|
990 |
+
</div>
|
991 |
|
992 |
+
<div class="clearfix"></div>
|
993 |
+
<br>
|
994 |
+
<div class="my-block">
|
995 |
+
<span id='adjust-fields-btn' class="my-hide-next "><?php _e( 'Set up fields to export',
|
996 |
+
'woo-order-export-lite' ) ?>
|
997 |
+
<span class="ui-icon ui-icon-triangle-1-s my-icon-triangle"></span></span>
|
998 |
+
<div id="manage_fields" style="display: none;">
|
999 |
<div style="display: grid; grid-template-columns: 10fr 1fr 10fr;">
|
1000 |
<div class="clear"></div>
|
1001 |
<div></div>
|
1002 |
+
<div>
|
1003 |
<br class="clear"/>
|
1004 |
</div>
|
1005 |
<div id='fields' style='display:none;'>
|
1008 |
<div class="fields-control">
|
1009 |
<div style="display: inline-block; float: left">
|
1010 |
<label style="font-size: medium;">
|
1011 |
+
<?php _e( 'Drag rows to reorder exported fields', 'woo-order-export-lite' ) ?>
|
1012 |
</label>
|
1013 |
</div>
|
1014 |
<div style="display: inline-block; float: right; margin-bottom: 15px">
|
1015 |
+
<a id="clear_selected_fields" class="button"
|
1016 |
+
style="background-color: #bb77ae; color: white;: ">
|
1017 |
+
<?php _e( 'Remove all fields', 'woo-order-export-lite' ) ?>
|
1018 |
</a>
|
1019 |
</div>
|
1020 |
</div>
|
1021 |
+
<div>
|
1022 |
<br class="clear"/>
|
1023 |
</div>
|
1024 |
<ul id="order_fields"></ul>
|
1026 |
<div></div>
|
1027 |
<div id='unselected_fields'>
|
1028 |
<ul class="subsubsub">
|
1029 |
+
<?php $segments = WC_Order_Export_Data_Extractor_UI::get_order_segments(); ?>
|
1030 |
+
<?php foreach ( $segments as $id => $segment_title ): ?>
|
1031 |
<li>
|
1032 |
<a class="segment_choice"
|
1033 |
data-segment="<?php echo $id; ?>" href="#segment=<?php echo $id; ?>">
|
1034 |
+
<?php echo $segment_title; ?>
|
1035 |
</a>
|
1036 |
+
<?php echo( end( $segments ) == $segment_title ? '' : ' | ' ); ?>
|
1037 |
</li>
|
1038 |
+
<?php endforeach; ?>
|
1039 |
</ul>
|
1040 |
<br class="clear">
|
1041 |
<div class="tab-controls">
|
1044 |
<strong><?php _e( 'Actions', 'woo-order-export-lite' ) ?>:</strong>
|
1045 |
</span>
|
1046 |
<button class='button-secondary add-meta'>
|
1047 |
+
<?php _e( 'Add field', 'woo-order-export-lite' ) ?>
|
1048 |
</button>
|
1049 |
+
<button class='button-secondary add-custom'>
|
1050 |
+
<?php _e( 'Add static field', 'woo-order-export-lite' ) ?>
|
1051 |
</button>
|
1052 |
</div>
|
1053 |
<div class="tab-actions-forms">
|
1054 |
<div class='div_meta segment-form all-segments'>
|
1055 |
<label for="select_custom_meta_order">
|
1056 |
+
<?php _e( 'Meta key', 'woo-order-export-lite' ) ?>:
|
1057 |
</label><br/>
|
1058 |
<select id='select_custom_meta_order'>
|
1059 |
+
<?php
|
1060 |
+
foreach ( $order_custom_meta_fields as $meta_id => $meta_name ) {
|
1061 |
+
echo "<option value='$meta_name' >$meta_name</option>";
|
1062 |
+
};
|
1063 |
+
?>
|
1064 |
</select>
|
1065 |
<div id="custom_meta_order_mode" style="margin-bottom: 10px;">
|
1066 |
+
<input style="width: 80%;" type='text' id='text_custom_meta_order'
|
1067 |
+
placeholder="<?php _e( 'or type meta key here',
|
1068 |
+
'woo-order-export-lite' ) ?>"/><br>
|
1069 |
</div>
|
1070 |
<div style="margin-bottom: 8px;">
|
1071 |
+
<input id="custom_meta_order_mode_used" type="checkbox"
|
1072 |
+
name="custom_meta_order_mode" value="used"> <?php _e( 'Hide unused fields',
|
1073 |
+
'woo-order-export-lite' ) ?>
|
1074 |
</div>
|
1075 |
<hr>
|
1076 |
+
<div style="margin-top: 20px;"><label for="colname_custom_meta"><?php _e( 'Column name',
|
1077 |
+
'woo-order-export-lite' ) ?>:</label><input type='text'
|
1078 |
+
id='colname_custom_meta'/>
|
1079 |
</div>
|
1080 |
<div style="margin-top: 20px;">
|
1081 |
+
<?php echo print_formats_field( 'meta' ); ?>
|
1082 |
</div>
|
1083 |
<div style="text-align: right;">
|
1084 |
+
<button id='button_custom_meta' class='button-secondary'><?php _e( 'Confirm',
|
1085 |
+
'woo-order-export-lite' ) ?></button>
|
1086 |
+
<button class='button-secondary button-cancel'><?php _e( 'Cancel',
|
1087 |
+
'woo-order-export-lite' ) ?></button>
|
1088 |
</div>
|
1089 |
</div>
|
1090 |
<div class='div_custom segment-form all-segments'>
|
1091 |
<div>
|
1092 |
+
<label for="colname_custom_field"><?php _e( 'Column name',
|
1093 |
+
'woo-order-export-lite' ) ?>:</label>
|
1094 |
<input type='text' id='colname_custom_field'/>
|
1095 |
</div>
|
1096 |
<div>
|
1097 |
+
<label for="value_custom_field"><?php _e( 'Value', 'woo-order-export-lite' ) ?>
|
1098 |
+
:</label>
|
1099 |
<input type='text' id='value_custom_field'/>
|
1100 |
</div>
|
1101 |
<div>
|
1102 |
+
<?php echo print_formats_field( 'field' ); ?>
|
1103 |
</div>
|
1104 |
<div style="text-align: right;">
|
1105 |
+
<button id='button_custom_field' class='button-secondary'><?php _e( 'Confirm',
|
1106 |
+
'woo-order-export-lite' ) ?></button>
|
1107 |
+
<button class='button-secondary button-cancel'><?php _e( 'Cancel',
|
1108 |
+
'woo-order-export-lite' ) ?></button>
|
1109 |
</div>
|
1110 |
</div>
|
1111 |
+
<div class='div_meta products-segment segment-form products-add-field'>
|
1112 |
<div id="custom_meta_products_mode" class="hide">
|
1113 |
+
<label><input id="custom_meta_products_mode_used" type="checkbox"
|
1114 |
+
name="custom_meta_products_mode"
|
1115 |
+
value="used"> <?php _e( 'Hide unused fields',
|
1116 |
+
'woo-order-export-lite' ) ?></label>
|
1117 |
</div>
|
1118 |
+
<label for="select_custom_meta_products"><?php _e( 'Product fields',
|
1119 |
+
'woo-order-export-lite' ) ?>:</label><select
|
1120 |
+
id='select_custom_meta_products'></select>
|
1121 |
+
|
1122 |
+
<label for="select_custom_meta_order_items"><?php _e( 'Order item fields',
|
1123 |
+
'woo-order-export-lite' ) ?>:</label><select
|
1124 |
+
id='select_custom_meta_order_items'></select>
|
1125 |
+
<label> </label><input style="width: 80%;" type='text'
|
1126 |
+
id='text_custom_meta_order_items'
|
1127 |
+
placeholder="<?php _e( 'or type meta key here',
|
1128 |
+
'woo-order-export-lite' ) ?>"/><br>
|
1129 |
+
<div style="width: 80%; text-align: center;"><?php _e( 'OR',
|
1130 |
+
'woo-order-export-lite' ) ?></div>
|
1131 |
+
<label><?php _e( 'Taxonomy', 'woo-order-export-lite' ) ?>:</label><select
|
1132 |
+
id='select_custom_taxonomies_products'>
|
1133 |
<option></option>
|
1134 |
+
<?php
|
1135 |
+
foreach ( WC_Order_Export_Data_Extractor_UI::get_product_taxonomies() as $tax_id => $tax_name ) {
|
1136 |
+
echo "<option value='__$tax_name' >__$tax_name</option>";
|
1137 |
+
};
|
1138 |
+
?>
|
1139 |
</select>
|
1140 |
<hr>
|
1141 |
<div style="margin-top: 15px;"></div>
|
1142 |
+
<label><?php _e( 'Column name', 'woo-order-export-lite' ) ?>:</label><input
|
1143 |
+
type='text' id='colname_custom_meta_products'/>
|
1144 |
<div style="margin-top: 15px;"></div>
|
1145 |
+
<?php echo print_formats_field( 'meta', 'products' ); ?>
|
1146 |
<div style="text-align: right;">
|
1147 |
+
<button id='button_custom_meta_products'
|
1148 |
+
class='button-secondary'><?php _e( 'Confirm',
|
1149 |
+
'woo-order-export-lite' ) ?></button>
|
1150 |
+
<button class='button-secondary button-cancel'><?php _e( 'Cancel',
|
1151 |
+
'woo-order-export-lite' ) ?></button>
|
1152 |
</div>
|
1153 |
</div>
|
1154 |
<div class='div_custom products-segment segment-form products-add-static-field'>
|
1155 |
<div>
|
1156 |
+
<label for="colname_custom_field_products"><?php _e( 'Column name',
|
1157 |
+
'woo-order-export-lite' ) ?>:</label>
|
1158 |
<input type='text' id='colname_custom_field_products'/>
|
1159 |
</div>
|
1160 |
<div>
|
1161 |
+
<label for="value_custom_field_products"><?php _e( 'Value',
|
1162 |
+
'woo-order-export-lite' ) ?>:</label>
|
1163 |
<input type='text' id='value_custom_field_products'/>
|
1164 |
</div>
|
1165 |
<div>
|
1166 |
+
<?php echo print_formats_field( 'field', 'products' ); ?>
|
1167 |
</div>
|
1168 |
<div style="text-align: right;">
|
1169 |
+
<button id='button_custom_field_products'
|
1170 |
+
class='button-secondary'><?php _e( 'Confirm',
|
1171 |
+
'woo-order-export-lite' ) ?></button>
|
1172 |
+
<button class='button-secondary button-cancel'><?php _e( 'Cancel',
|
1173 |
+
'woo-order-export-lite' ) ?></button>
|
1174 |
</div>
|
1175 |
</div>
|
1176 |
+
<div class='div_meta coupons-segment segment-form coupons-add-field'>
|
1177 |
+
<label><?php _e( 'Meta key', 'woo-order-export-lite' ) ?>:</label>
|
1178 |
+
<div id="custom_meta_coupons_mode" style="display: none;">
|
1179 |
+
<input id="custom_meta_coupons_mode" type="checkbox"
|
1180 |
+
name="custom_meta_coupons_mode" value="used"> <?php _e( 'Hide unused fields',
|
1181 |
+
'woo-order-export-lite' ) ?>
|
1182 |
</div>
|
1183 |
<br>
|
1184 |
<select id='select_custom_meta_coupons'></select>
|
1185 |
+
<input style="width: 80%;margin-bottom: 10px;" type='text' id='text_custom_meta_coupons'
|
1186 |
+
placeholder="<?php _e( 'or type meta key here',
|
1187 |
+
'woo-order-export-lite' ) ?>"/><br/>
|
1188 |
<hr>
|
1189 |
+
<label><?php _e( 'Column name', 'woo-order-export-lite' ) ?>:</label><input
|
1190 |
+
type='text' id='colname_custom_meta_coupons'/></label>
|
1191 |
<div style="margin-top: 20px;">
|
1192 |
+
<?php echo print_formats_field( 'meta', 'coupons' ); ?>
|
1193 |
</div>
|
1194 |
<div style="text-align: right;">
|
1195 |
+
<button id='button_custom_meta_coupons'
|
1196 |
+
class='button-secondary'><?php _e( 'Confirm',
|
1197 |
+
'woo-order-export-lite' ) ?></button>
|
1198 |
+
<button class='button-secondary button-cancel'><?php _e( 'Cancel',
|
1199 |
+
'woo-order-export-lite' ) ?></button>
|
1200 |
</div>
|
1201 |
</div>
|
1202 |
<div class='div_custom coupons-segment segment-form coupons-add-static-field'>
|
1203 |
<div>
|
1204 |
+
<label for="colname_custom_field_coupons"><?php _e( 'Column name',
|
1205 |
+
'woo-order-export-lite' ) ?>:</label>
|
1206 |
<input type='text' id='colname_custom_field_coupons'/>
|
1207 |
</div>
|
1208 |
<div>
|
1209 |
+
<label for="value_custom_field_coupons"><?php _e( 'Value',
|
1210 |
+
'woo-order-export-lite' ) ?>:</label>
|
1211 |
<input type='text' id='value_custom_field_coupons'/>
|
1212 |
</div>
|
1213 |
<div>
|
1214 |
+
<?php echo print_formats_field( 'field', 'coupons' ); ?>
|
1215 |
</div>
|
1216 |
<div style="text-align: right;">
|
1217 |
+
<button id='button_custom_field_coupons' class='button-secondary'>
|
1218 |
+
<?php _e( 'Confirm', 'woo-order-export-lite' ) ?>
|
1219 |
</button>
|
1220 |
+
<button class='button-secondary button-cancel'>
|
1221 |
+
<?php _e( 'Cancel', 'woo-order-export-lite' ) ?>
|
1222 |
</button>
|
1223 |
</div>
|
1224 |
</div>
|
1228 |
<div id="unselected_fields_list"></div>
|
1229 |
|
1230 |
|
1231 |
+
<!-- <div class="section settings-segment" id="order_segment">-->
|
1232 |
+
<!-- <h1>ORDER</h1>-->
|
1233 |
+
<!-- </div>-->
|
1234 |
+
<!-- <div class="section settings-segment" id="products_segment">-->
|
1235 |
+
<!-- <h1>PRODUCT</h1>-->
|
1236 |
+
<!-- </div>-->
|
1237 |
+
<!-- <div class="section settings-segment" id="coupons_segment">-->
|
1238 |
+
<!-- <h1>COUPON</h1>-->
|
1239 |
+
<!-- </div>-->
|
1240 |
|
1241 |
</div>
|
1242 |
</div>
|
1243 |
+
<div id="modal_content" style="display: none;"></div>
|
1244 |
+
</div>
|
1245 |
+
|
1246 |
+
</div>
|
1247 |
+
<?php do_action( "woe_settings_above_buttons", $settings ); ?>
|
1248 |
+
<div id=JS_error_onload
|
1249 |
+
style='color:red;font-size: 120%;'><?php echo sprintf( __( "If you see this message after page load, user interface won't work correctly!<br>There is a JS error (<a target=blank href='%s'>read here</a> how to view it). Probably, it's a conflict with another plugin or active theme.",
|
1250 |
+
'woo-order-export-lite' ),
|
1251 |
+
"https://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors#Step_3:_Diagnosis" ); ?></div>
|
1252 |
+
<p class="submit">
|
1253 |
+
<input type="submit" id='preview-btn' class="button-secondary preview-btn"
|
1254 |
+
data-limit="<?php echo( $mode === WC_Order_Export_Manage::EXPORT_ORDER_ACTION ? 1 : 5 ); ?>"
|
1255 |
+
value="<?php _e( 'Preview', 'woo-order-export-lite' ) ?>"
|
1256 |
+
title="<?php _e( 'Might be different from actual export!', 'woo-order-export-lite' ) ?>"/>
|
1257 |
+
<?php if ( $mode == 'now' ): ?>
|
1258 |
+
<input type="submit" id='save-only-btn' class="button-primary"
|
1259 |
+
value="<?php _e( 'Save settings', 'woo-order-export-lite' ) ?>"/>
|
1260 |
+
<?php else: ?>
|
1261 |
+
<input type="submit" id='save-btn' class="button-primary"
|
1262 |
+
value="<?php _e( 'Save & Exit', 'woo-order-export-lite' ) ?>"/>
|
1263 |
+
<input type="submit" id='save-only-btn' class="button-secondary"
|
1264 |
+
value="<?php _e( 'Save settings', 'woo-order-export-lite' ) ?>"/>
|
1265 |
+
<?php endif; ?>
|
1266 |
+
|
1267 |
+
<?php if ( $show['export_button'] ) { ?>
|
1268 |
+
<input type="submit" id='export-btn' class="button-secondary"
|
1269 |
+
value="<?php _e( 'Export', 'woo-order-export-lite' ) ?>"/>
|
1270 |
<?php } ?>
|
1271 |
+
<?php if ( $show['export_button_plain'] ) { ?>
|
1272 |
+
<input type="submit" id='export-wo-pb-btn' class="button-secondary"
|
1273 |
+
value="<?php _e( 'Export [w/o progressbar]', 'woo-order-export-lite' ) ?>"
|
1274 |
+
title="<?php _e( 'It might not work for huge datasets!', 'woo-order-export-lite' ) ?>"/>
|
1275 |
<?php } ?>
|
1276 |
<?php if ( $mode === WC_Order_Export_Manage::EXPORT_NOW && $WC_Order_Export::is_full_version() ): ?>
|
1277 |
+
<input type="submit" id='copy-to-profiles' class="button-secondary"
|
1278 |
+
value="<?php _e( 'Save as a profile', 'woo-order-export-lite' ) ?>"/>
|
1279 |
<?php endif; ?>
|
1280 |
+
<span id="preview_actions" class="hide">
|
1281 |
+
<strong id="output_preview_total"><?php echo sprintf( __( 'Export total: %s orders',
|
1282 |
+
'woo-order-export-lite' ), '<span></span>' ) ?></strong>
|
1283 |
<?php _e( 'Preview size', 'woo-order-export-lite' ); ?>
|
1284 |
+
<?php foreach ( array( 5, 10, 25, 50 ) as $n ): ?>
|
1285 |
+
<button class="button-secondary preview-btn" data-limit="<?php echo $n; ?>"><?php echo $n; ?></button>
|
1286 |
<?php endforeach ?>
|
1287 |
</span>
|
1288 |
+
</p>
|
1289 |
+
<div id=Settings_updated
|
1290 |
+
style='display:none;color:green;font-size: 120%;'><?php _e( "Settings were successfully updated!",
|
1291 |
+
'woo-order-export-lite' ) ?></div>
|
1292 |
+
|
1293 |
+
<?php if ( $show['export_button'] OR $show['export_button_plain'] ) { ?>
|
1294 |
+
<div id="progress_div" style="display: none;">
|
1295 |
+
<h1 class="title-cancel"><?php _e( "Press 'Esc' to cancel the export", 'woo-order-export-lite' ) ?></h1>
|
1296 |
+
<h1 class="title-download"><a target=_blank><?php _e( "Click here to download",
|
1297 |
+
'woo-order-export-lite' ) ?></a></h1>
|
1298 |
+
<div id="progressBar">
|
1299 |
+
<div></div>
|
1300 |
+
</div>
|
1301 |
+
</div>
|
1302 |
+
<div id="background"></div>
|
1303 |
<?php } ?>
|
1304 |
|
1305 |
</form>
|
1309 |
<iframe id='export_new_window_frame' width=0 height=0 style='display:none'></iframe>
|
1310 |
|
1311 |
<form id='export_wo_pb_form' method='post' target='export_wo_pb_window'>
|
1312 |
+
<input name="action" type="hidden" value="order_exporter">
|
1313 |
+
<input name="method" type="hidden" value="plain_export">
|
1314 |
+
<input name="mode" type="hidden" value="<?php echo $mode ?>">
|
1315 |
+
<input name="id" type="hidden" value="<?php echo $id ?>">
|
1316 |
+
<input name="json" type="hidden">
|
1317 |
</form>
|
view/tab/export.php
CHANGED
@@ -1,13 +1,25 @@
|
|
1 |
<?php
|
2 |
-
if ( !defined( 'ABSPATH' ) ) {
|
3 |
exit; // Exit if accessed directly
|
4 |
}
|
5 |
?>
|
6 |
<br>
|
7 |
<div class="tabs-content">
|
8 |
<?php
|
9 |
-
//settings for form
|
10 |
-
$show = array(
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
</div>
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
exit; // Exit if accessed directly
|
4 |
}
|
5 |
?>
|
6 |
<br>
|
7 |
<div class="tabs-content">
|
8 |
<?php
|
9 |
+
//settings for form
|
10 |
+
$show = array(
|
11 |
+
'date_filter' => true,
|
12 |
+
'export_button' => true,
|
13 |
+
'export_button_plain' => true,
|
14 |
+
'destinations' => false,
|
15 |
+
'schedule' => false,
|
16 |
+
);
|
17 |
+
$WC_Order_Export->render( 'settings-form', array(
|
18 |
+
'mode' => WC_Order_Export_Manage::EXPORT_NOW,
|
19 |
+
'id' => 0,
|
20 |
+
'WC_Order_Export' => $WC_Order_Export,
|
21 |
+
'ajaxurl' => $ajaxurl,
|
22 |
+
'show' => $show,
|
23 |
+
) );
|
24 |
+
?>
|
25 |
</div>
|
view/tab/help.php
CHANGED
@@ -1,19 +1,26 @@
|
|
1 |
<?php
|
2 |
-
if ( !defined( 'ABSPATH' ) ) {
|
3 |
-
|
4 |
}
|
5 |
|
6 |
-
$settings_link = '<a href="' . admin_url( 'admin.php?page=wc-order-export&tab=tools' ) . '" target=_blank>' . __( 'settings',
|
7 |
-
|
8 |
-
$
|
|
|
|
|
|
|
9 |
?>
|
10 |
<div class="clearfix"></div>
|
11 |
<div id="woe-admin" class="container-fluid wpcontent">
|
12 |
-
<br>
|
13 |
-
<p><?php _e( 'Need help? Create ticket in', 'woo-order-export-lite' ) ?> <a
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
<br>
|
18 |
-
|
|
|
|
|
|
|
|
|
19 |
</div>
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit; // Exit if accessed directly
|
4 |
}
|
5 |
|
6 |
+
$settings_link = '<a href="' . admin_url( 'admin.php?page=wc-order-export&tab=tools' ) . '" target=_blank>' . __( 'settings',
|
7 |
+
'woo-order-export-lite' ) . '</a>';
|
8 |
+
$snippets_link = '<a href="https://algolplus.com/plugins/snippets-plugins/" target=_blank>' . __( 'code snippets',
|
9 |
+
'woo-order-export-lite' ) . '</a>';
|
10 |
+
$samples_link = '<a href="https://algolplus.com/plugins/code-samples/" target=_blank>' . __( 'this page',
|
11 |
+
'woo-order-export-lite' ) . '</a>';
|
12 |
?>
|
13 |
<div class="clearfix"></div>
|
14 |
<div id="woe-admin" class="container-fluid wpcontent">
|
15 |
+
<br>
|
16 |
+
<p><?php _e( 'Need help? Create ticket in', 'woo-order-export-lite' ) ?> <a
|
17 |
+
href="https://algolplus.freshdesk.com" target=_blank><?php _e( 'helpdesk system',
|
18 |
+
'woo-order-export-lite' ) ?></a>.
|
19 |
+
<br>
|
20 |
+
<br>
|
21 |
+
<?php echo sprintf( __( "Don't forget to attach your %s or some screenshots. It will significantly reduce reply time :)",
|
22 |
+
'woo-order-export-lite' ), $settings_link ); ?></p>
|
23 |
+
<br>
|
24 |
+
<p><?php echo sprintf( __( 'Look at %s for popular plugins or check %s to study how to extend the plugin.',
|
25 |
+
'woo-order-export-lite' ), $snippets_link, $samples_link ); ?></p>
|
26 |
</div>
|
view/tab/tools.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
<?php
|
2 |
-
if ( !defined( 'ABSPATH' ) ) {
|
3 |
-
|
4 |
}
|
5 |
|
6 |
$modes = array(
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
);
|
12 |
|
13 |
$settings_export = array();
|
14 |
-
$setting_names
|
15 |
-
foreach ($modes as $mode) {
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
}
|
20 |
|
21 |
-
$type_labels =
|
22 |
WC_Order_Export_Manage::EXPORT_PROFILE => __( 'Profiles', 'woo-order-export-lite' ),
|
23 |
WC_Order_Export_Manage::EXPORT_ORDER_ACTION => __( 'Status change jobs', 'woo-order-export-lite' ),
|
24 |
WC_Order_Export_Manage::EXPORT_SCHEDULE => __( 'Scheduled jobs', 'woo-order-export-lite' ),
|
@@ -32,23 +32,29 @@ $type_labels = !$WC_Order_Export::is_full_version() ? array() : array(
|
|
32 |
<h2 class="woe-box-title"><?php _e( 'Export settings', 'woo-order-export-lite' ) ?></h2>
|
33 |
<div class="row">
|
34 |
<div class="col-sm-12 form-group">
|
35 |
-
<h6 class="woe-fake-label"><?php _e( 'Copy these settings and use it to migrate plugin to another WordPress install.',
|
|
|
36 |
</div>
|
37 |
<div class="col-sm-8 form-group woe-input-simple">
|
38 |
<select id="tools-export-selector">
|
39 |
-
<option data-json='<?php echo json_encode( $settings_export,
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
43 |
<optgroup label="<?php echo $label ?>"></optgroup>
|
44 |
-
|
45 |
-
<option data-json='<?php echo json_encode( $item,
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
49 |
</select>
|
50 |
<textarea rows="7" id="tools-export-text" class='tools-textarea'></textarea>
|
51 |
-
<p class="help-block"><?php _e( 'Just click inside the textarea and copy (Ctrl+C)',
|
|
|
52 |
</div>
|
53 |
</div>
|
54 |
</div>
|
@@ -60,16 +66,20 @@ $type_labels = !$WC_Order_Export::is_full_version() ? array() : array(
|
|
60 |
<h2 class="woe-box-title"><?php _e( 'Import settings', 'woo-order-export-lite' ) ?></h2>
|
61 |
<div class="row">
|
62 |
<div class="col-sm-12 form-group">
|
63 |
-
<h6 class="woe-fake-label"><?php _e( 'Paste text into this field to import settings into the current WordPress install.',
|
|
|
64 |
</div>
|
65 |
<div class="col-sm-8 form-group woe-input-simple">
|
66 |
<textarea rows="7" id="tools-import-text" name="tools-import"></textarea>
|
67 |
-
<p class="help-block"><?php _e( 'This process will overwrite your settings for "Advanced Order Export For WooCommerce" !',
|
|
|
68 |
</div>
|
69 |
</div>
|
70 |
<div class="row">
|
71 |
<div class="col-sm-2 form-group col-md-offset-7">
|
72 |
-
<input
|
|
|
|
|
73 |
</div>
|
74 |
</div>
|
75 |
</div>
|
@@ -78,34 +88,36 @@ $type_labels = !$WC_Order_Export::is_full_version() ? array() : array(
|
|
78 |
</div>
|
79 |
|
80 |
<script>
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
|
|
|
|
91 |
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
|
110 |
-
|
111 |
</script>
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit; // Exit if accessed directly
|
4 |
}
|
5 |
|
6 |
$modes = array(
|
7 |
+
WC_Order_Export_Manage::EXPORT_NOW,
|
8 |
+
WC_Order_Export_Manage::EXPORT_PROFILE,
|
9 |
+
WC_Order_Export_Manage::EXPORT_SCHEDULE,
|
10 |
+
WC_Order_Export_Manage::EXPORT_ORDER_ACTION,
|
11 |
);
|
12 |
|
13 |
$settings_export = array();
|
14 |
+
$setting_names = array();
|
15 |
+
foreach ( $modes as $mode ) {
|
16 |
+
$setting_name = WC_Order_Export_Manage::get_settings_name_for_mode( $mode );
|
17 |
+
$setting_names[ $mode ] = $setting_name;
|
18 |
+
$settings_export[ $mode ] = WC_Order_Export_Manage::get( $mode );
|
19 |
}
|
20 |
|
21 |
+
$type_labels = ! $WC_Order_Export::is_full_version() ? array() : array(
|
22 |
WC_Order_Export_Manage::EXPORT_PROFILE => __( 'Profiles', 'woo-order-export-lite' ),
|
23 |
WC_Order_Export_Manage::EXPORT_ORDER_ACTION => __( 'Status change jobs', 'woo-order-export-lite' ),
|
24 |
WC_Order_Export_Manage::EXPORT_SCHEDULE => __( 'Scheduled jobs', 'woo-order-export-lite' ),
|
32 |
<h2 class="woe-box-title"><?php _e( 'Export settings', 'woo-order-export-lite' ) ?></h2>
|
33 |
<div class="row">
|
34 |
<div class="col-sm-12 form-group">
|
35 |
+
<h6 class="woe-fake-label"><?php _e( 'Copy these settings and use it to migrate plugin to another WordPress install.',
|
36 |
+
'woo-order-export-lite' ) ?></h6>
|
37 |
</div>
|
38 |
<div class="col-sm-8 form-group woe-input-simple">
|
39 |
<select id="tools-export-selector">
|
40 |
+
<option data-json='<?php echo json_encode( $settings_export,
|
41 |
+
JSON_PRETTY_PRINT | JSON_HEX_APOS ) ?>'><?php _e( 'All',
|
42 |
+
'woo-order-export-lite' ) ?></option>
|
43 |
+
<option data-json='<?php echo json_encode( $settings_export[ WC_Order_Export_Manage::EXPORT_NOW ],
|
44 |
+
JSON_PRETTY_PRINT | JSON_HEX_APOS ) ?>'>
|
45 |
+
<?php _e( 'Export now', 'woo-order-export-lite' ) ?></option>
|
46 |
+
<?php foreach ( $type_labels as $group => $label ): ?>
|
47 |
<optgroup label="<?php echo $label ?>"></optgroup>
|
48 |
+
<?php foreach ( $settings_export[ $group ] as $item_id => $item ): ?>
|
49 |
+
<option data-json='<?php echo json_encode( $item,
|
50 |
+
JSON_PRETTY_PRINT | JSON_HEX_APOS ) ?>'>
|
51 |
+
<?php echo $item_id . " - " . ( isset( $item['title'] ) ? $item['title'] : '' ) ?></option>
|
52 |
+
<?php endforeach; ?>
|
53 |
+
<?php endforeach; ?>
|
54 |
</select>
|
55 |
<textarea rows="7" id="tools-export-text" class='tools-textarea'></textarea>
|
56 |
+
<p class="help-block"><?php _e( 'Just click inside the textarea and copy (Ctrl+C)',
|
57 |
+
'woo-order-export-lite' ) ?></p>
|
58 |
</div>
|
59 |
</div>
|
60 |
</div>
|
66 |
<h2 class="woe-box-title"><?php _e( 'Import settings', 'woo-order-export-lite' ) ?></h2>
|
67 |
<div class="row">
|
68 |
<div class="col-sm-12 form-group">
|
69 |
+
<h6 class="woe-fake-label"><?php _e( 'Paste text into this field to import settings into the current WordPress install.',
|
70 |
+
'woo-order-export-lite' ) ?></h6>
|
71 |
</div>
|
72 |
<div class="col-sm-8 form-group woe-input-simple">
|
73 |
<textarea rows="7" id="tools-import-text" name="tools-import"></textarea>
|
74 |
+
<p class="help-block"><?php _e( 'This process will overwrite your settings for "Advanced Order Export For WooCommerce" !',
|
75 |
+
'woo-order-export-lite' ) ?></p>
|
76 |
</div>
|
77 |
</div>
|
78 |
<div class="row">
|
79 |
<div class="col-sm-2 form-group col-md-offset-7">
|
80 |
+
<input disabled type="submit" class="woe-btn-tools"
|
81 |
+
value="<?php _e( 'Import', 'woo-order-export-lite' ) ?>" name="woe-tools-import"
|
82 |
+
id="submit-import">
|
83 |
</div>
|
84 |
</div>
|
85 |
</div>
|
88 |
</div>
|
89 |
|
90 |
<script>
|
91 |
+
jQuery( function ( $ ) {
|
92 |
+
jQuery( '#wpbody .tools-textarea' ).click( function () {
|
93 |
+
jQuery( this ).select();
|
94 |
+
} );
|
95 |
|
96 |
+
jQuery( '#tools-import-text' ).on( 'input propertychange', function () {
|
97 |
+
var $textarea = jQuery( this ).val();
|
98 |
+
var disable = (
|
99 |
+
$textarea.length == ''
|
100 |
+
);
|
101 |
+
$( "#submit-import" ).prop( "disabled", disable );
|
102 |
+
} );
|
103 |
|
104 |
+
jQuery( '#submit-import' ).on( 'click', function ( e ) {
|
105 |
+
if ( ! confirm( '<?php esc_attr_e( 'Are you sure to continue?', 'woo-order-export-lite' ) ?>' ) ) {
|
106 |
+
e.preventDefault();
|
107 |
+
$( document.activeElement ).blur();
|
108 |
+
} else {
|
109 |
+
var data = $( '#woe-admin form' ).serialize();
|
110 |
+
data = data + "&action=order_exporter&method=save_tools";
|
111 |
+
$.post( ajaxurl, data, function ( response ) {
|
112 |
+
document.location = '<?php echo admin_url( 'admin.php?page=wc-order-export&tab=tools&save=y' ) ?>';
|
113 |
+
}, "json" );
|
114 |
+
return false;
|
115 |
+
}
|
116 |
+
} );
|
117 |
|
118 |
+
jQuery( '#tools-export-selector' ).change( function () {
|
119 |
+
jQuery( '#tools-export-text' ).val( jQuery( this ).find( ':selected' ).attr( 'data-json' ) );
|
120 |
+
} ).change();
|
121 |
|
122 |
+
} );
|
123 |
</script>
|
woo-order-export-lite.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Export orders from WooCommerce with ease (Excel/CSV/XML/JSON supported)
|
6 |
* Author: AlgolPlus
|
7 |
* Author URI: https://algolplus.com/
|
8 |
-
* Version: 2.0.
|
9 |
* Text Domain: woo-order-export-lite
|
10 |
* Domain Path: /i18n/languages/
|
11 |
* WC requires at least: 2.6.0
|
@@ -22,11 +22,12 @@
|
|
22 |
* @copyright Copyright (c) 2015 AlgolPlus LLC
|
23 |
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
|
24 |
*/
|
25 |
-
if ( !defined( 'ABSPATH' ) )
|
26 |
-
exit;
|
|
|
27 |
|
28 |
// a small function to check startup conditions
|
29 |
-
if( ! function_exists("woe_check_running_options") ) {
|
30 |
function woe_check_running_options() {
|
31 |
|
32 |
$is_backend = is_admin();
|
@@ -39,20 +40,23 @@ if ( ! woe_check_running_options() ) {
|
|
39 |
} //don't load for frontend !
|
40 |
|
41 |
//Stop if another version is active!
|
42 |
-
if( class_exists( 'WC_Order_Export_Admin' ) ) {
|
43 |
-
if( ! function_exists( 'woe_warn_free_admin') ) {
|
44 |
function woe_warn_free_admin() {
|
45 |
?>
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
49 |
<?php
|
50 |
}
|
51 |
}
|
52 |
-
add_action('admin_notices', 'woe_warn_free_admin');
|
|
|
53 |
return;
|
54 |
}
|
55 |
|
|
|
56 |
include 'classes/class-wc-order-export-admin.php';
|
57 |
include 'classes/admin/class-wc-order-export-ajax.php';
|
58 |
include 'classes/admin/class-wc-order-export-manage.php';
|
@@ -61,16 +65,16 @@ include 'classes/core/class-wc-order-export-engine.php';
|
|
61 |
include 'classes/core/class-wc-order-export-data-extractor.php';
|
62 |
include 'classes/core/class-wc-order-export-data-extractor-ui.php';
|
63 |
|
64 |
-
define( 'WOE_VERSION', '2.0.
|
65 |
-
define( 'WOE_PLUGIN_BASENAME', plugin_basename(__FILE__) );
|
66 |
-
define( 'WOE_PLUGIN_BASEPATH', dirname(__FILE__) );
|
67 |
$wc_order_export = new WC_Order_Export_Admin();
|
68 |
-
register_activation_hook( __FILE__, array($wc_order_export,'install') );
|
69 |
-
register_deactivation_hook( __FILE__, array($wc_order_export,'deactivate') );
|
70 |
-
register_uninstall_hook( __FILE__, array('WC_Order_Export_Admin','uninstall') );
|
71 |
|
72 |
// fight with ugly themes which add empty lines
|
73 |
-
if ( $wc_order_export->must_run_ajax_methods() AND !ob_get_level() ) {
|
74 |
ob_start();
|
75 |
-
}
|
76 |
//Done
|
5 |
* Description: Export orders from WooCommerce with ease (Excel/CSV/XML/JSON supported)
|
6 |
* Author: AlgolPlus
|
7 |
* Author URI: https://algolplus.com/
|
8 |
+
* Version: 2.0.1
|
9 |
* Text Domain: woo-order-export-lite
|
10 |
* Domain Path: /i18n/languages/
|
11 |
* WC requires at least: 2.6.0
|
22 |
* @copyright Copyright (c) 2015 AlgolPlus LLC
|
23 |
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
|
24 |
*/
|
25 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
26 |
+
exit;
|
27 |
+
} // Exit if accessed directly
|
28 |
|
29 |
// a small function to check startup conditions
|
30 |
+
if ( ! function_exists( "woe_check_running_options" ) ) {
|
31 |
function woe_check_running_options() {
|
32 |
|
33 |
$is_backend = is_admin();
|
40 |
} //don't load for frontend !
|
41 |
|
42 |
//Stop if another version is active!
|
43 |
+
if ( class_exists( 'WC_Order_Export_Admin' ) ) {
|
44 |
+
if ( ! function_exists( 'woe_warn_free_admin' ) ) {
|
45 |
function woe_warn_free_admin() {
|
46 |
?>
|
47 |
+
<div class="notice notice-warning is-dismissible">
|
48 |
+
<p><?php _e( 'Please, <a href="plugins.php">deactivate</a> Free version of Advanced Order Export For WooCommerce!',
|
49 |
+
'woo-order-export-lite' ); ?></p>
|
50 |
+
</div>
|
51 |
<?php
|
52 |
}
|
53 |
}
|
54 |
+
add_action( 'admin_notices', 'woe_warn_free_admin' );
|
55 |
+
|
56 |
return;
|
57 |
}
|
58 |
|
59 |
+
|
60 |
include 'classes/class-wc-order-export-admin.php';
|
61 |
include 'classes/admin/class-wc-order-export-ajax.php';
|
62 |
include 'classes/admin/class-wc-order-export-manage.php';
|
65 |
include 'classes/core/class-wc-order-export-data-extractor.php';
|
66 |
include 'classes/core/class-wc-order-export-data-extractor-ui.php';
|
67 |
|
68 |
+
define( 'WOE_VERSION', '2.0.1' );
|
69 |
+
define( 'WOE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
70 |
+
define( 'WOE_PLUGIN_BASEPATH', dirname( __FILE__ ) );
|
71 |
$wc_order_export = new WC_Order_Export_Admin();
|
72 |
+
register_activation_hook( __FILE__, array( $wc_order_export, 'install' ) );
|
73 |
+
register_deactivation_hook( __FILE__, array( $wc_order_export, 'deactivate' ) );
|
74 |
+
register_uninstall_hook( __FILE__, array( 'WC_Order_Export_Admin', 'uninstall' ) );
|
75 |
|
76 |
// fight with ugly themes which add empty lines
|
77 |
+
if ( $wc_order_export->must_run_ajax_methods() AND ! ob_get_level() ) {
|
78 |
ob_start();
|
79 |
+
}
|
80 |
//Done
|