Version Description
- 2019-11-11 =
- Speeded up page loading and button "Preview"
- Added filter "Products SKU" to section "Filter by product"
- Added options for JSON format
- Added vertical align for cells (PDF format)
- New tabs "Product items", "Product totals" in section "Setup fields"
- Order fields can be dragged to section "Products" (JSON/XML formats)
- Added product field "SKU(parent)"
- Added fields "Total Shipping","Total Discount","Total Items" for "Summary by customers" mode
- Support "0" as max # of product columns (calculated based on exported orders)
- Deleted products are exported by "Summary by products" mode
- Fixed UI bugs for summary mode
- New hooks for PDF format
- Fixed bug - sorting (by order fields) conflicted with filtering by order custom fields
Download this release
Release Info
Developer | algol.plus |
Plugin | Advanced Order Export For WooCommerce |
Version | 3.1.0 |
Comparing to | |
See all releases |
Code changes from version 3.0.3 to 3.1.0
- assets/css/export.css +9 -4
- assets/js/buttons.js +41 -14
- assets/js/export-fields.js +107 -50
- assets/js/filters.js +393 -358
- assets/js/settings-form.js +5 -1
- classes/FPDF/class-woe-fpdf.php +164 -105
- classes/FPDF/class-woe-pdf-mc-table.php +43 -18
- classes/admin/class-wc-order-export-manage.php +14 -4
- classes/admin/tabs/ajax/trait-wc-order-export-admin-tab-abstract-ajax-export.php +8 -2
- classes/class-wc-order-export-admin.php +6 -5
- classes/core/class-wc-order-export-data-extractor-ui.php +221 -135
- classes/core/class-wc-order-export-data-extractor.php +42 -615
- classes/core/class-wc-order-export-engine.php +24 -8
- classes/core/class-wc-order-export-order-coupon-fields.php +52 -0
- classes/core/class-wc-order-export-order-fields.php +388 -0
- classes/core/class-wc-order-export-order-product-fields.php +269 -0
- classes/formats/abstract-class-woe-formatter-plain-format.php +47 -6
- classes/formats/abstract-class-woe-formatter.php +4 -0
- classes/formats/class-woe-formatter-html.php +17 -0
- classes/formats/class-woe-formatter-json.php +14 -6
- classes/formats/class-woe-formatter-pdf.php +5 -2
- classes/formats/class-woe-formatter-xml.php +1 -1
- classes/formats/trait-woe-plain-format.php +2 -0
- i18n/languages/woo-order-export-lite.pot +447 -359
- readme.txt +20 -2
- view/settings-form.php +85 -26
- woo-order-export-lite.php +3 -3
assets/css/export.css
CHANGED
@@ -470,7 +470,7 @@ input.date {
|
|
470 |
display: none;
|
471 |
}
|
472 |
|
473 |
-
.mapping_row.segment_products {
|
474 |
background-color: #c5ffbb;
|
475 |
}
|
476 |
|
@@ -645,12 +645,17 @@ input.date {
|
|
645 |
#manage_fields.summary-products-report .fields-control-block,
|
646 |
#manage_fields.summary-products-report #order_fields .mapping_row:not(.segment_products),
|
647 |
#manage_fields.summary-products-report .field-prefix,
|
648 |
-
#manage_fields.summary-products-report #unselected_fields .subsubsub,
|
649 |
#manage_fields.summary-products-report #unselected_fields label[for="select_custom_meta_order_items"],
|
650 |
-
#manage_fields.summary-products-report #unselected_fields #select_custom_meta_order_items
|
|
|
651 |
display: none;
|
652 |
}
|
653 |
|
|
|
|
|
|
|
|
|
654 |
#manage_fields.summary-products-report #unselected_fields .tab-actions-buttons {
|
655 |
margin-top: 0;
|
656 |
}
|
@@ -728,7 +733,7 @@ input.date {
|
|
728 |
}
|
729 |
/*date time picker finish*/
|
730 |
|
731 |
-
.summary-products-report .summary-products-mode-tip {
|
732 |
display: block;
|
733 |
}
|
734 |
|
470 |
display: none;
|
471 |
}
|
472 |
|
473 |
+
.mapping_row.segment_products, .mapping_row.segment_product_items {
|
474 |
background-color: #c5ffbb;
|
475 |
}
|
476 |
|
645 |
#manage_fields.summary-products-report .fields-control-block,
|
646 |
#manage_fields.summary-products-report #order_fields .mapping_row:not(.segment_products),
|
647 |
#manage_fields.summary-products-report .field-prefix,
|
648 |
+
#manage_fields.summary-products-report #unselected_fields .subsubsub .block-segment-choice,
|
649 |
#manage_fields.summary-products-report #unselected_fields label[for="select_custom_meta_order_items"],
|
650 |
+
#manage_fields.summary-products-report #unselected_fields #select_custom_meta_order_items
|
651 |
+
{
|
652 |
display: none;
|
653 |
}
|
654 |
|
655 |
+
#manage_fields.summary-products-report #unselected_fields .subsubsub .block-segment-choice[data-segment="products"] {
|
656 |
+
display: inline;
|
657 |
+
}
|
658 |
+
|
659 |
#manage_fields.summary-products-report #unselected_fields .tab-actions-buttons {
|
660 |
margin-top: 0;
|
661 |
}
|
733 |
}
|
734 |
/*date time picker finish*/
|
735 |
|
736 |
+
.summary-products-report .summary-products-mode-tip, .summary-customers-report .summary-products-mode-tip {
|
737 |
display: block;
|
738 |
}
|
739 |
|
assets/js/buttons.js
CHANGED
@@ -1,13 +1,23 @@
|
|
1 |
function woe_show_preview( response ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
var id = 'output_preview';
|
3 |
if ( woe_is_flat_format( output_format ) ) {
|
4 |
id = 'output_preview_csv';
|
5 |
}
|
6 |
if ( woe_is_object_format( output_format ) ) {
|
7 |
-
jQuery( '#' + id ).text(
|
8 |
}
|
9 |
else {
|
10 |
-
jQuery( '#' + id ).html(
|
11 |
}
|
12 |
jQuery( '#' + id ).show();
|
13 |
window.scrollTo( 0, document.body.scrollHeight );
|
@@ -19,23 +29,23 @@ function woe_preview( size ) {
|
|
19 |
|
20 |
var data = 'json=' + woe_make_json_var( jQuery( '#export_job_settings' ) );
|
21 |
|
22 |
-
var estimate_data = data + "&action=order_exporter&method=estimate&mode=" + mode + "&id=" + job_id + '&woe_nonce=' + settings_form.woe_nonce + '&tab=' + settings_form.woe_active_tab;
|
23 |
|
24 |
-
jQuery.post( ajaxurl, estimate_data, function ( response ) {
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
}, "json" ).fail( function ( xhr, textStatus, errorThrown ) {
|
32 |
-
|
33 |
-
} );
|
34 |
|
35 |
|
36 |
data = data + "&action=order_exporter&method=preview&limit=" + size + "&mode=" + mode + "&id=" + job_id + '&woe_nonce=' + settings_form.woe_nonce + '&tab=' + settings_form.woe_active_tab;
|
37 |
|
38 |
-
jQuery.post( ajaxurl, data, woe_show_preview, "
|
39 |
woe_show_preview( xhr.responseText );
|
40 |
} );
|
41 |
}
|
@@ -240,9 +250,20 @@ function woe_get_all( start, percent, method ) {
|
|
240 |
}
|
241 |
}
|
242 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
jQuery( document ).ready( function ( $ ) {
|
244 |
|
245 |
$( ".preview-btn" ).click( function () {
|
|
|
246 |
woe_preview( jQuery( this ).attr( 'data-limit' ) );
|
247 |
return false;
|
248 |
} );
|
@@ -275,6 +296,8 @@ jQuery( document ).ready( function ( $ ) {
|
|
275 |
return false;
|
276 |
}
|
277 |
|
|
|
|
|
278 |
jQuery.ajax( {
|
279 |
type: "post",
|
280 |
data: data,
|
@@ -333,6 +356,8 @@ jQuery( document ).ready( function ( $ ) {
|
|
333 |
|
334 |
woe_set_form_submitting();
|
335 |
|
|
|
|
|
336 |
var data = 'json=' + woe_make_json_var( $( '#export_job_settings' ) )
|
337 |
data = data + "&action=order_exporter&method=save_settings&mode=" + mode + "&id=" + job_id + '&woe_nonce=' + settings_form.woe_nonce + '&tab=' + settings_form.woe_active_tab;
|
338 |
|
@@ -353,6 +378,8 @@ jQuery( document ).ready( function ( $ ) {
|
|
353 |
|
354 |
woe_set_form_submitting();
|
355 |
|
|
|
|
|
356 |
var data = 'json=' + woe_make_json_var( $( '#export_job_settings' ) )
|
357 |
|
358 |
data = data + "&action=order_exporter&method=save_settings&mode=" + mode + "&id=" + job_id + '&woe_nonce=' + settings_form.woe_nonce + '&tab=' + settings_form.woe_active_tab;
|
1 |
function woe_show_preview( response ) {
|
2 |
+
var html;
|
3 |
+
if(!response.html) {
|
4 |
+
html = response;
|
5 |
+
jQuery( '#preview_actions' ).addClass( 'hide' );
|
6 |
+
}
|
7 |
+
else {
|
8 |
+
html = response.html;
|
9 |
+
jQuery( '#output_preview_total' ).find( 'span' ).html( response.total );
|
10 |
+
jQuery( '#preview_actions' ).removeClass( 'hide' );
|
11 |
+
}
|
12 |
var id = 'output_preview';
|
13 |
if ( woe_is_flat_format( output_format ) ) {
|
14 |
id = 'output_preview_csv';
|
15 |
}
|
16 |
if ( woe_is_object_format( output_format ) ) {
|
17 |
+
jQuery( '#' + id ).text( html );
|
18 |
}
|
19 |
else {
|
20 |
+
jQuery( '#' + id ).html( html );
|
21 |
}
|
22 |
jQuery( '#' + id ).show();
|
23 |
window.scrollTo( 0, document.body.scrollHeight );
|
29 |
|
30 |
var data = 'json=' + woe_make_json_var( jQuery( '#export_job_settings' ) );
|
31 |
|
32 |
+
// var estimate_data = data + "&action=order_exporter&method=estimate&mode=" + mode + "&id=" + job_id + '&woe_nonce=' + settings_form.woe_nonce + '&tab=' + settings_form.woe_active_tab;
|
33 |
|
34 |
+
// jQuery.post( ajaxurl, estimate_data, function ( response ) {
|
35 |
+
// if ( ! response || typeof response.total == 'undefined' ) {
|
36 |
+
// woe_show_error_message( response );
|
37 |
+
// return;
|
38 |
+
// }
|
39 |
+
// jQuery( '#output_preview_total' ).find( 'span' ).html( response.total );
|
40 |
+
// jQuery( '#preview_actions' ).removeClass( 'hide' );
|
41 |
+
// }, "json" ).fail( function ( xhr, textStatus, errorThrown ) {
|
42 |
+
// woe_show_error_message( xhr.responseText );
|
43 |
+
// } );
|
44 |
|
45 |
|
46 |
data = data + "&action=order_exporter&method=preview&limit=" + size + "&mode=" + mode + "&id=" + job_id + '&woe_nonce=' + settings_form.woe_nonce + '&tab=' + settings_form.woe_active_tab;
|
47 |
|
48 |
+
jQuery.post( ajaxurl, data, woe_show_preview, "json" ).fail( function ( xhr, textStatus, errorThrown ) {
|
49 |
woe_show_preview( xhr.responseText );
|
50 |
} );
|
51 |
}
|
250 |
}
|
251 |
}
|
252 |
|
253 |
+
function woe_move_fields_in_product() {
|
254 |
+
if(!woe_is_flat_format()) {
|
255 |
+
jQuery('#sortable_products input').each(function() {
|
256 |
+
var name = jQuery(this).attr('name');
|
257 |
+
name = name.replace(/\w+(?=\[)/, 'products');
|
258 |
+
jQuery(this).attr('name', name);
|
259 |
+
});
|
260 |
+
}
|
261 |
+
}
|
262 |
+
|
263 |
jQuery( document ).ready( function ( $ ) {
|
264 |
|
265 |
$( ".preview-btn" ).click( function () {
|
266 |
+
woe_move_fields_in_product();
|
267 |
woe_preview( jQuery( this ).attr( 'data-limit' ) );
|
268 |
return false;
|
269 |
} );
|
296 |
return false;
|
297 |
}
|
298 |
|
299 |
+
woe_move_fields_in_product();
|
300 |
+
|
301 |
jQuery.ajax( {
|
302 |
type: "post",
|
303 |
data: data,
|
356 |
|
357 |
woe_set_form_submitting();
|
358 |
|
359 |
+
woe_move_fields_in_product();
|
360 |
+
|
361 |
var data = 'json=' + woe_make_json_var( $( '#export_job_settings' ) )
|
362 |
data = data + "&action=order_exporter&method=save_settings&mode=" + mode + "&id=" + job_id + '&woe_nonce=' + settings_form.woe_nonce + '&tab=' + settings_form.woe_active_tab;
|
363 |
|
378 |
|
379 |
woe_set_form_submitting();
|
380 |
|
381 |
+
woe_move_fields_in_product();
|
382 |
+
|
383 |
var data = 'json=' + woe_make_json_var( $( '#export_job_settings' ) )
|
384 |
|
385 |
data = data + "&action=order_exporter&method=save_settings&mode=" + mode + "&id=" + job_id + '&woe_nonce=' + settings_form.woe_nonce + '&tab=' + settings_form.woe_active_tab;
|
assets/js/export-fields.js
CHANGED
@@ -2,9 +2,7 @@ function woe_create_selected_fields( old_output_format, format, format_changed )
|
|
2 |
|
3 |
var $old_format_order_fields = jQuery( "#order_fields" ).clone();
|
4 |
|
5 |
-
|
6 |
-
woe_create_unselected_fields( old_output_format, format, format_changed, $old_format_order_fields );
|
7 |
-
}, 0 );
|
8 |
|
9 |
//jQuery( '#export_job_settings' ).prepend( jQuery( "#fields_control_products" ) );
|
10 |
//jQuery( '#export_job_settings' ).prepend( jQuery( "#fields_control_coupons" ) );
|
@@ -140,6 +138,7 @@ function woe_create_selected_fields( old_output_format, format, format_changed )
|
|
140 |
}
|
141 |
|
142 |
woe_add_bind_for_custom_fields( 'products', output_format, jQuery( "#order_fields" ) );
|
|
|
143 |
woe_add_bind_for_custom_fields( 'coupons', output_format, jQuery( "#order_fields" ) );
|
144 |
|
145 |
jQuery( "#sortable_products" ).sortable();
|
@@ -391,6 +390,9 @@ function woe_sprintf( format ) {
|
|
391 |
}
|
392 |
|
393 |
function woe_make_unselected_field( $index, $field_data, $format, $format_changed, $segment ) {
|
|
|
|
|
|
|
394 |
|
395 |
var label_part = '';
|
396 |
var label_prefix = '';
|
@@ -477,17 +479,26 @@ function woe_make_unselected_field( $index, $field_data, $format, $format_change
|
|
477 |
.append( delete_btn );
|
478 |
|
479 |
$field.find( 'input' ).prop( 'disabled', 'disabled' );
|
480 |
-
|
|
|
|
|
|
|
481 |
return $field;
|
482 |
}
|
483 |
|
484 |
function woe_activate_draggable_field( el, segment, format ) {
|
|
|
|
|
|
|
485 |
|
486 |
var no_flat_sortable_selector = '#manage_fields #order_fields #sortable_' + segment;
|
487 |
var flat_sortable_selector = '#manage_fields #order_fields';
|
|
|
|
|
|
|
488 |
|
489 |
el.draggable( {
|
490 |
-
connectToSortable: [no_flat_sortable_selector, flat_sortable_selector].join( ',' ),
|
491 |
helper: "clone",
|
492 |
revert: "invalid",
|
493 |
start: function ( event, ui ) {
|
@@ -759,7 +770,15 @@ function woe_add_bind_for_custom_fields( prefix, output_format, $to ) {
|
|
759 |
}
|
760 |
|
761 |
if ( ! label ) {
|
762 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
763 |
return false
|
764 |
}
|
765 |
if ( colname == undefined || colname == '' ) {
|
@@ -1004,35 +1023,40 @@ jQuery( document ).ready( function ( $ ) {
|
|
1004 |
woe_reset_field_contorls();
|
1005 |
} );
|
1006 |
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
|
|
|
|
|
|
|
|
1016 |
|
1017 |
jQuery( '#adjust-fields-btn' ).click( function () {
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
} );
|
1022 |
|
1023 |
-
|
1024 |
|
1025 |
-
|
1026 |
-
|
1027 |
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
|
|
1036 |
|
1037 |
jQuery( '.field_section' ).click( function () {
|
1038 |
|
@@ -1256,7 +1280,9 @@ jQuery( document ).ready( function ( $ ) {
|
|
1256 |
);
|
1257 |
}
|
1258 |
|
1259 |
-
|
|
|
|
|
1260 |
|
1261 |
jQuery( '.tab-controls .other_items-actions-buttons .add-shipping' ).on( 'click', function () {
|
1262 |
jQuery( '.tab-actions-forms .segment-form' ).removeClass( 'active' );
|
@@ -1315,7 +1341,9 @@ jQuery( document ).ready( function ( $ ) {
|
|
1315 |
);
|
1316 |
}
|
1317 |
|
1318 |
-
|
|
|
|
|
1319 |
|
1320 |
jQuery( '.tab-controls .other_items-actions-buttons .add-tax' ).on( 'click', function () {
|
1321 |
jQuery( '.tab-actions-forms .segment-form' ).removeClass( 'active' );
|
@@ -1374,7 +1402,9 @@ jQuery( document ).ready( function ( $ ) {
|
|
1374 |
);
|
1375 |
}
|
1376 |
|
1377 |
-
|
|
|
|
|
1378 |
|
1379 |
///*CUSTOM FIELDS BINDS
|
1380 |
|
@@ -1406,7 +1436,6 @@ jQuery( document ).ready( function ( $ ) {
|
|
1406 |
|
1407 |
jQuery( 'input[name=custom_meta_products_mode]' ).change( function () {
|
1408 |
jQuery( '#select_custom_meta_products' ).prop( "disabled", true );
|
1409 |
-
jQuery( '#select_custom_meta_order_items' ).prop( "disabled", true );
|
1410 |
if ( ! jQuery( this ).is( ':checked' ) ) {
|
1411 |
var options = '<option></option>';
|
1412 |
jQuery.each( window.order_products_custom_meta_fields, function ( index, value ) {
|
@@ -1414,19 +1443,12 @@ jQuery( document ).ready( function ( $ ) {
|
|
1414 |
} );
|
1415 |
jQuery( '#select_custom_meta_products' ).html( options );
|
1416 |
jQuery( '#select_custom_meta_products' ).prop( "disabled", false );
|
1417 |
-
|
1418 |
-
options = '<option></option>';
|
1419 |
-
jQuery.each( window.order_order_item_custom_meta_fields, function ( index, value ) {
|
1420 |
-
options += '<option value="' + woe_escape_str( value ) + '">' + value + '</option>';
|
1421 |
-
} );
|
1422 |
-
jQuery( '#select_custom_meta_order_items' ).html( options );
|
1423 |
-
jQuery( '#select_custom_meta_order_items' ).prop( "disabled", false );
|
1424 |
}
|
1425 |
else {
|
1426 |
// jQuery('#modal-manage-products').html(jQuery('#TB_ajaxContent').html());
|
1427 |
-
var data = jQuery( '#export_job_settings' ).serialize(),
|
|
|
1428 |
data_products = data + "&action=order_exporter&method=get_used_custom_products_meta&mode=" + mode + "&id=" + job_id + '&woe_nonce=' + settings_form.woe_nonce + '&tab=' + settings_form.woe_active_tab;
|
1429 |
-
data_order_items = data + "&action=order_exporter&method=get_used_custom_order_items_meta&mode=" + mode + "&id=" + job_id + '&woe_nonce=' + settings_form.woe_nonce + '&tab=' + settings_form.woe_active_tab;
|
1430 |
|
1431 |
jQuery.post( ajaxurl, data_products, function ( response ) {
|
1432 |
if ( response ) {
|
@@ -1438,6 +1460,25 @@ jQuery( document ).ready( function ( $ ) {
|
|
1438 |
jQuery( '#select_custom_meta_products' ).prop( "disabled", false );
|
1439 |
}
|
1440 |
}, 'json' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1441 |
|
1442 |
jQuery.post( ajaxurl, data_order_items, function ( response ) {
|
1443 |
if ( response ) {
|
@@ -1449,12 +1490,16 @@ jQuery( document ).ready( function ( $ ) {
|
|
1449 |
jQuery( '#select_custom_meta_order_items' ).prop( "disabled", false );
|
1450 |
}
|
1451 |
}, 'json' );
|
1452 |
-
|
1453 |
// jQuery('#modal-manage-products').html('');
|
1454 |
}
|
1455 |
} );
|
1456 |
|
1457 |
-
|
|
|
|
|
|
|
|
|
|
|
1458 |
|
1459 |
jQuery( 'input[name=custom_meta_coupons_mode]' ).change( function () {
|
1460 |
|
@@ -1545,12 +1590,12 @@ jQuery( document ).ready( function ( $ ) {
|
|
1545 |
var segment = 'products';
|
1546 |
|
1547 |
// hide product fields starts with 'line' and 'qty'
|
1548 |
-
$( '#products_unselected_segment input, #order_fields input' ).map( function () {
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
} );
|
1554 |
|
1555 |
if ( 'onstart' !== action ) {
|
1556 |
// purge summary report fields before insert
|
@@ -1612,8 +1657,12 @@ jQuery( document ).ready( function ( $ ) {
|
|
1612 |
var summary_report_fields = [];
|
1613 |
|
1614 |
summary_report_fields.push( $( '#user_unselected_segment input[value="summary_report_total_count"]' ).parents( 'li' ) );
|
|
|
|
|
1615 |
summary_report_fields.push( $( '#user_unselected_segment input[value="summary_report_total_amount"]' ).parents( 'li' ) );
|
1616 |
summary_report_fields.push( $( '#user_unselected_segment input[value="summary_report_total_amount_paid"]' ).parents( 'li' ) );
|
|
|
|
|
1617 |
summary_report_fields.push( $( '#user_unselected_segment input[value="summary_report_total_refund_count"]' ).parents( 'li' ) );
|
1618 |
summary_report_fields.push( $( '#user_unselected_segment input[value="summary_report_total_refund_amount"]' ).parents( 'li' ) );
|
1619 |
|
@@ -1631,8 +1680,12 @@ jQuery( document ).ready( function ( $ ) {
|
|
1631 |
if ( 'onstart' !== action ) {
|
1632 |
// purge summary report fields before insert
|
1633 |
$( '#order_fields .segment_user input[value="summary_report_total_count"]' ).closest( '.mapping_row' ).remove();
|
|
|
|
|
1634 |
$( '#order_fields .segment_user input[value="summary_report_total_amount"]' ).closest( '.mapping_row' ).remove();
|
1635 |
$( '#order_fields .segment_user input[value="summary_report_total_amount_paid"]' ).closest( '.mapping_row' ).remove();
|
|
|
|
|
1636 |
$( '#order_fields .segment_user input[value="summary_report_total_refund_count"]' ).closest( '.mapping_row' ).remove();
|
1637 |
$( '#order_fields .segment_user input[value="summary_report_total_refund_amount"]' ).closest( '.mapping_row' ).remove();
|
1638 |
|
@@ -1658,8 +1711,12 @@ jQuery( document ).ready( function ( $ ) {
|
|
1658 |
|
1659 |
// purge summary report fields
|
1660 |
$( '#order_fields .segment_user input[value="summary_report_total_count"]' ).closest( '.mapping_row' ).remove();
|
|
|
|
|
1661 |
$( '#order_fields .segment_user input[value="summary_report_total_amount"]' ).closest( '.mapping_row' ).remove();
|
1662 |
$( '#order_fields .segment_user input[value="summary_report_total_amount_paid"]' ).closest( '.mapping_row' ).remove();
|
|
|
|
|
1663 |
$( '#order_fields .segment_user input[value="summary_report_total_refund_count"]' ).closest( '.mapping_row' ).remove();
|
1664 |
$( '#order_fields .segment_user input[value="summary_report_total_refund_amount"]' ).closest( '.mapping_row' ).remove();
|
1665 |
|
2 |
|
3 |
var $old_format_order_fields = jQuery( "#order_fields" ).clone();
|
4 |
|
5 |
+
woe_create_unselected_fields( old_output_format, format, format_changed, $old_format_order_fields );
|
|
|
|
|
6 |
|
7 |
//jQuery( '#export_job_settings' ).prepend( jQuery( "#fields_control_products" ) );
|
8 |
//jQuery( '#export_job_settings' ).prepend( jQuery( "#fields_control_coupons" ) );
|
138 |
}
|
139 |
|
140 |
woe_add_bind_for_custom_fields( 'products', output_format, jQuery( "#order_fields" ) );
|
141 |
+
woe_add_bind_for_custom_fields( 'product_items', output_format, jQuery( "#order_fields" ) );
|
142 |
woe_add_bind_for_custom_fields( 'coupons', output_format, jQuery( "#order_fields" ) );
|
143 |
|
144 |
jQuery( "#sortable_products" ).sortable();
|
390 |
}
|
391 |
|
392 |
function woe_make_unselected_field( $index, $field_data, $format, $format_changed, $segment ) {
|
393 |
+
if ( $segment === 'product_items' ) {
|
394 |
+
$segment = 'products';
|
395 |
+
}
|
396 |
|
397 |
var label_part = '';
|
398 |
var label_prefix = '';
|
479 |
.append( delete_btn );
|
480 |
|
481 |
$field.find( 'input' ).prop( 'disabled', 'disabled' );
|
482 |
+
if($index.match(/summary_report_.+/))
|
483 |
+
if((!jQuery('#summary_report_by_products_checkbox').is(":checked") && $segment == 'products') ||
|
484 |
+
(!jQuery('#summary_report_by_customers_checkbox').is(":checked") && $segment == 'user'))
|
485 |
+
$field.hide();
|
486 |
return $field;
|
487 |
}
|
488 |
|
489 |
function woe_activate_draggable_field( el, segment, format ) {
|
490 |
+
if ( segment === 'product_items' ) {
|
491 |
+
segment = 'products';
|
492 |
+
}
|
493 |
|
494 |
var no_flat_sortable_selector = '#manage_fields #order_fields #sortable_' + segment;
|
495 |
var flat_sortable_selector = '#manage_fields #order_fields';
|
496 |
+
var sortable_products_selector = '';
|
497 |
+
if(!woe_is_flat_format())
|
498 |
+
sortable_products_selector = '#sortable_products';
|
499 |
|
500 |
el.draggable( {
|
501 |
+
connectToSortable: [no_flat_sortable_selector, flat_sortable_selector, sortable_products_selector].join( ',' ),
|
502 |
helper: "clone",
|
503 |
revert: "invalid",
|
504 |
start: function ( event, ui ) {
|
770 |
}
|
771 |
|
772 |
if ( ! label ) {
|
773 |
+
if(prefix == 'products') {
|
774 |
+
alert( export_messages.empty_meta_key_and_taxonomy );
|
775 |
+
}
|
776 |
+
else if(prefix == 'product_items') {
|
777 |
+
alert( export_messages.empty_item_field );
|
778 |
+
}
|
779 |
+
else {
|
780 |
+
alert( export_messages.empty_meta_key );
|
781 |
+
}
|
782 |
return false
|
783 |
}
|
784 |
if ( colname == undefined || colname == '' ) {
|
1023 |
woe_reset_field_contorls();
|
1024 |
} );
|
1025 |
|
1026 |
+
|
1027 |
+
setTimeout(function () {
|
1028 |
+
woe_create_selected_fields( null, output_format, false );
|
1029 |
+
if ( summary_mode_by_products ) {
|
1030 |
+
$( '.segment_choice[href="#segment=products"]' ).click()
|
1031 |
+
} else if ( summary_mode_by_customers ) {
|
1032 |
+
$( '.segment_choice[href="#segment=user"]' ).click()
|
1033 |
+
} else if ( window.location.hash.indexOf( 'segment' ) !== - 1 ) {
|
1034 |
+
$( '.segment_choice[href="' + window.location.hash + '"]' ).click()
|
1035 |
+
} else {
|
1036 |
+
$( '.segment_choice' ).first().click();
|
1037 |
+
}
|
1038 |
+
}, 1000);
|
1039 |
|
1040 |
jQuery( '#adjust-fields-btn' ).click( function () {
|
1041 |
+
jQuery( '#fields' ).toggle();
|
1042 |
+
jQuery( '#fields_control' ).toggle();
|
1043 |
+
return false;
|
1044 |
} );
|
1045 |
|
1046 |
+
setTimeout( function () {
|
1047 |
|
1048 |
+
jQuery( "#sort_products" ).sortable()/*.disableSelection()*/;
|
1049 |
+
jQuery( "#sort_coupons" ).sortable()/*.disableSelection()*/;
|
1050 |
|
1051 |
+
jQuery( "#order_fields" ).sortable( {
|
1052 |
+
scroll: true,
|
1053 |
+
scrollSensitivity: 100,
|
1054 |
+
scrollSpeed: 100,
|
1055 |
+
stop: function ( event, ui ) {
|
1056 |
+
woe_moving_products_and_coupons_group_blocks_to_first_item( jQuery( '.output_format:checked' ).val() );
|
1057 |
+
}
|
1058 |
+
} );
|
1059 |
+
}, 0);
|
1060 |
|
1061 |
jQuery( '.field_section' ).click( function () {
|
1062 |
|
1280 |
);
|
1281 |
}
|
1282 |
|
1283 |
+
setTimeout( function () {
|
1284 |
+
load_order_fee_items();
|
1285 |
+
}, 0);
|
1286 |
|
1287 |
jQuery( '.tab-controls .other_items-actions-buttons .add-shipping' ).on( 'click', function () {
|
1288 |
jQuery( '.tab-actions-forms .segment-form' ).removeClass( 'active' );
|
1341 |
);
|
1342 |
}
|
1343 |
|
1344 |
+
setTimeout( function () {
|
1345 |
+
load_order_shipping_items();
|
1346 |
+
}, 0);
|
1347 |
|
1348 |
jQuery( '.tab-controls .other_items-actions-buttons .add-tax' ).on( 'click', function () {
|
1349 |
jQuery( '.tab-actions-forms .segment-form' ).removeClass( 'active' );
|
1402 |
);
|
1403 |
}
|
1404 |
|
1405 |
+
setTimeout( function () {
|
1406 |
+
load_order_tax_items();
|
1407 |
+
}, 0);
|
1408 |
|
1409 |
///*CUSTOM FIELDS BINDS
|
1410 |
|
1436 |
|
1437 |
jQuery( 'input[name=custom_meta_products_mode]' ).change( function () {
|
1438 |
jQuery( '#select_custom_meta_products' ).prop( "disabled", true );
|
|
|
1439 |
if ( ! jQuery( this ).is( ':checked' ) ) {
|
1440 |
var options = '<option></option>';
|
1441 |
jQuery.each( window.order_products_custom_meta_fields, function ( index, value ) {
|
1443 |
} );
|
1444 |
jQuery( '#select_custom_meta_products' ).html( options );
|
1445 |
jQuery( '#select_custom_meta_products' ).prop( "disabled", false );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1446 |
}
|
1447 |
else {
|
1448 |
// jQuery('#modal-manage-products').html(jQuery('#TB_ajaxContent').html());
|
1449 |
+
//var data = jQuery( '#export_job_settings' ).serialize(),
|
1450 |
+
var data = 'json=' + woe_make_json_var( jQuery( '#export_job_settings' ) ),
|
1451 |
data_products = data + "&action=order_exporter&method=get_used_custom_products_meta&mode=" + mode + "&id=" + job_id + '&woe_nonce=' + settings_form.woe_nonce + '&tab=' + settings_form.woe_active_tab;
|
|
|
1452 |
|
1453 |
jQuery.post( ajaxurl, data_products, function ( response ) {
|
1454 |
if ( response ) {
|
1460 |
jQuery( '#select_custom_meta_products' ).prop( "disabled", false );
|
1461 |
}
|
1462 |
}, 'json' );
|
1463 |
+
// jQuery('#modal-manage-products').html('');
|
1464 |
+
}
|
1465 |
+
} );
|
1466 |
+
|
1467 |
+
jQuery( 'input[name=custom_meta_product_items_mode]' ).change( function () {
|
1468 |
+
jQuery( '#select_custom_meta_order_items' ).prop( "disabled", true );
|
1469 |
+
if ( ! jQuery( this ).is( ':checked' ) ) {
|
1470 |
+
options = '<option></option>';
|
1471 |
+
jQuery.each( window.order_order_item_custom_meta_fields, function ( index, value ) {
|
1472 |
+
options += '<option value="' + woe_escape_str( value ) + '">' + value + '</option>';
|
1473 |
+
} );
|
1474 |
+
jQuery( '#select_custom_meta_order_items' ).html( options );
|
1475 |
+
jQuery( '#select_custom_meta_order_items' ).prop( "disabled", false );
|
1476 |
+
}
|
1477 |
+
else {
|
1478 |
+
// jQuery('#modal-manage-products').html(jQuery('#TB_ajaxContent').html());
|
1479 |
+
//var data = jQuery( '#export_job_settings' ).serialize(),
|
1480 |
+
var data = 'json=' + woe_make_json_var( jQuery( '#export_job_settings' ) ),
|
1481 |
+
data_order_items = data + "&action=order_exporter&method=get_used_custom_order_items_meta&mode=" + mode + "&id=" + job_id + '&woe_nonce=' + settings_form.woe_nonce + '&tab=' + settings_form.woe_active_tab;
|
1482 |
|
1483 |
jQuery.post( ajaxurl, data_order_items, function ( response ) {
|
1484 |
if ( response ) {
|
1490 |
jQuery( '#select_custom_meta_order_items' ).prop( "disabled", false );
|
1491 |
}
|
1492 |
}, 'json' );
|
|
|
1493 |
// jQuery('#modal-manage-products').html('');
|
1494 |
}
|
1495 |
} );
|
1496 |
|
1497 |
+
setTimeout( function () {
|
1498 |
+
jQuery( 'input[name=custom_meta_products_mode]' ).trigger( 'change' );
|
1499 |
+
}, 0);
|
1500 |
+
setTimeout( function () {
|
1501 |
+
jQuery( 'input[name=custom_meta_product_items_mode]' ).trigger( 'change' );
|
1502 |
+
}, 0);
|
1503 |
|
1504 |
jQuery( 'input[name=custom_meta_coupons_mode]' ).change( function () {
|
1505 |
|
1590 |
var segment = 'products';
|
1591 |
|
1592 |
// hide product fields starts with 'line' and 'qty'
|
1593 |
+
// $( '#products_unselected_segment input, #order_fields input' ).map( function () {
|
1594 |
+
// var matches = $( this ).attr( 'value' ).match( /plain_products_(line|qty).*/ );
|
1595 |
+
// if ( matches ) {
|
1596 |
+
// $( this ).closest( '.mapping_row' ).hide();
|
1597 |
+
// }
|
1598 |
+
// } );
|
1599 |
|
1600 |
if ( 'onstart' !== action ) {
|
1601 |
// purge summary report fields before insert
|
1657 |
var summary_report_fields = [];
|
1658 |
|
1659 |
summary_report_fields.push( $( '#user_unselected_segment input[value="summary_report_total_count"]' ).parents( 'li' ) );
|
1660 |
+
summary_report_fields.push( $( '#user_unselected_segment input[value="summary_report_total_count_items"]' ).parents( 'li' ) );
|
1661 |
+
summary_report_fields.push( $( '#user_unselected_segment input[value="summary_report_total_count_items_exported"]' ).parents( 'li' ) );
|
1662 |
summary_report_fields.push( $( '#user_unselected_segment input[value="summary_report_total_amount"]' ).parents( 'li' ) );
|
1663 |
summary_report_fields.push( $( '#user_unselected_segment input[value="summary_report_total_amount_paid"]' ).parents( 'li' ) );
|
1664 |
+
summary_report_fields.push( $( '#user_unselected_segment input[value="summary_report_total_shipping"]' ).parents( 'li' ) );
|
1665 |
+
summary_report_fields.push( $( '#user_unselected_segment input[value="summary_report_total_discount"]' ).parents( 'li' ) );
|
1666 |
summary_report_fields.push( $( '#user_unselected_segment input[value="summary_report_total_refund_count"]' ).parents( 'li' ) );
|
1667 |
summary_report_fields.push( $( '#user_unselected_segment input[value="summary_report_total_refund_amount"]' ).parents( 'li' ) );
|
1668 |
|
1680 |
if ( 'onstart' !== action ) {
|
1681 |
// purge summary report fields before insert
|
1682 |
$( '#order_fields .segment_user input[value="summary_report_total_count"]' ).closest( '.mapping_row' ).remove();
|
1683 |
+
$( '#order_fields .segment_user input[value="summary_report_total_count_items"]' ).closest( '.mapping_row' ).remove();
|
1684 |
+
$( '#order_fields .segment_user input[value="summary_report_total_count_items_exported"]' ).closest( '.mapping_row' ).remove();
|
1685 |
$( '#order_fields .segment_user input[value="summary_report_total_amount"]' ).closest( '.mapping_row' ).remove();
|
1686 |
$( '#order_fields .segment_user input[value="summary_report_total_amount_paid"]' ).closest( '.mapping_row' ).remove();
|
1687 |
+
$( '#order_fields .segment_user input[value="summary_report_total_shipping"]' ).closest( '.mapping_row' ).remove();
|
1688 |
+
$( '#order_fields .segment_user input[value="summary_report_total_discount"]' ).closest( '.mapping_row' ).remove();
|
1689 |
$( '#order_fields .segment_user input[value="summary_report_total_refund_count"]' ).closest( '.mapping_row' ).remove();
|
1690 |
$( '#order_fields .segment_user input[value="summary_report_total_refund_amount"]' ).closest( '.mapping_row' ).remove();
|
1691 |
|
1711 |
|
1712 |
// purge summary report fields
|
1713 |
$( '#order_fields .segment_user input[value="summary_report_total_count"]' ).closest( '.mapping_row' ).remove();
|
1714 |
+
$( '#order_fields .segment_user input[value="summary_report_total_count_items"]' ).closest( '.mapping_row' ).remove();
|
1715 |
+
$( '#order_fields .segment_user input[value="summary_report_total_count_items_exported"]' ).closest( '.mapping_row' ).remove();
|
1716 |
$( '#order_fields .segment_user input[value="summary_report_total_amount"]' ).closest( '.mapping_row' ).remove();
|
1717 |
$( '#order_fields .segment_user input[value="summary_report_total_amount_paid"]' ).closest( '.mapping_row' ).remove();
|
1718 |
+
$( '#order_fields .segment_user input[value="summary_report_total_shipping"]' ).closest( '.mapping_row' ).remove();
|
1719 |
+
$( '#order_fields .segment_user input[value="summary_report_total_discount"]' ).closest( '.mapping_row' ).remove();
|
1720 |
$( '#order_fields .segment_user input[value="summary_report_total_refund_count"]' ).closest( '.mapping_row' ).remove();
|
1721 |
$( '#order_fields .segment_user input[value="summary_report_total_refund_amount"]' ).closest( '.mapping_row' ).remove();
|
1722 |
|
assets/js/filters.js
CHANGED
@@ -16,51 +16,53 @@ jQuery( document ).ready( function ( $ ) {
|
|
16 |
}
|
17 |
}
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
|
|
64 |
|
65 |
jQuery( '#add_attributes' ).on( 'click', function () {
|
66 |
|
@@ -151,9 +153,11 @@ jQuery( document ).ready( function ( $ ) {
|
|
151 |
}, 'json' );
|
152 |
} );
|
153 |
|
154 |
-
|
155 |
-
|
156 |
-
|
|
|
|
|
157 |
|
158 |
jQuery( '#add_itemmeta' ).on( 'click', function () {
|
159 |
|
@@ -229,47 +233,50 @@ jQuery( document ).ready( function ( $ ) {
|
|
229 |
}
|
230 |
} );
|
231 |
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
|
270 |
-
jQuery( '#taxonomies_compare' ).trigger( 'change' );
|
271 |
-
}, 'json' );
|
272 |
-
} ).trigger( 'change' );
|
273 |
|
274 |
jQuery( '#add_taxonomies' ).on( 'click', function () {
|
275 |
|
@@ -321,46 +328,48 @@ jQuery( document ).ready( function ( $ ) {
|
|
321 |
} );
|
322 |
//PRODUCT TAXONOMIES END
|
323 |
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
|
|
|
|
364 |
|
365 |
jQuery( '#add_product_custom_fields' ).click( function () {
|
366 |
|
@@ -413,37 +422,39 @@ jQuery( document ).ready( function ( $ ) {
|
|
413 |
} );
|
414 |
//end of change
|
415 |
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
|
|
|
|
447 |
|
448 |
jQuery( '#add_shipping_locations' ).click( function () {
|
449 |
|
@@ -475,37 +486,39 @@ jQuery( document ).ready( function ( $ ) {
|
|
475 |
return false;
|
476 |
} );
|
477 |
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
|
|
|
|
509 |
|
510 |
jQuery( '#add_billing_locations' ).click( function () {
|
511 |
|
@@ -537,47 +550,49 @@ jQuery( document ).ready( function ( $ ) {
|
|
537 |
return false;
|
538 |
} )
|
539 |
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
|
|
|
|
581 |
|
582 |
jQuery( '#add_item_names' ).click( function () {
|
583 |
var val = ! jQuery( "#text_item_names" ).is( ':disabled' ) ? jQuery( "#text_item_names" ).val() : jQuery( "#text_order_item_name" ).val();
|
@@ -608,46 +623,48 @@ jQuery( document ).ready( function ( $ ) {
|
|
608 |
return false;
|
609 |
} );
|
610 |
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
|
|
|
|
651 |
|
652 |
jQuery( '#add_item_metadata' ).click( function () {
|
653 |
var val = ! jQuery( "#text_item_metadata" ).is( ':disabled' ) ? jQuery( "#text_item_metadata" ).val() : jQuery( "#text_order_itemmetadata" ).val();
|
@@ -678,45 +695,47 @@ jQuery( document ).ready( function ( $ ) {
|
|
678 |
return false;
|
679 |
} );
|
680 |
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
|
|
|
|
720 |
|
721 |
jQuery( '#add_user_custom_fields' ).click( function () {
|
722 |
|
@@ -775,47 +794,49 @@ jQuery( document ).ready( function ( $ ) {
|
|
775 |
}
|
776 |
} );
|
777 |
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
|
|
|
|
819 |
|
820 |
jQuery( '#add_custom_fields' ).click( function () {
|
821 |
|
@@ -874,18 +895,32 @@ jQuery( document ).ready( function ( $ ) {
|
|
874 |
//end of change
|
875 |
|
876 |
|
877 |
-
|
|
|
|
|
878 |
|
879 |
-
|
|
|
|
|
880 |
|
881 |
-
|
|
|
|
|
882 |
|
883 |
-
|
|
|
|
|
884 |
|
885 |
-
|
|
|
|
|
886 |
|
887 |
-
|
|
|
|
|
888 |
|
889 |
-
|
|
|
|
|
890 |
|
891 |
} );
|
16 |
}
|
17 |
}
|
18 |
|
19 |
+
setTimeout( function () {
|
20 |
+
//PRODUCT ATTRIBUTES BEGIN
|
21 |
+
jQuery( '#attributes' ).on( 'change', function () {
|
22 |
+
|
23 |
+
jQuery( '#select_attributes' ).attr( 'disabled', 'disabled' );
|
24 |
+
|
25 |
+
var data = {
|
26 |
+
attr: jQuery( this ).val(),
|
27 |
+
method: "get_products_attributes_values",
|
28 |
+
action: "order_exporter",
|
29 |
+
woe_nonce: settings_form.woe_nonce,
|
30 |
+
tab: settings_form.woe_active_tab,
|
31 |
+
woe_order_post_type: woe_order_post_type,
|
32 |
+
};
|
33 |
+
|
34 |
+
var val_op = jQuery( '#attributes_compare' ).val();
|
35 |
+
|
36 |
+
jQuery( '#text_attributes' ).val( '' );
|
37 |
+
|
38 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
39 |
+
|
40 |
+
jQuery( '#select_attributes--select2 select' ).select2( 'destroy' );
|
41 |
+
|
42 |
+
jQuery( '#select_attributes, #select_attributes--select2' ).remove();
|
43 |
+
|
44 |
+
if ( response ) {
|
45 |
+
var options = '';
|
46 |
+
jQuery.each( response, function ( index, value ) {
|
47 |
+
options += '<option>' + value + '</option>';
|
48 |
+
} );
|
49 |
+
var $select = jQuery( '<div id="select_attributes--select2" style="margin-top: 0px;margin-right: 6px; vertical-align: top;'
|
50 |
+
+ 'display: ' + (
|
51 |
+
(
|
52 |
+
'LIKE' === val_op
|
53 |
+
) ? 'none' : 'inline-block'
|
54 |
+
) + ';">'
|
55 |
+
+ '<select id="select_attributes">' + options + '</select></div>' );
|
56 |
+
$select.insertBefore( jQuery( '#add_attributes' ) )
|
57 |
+
$select.find( 'select' ).select2_i18n( {tags: true} );
|
58 |
+
}
|
59 |
+
else {
|
60 |
+
jQuery( '<input type="text" id="select_attributes" style="margin-right: 8px;">' ).insertBefore( jQuery( '#add_attributes' ) );
|
61 |
+
}
|
62 |
+
}, 'json' );
|
63 |
+
|
64 |
+
} ).trigger( 'change' );
|
65 |
+
}, 0);
|
66 |
|
67 |
jQuery( '#add_attributes' ).on( 'click', function () {
|
68 |
|
153 |
}, 'json' );
|
154 |
} );
|
155 |
|
156 |
+
setTimeout( function () {
|
157 |
+
if ( jQuery( '#itemmeta option' ).length > 0 ) {
|
158 |
+
jQuery( '#itemmeta' ).trigger( 'change' );
|
159 |
+
}
|
160 |
+
}, 0);
|
161 |
|
162 |
jQuery( '#add_itemmeta' ).on( 'click', function () {
|
163 |
|
233 |
}
|
234 |
} );
|
235 |
|
236 |
+
setTimeout( function () {
|
237 |
+
//PRODUCT TAXONOMIES BEGIN
|
238 |
+
jQuery( '#taxonomies' ).on( 'change', function () {
|
239 |
+
|
240 |
+
jQuery( '#select_taxonomies' ).attr( 'disabled', 'disabled' );
|
241 |
+
var data = {
|
242 |
+
'tax': jQuery( this ).val(),
|
243 |
+
method: "get_products_taxonomies_values",
|
244 |
+
action: "order_exporter",
|
245 |
+
woe_nonce: settings_form.woe_nonce,
|
246 |
+
tab: settings_form.woe_active_tab,
|
247 |
+
woe_order_post_type: woe_order_post_type,
|
248 |
+
};
|
249 |
+
|
250 |
+
var val_op = jQuery( '#taxonomies_compare' ).val();
|
251 |
+
|
252 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
253 |
+
jQuery( '#select_taxonomies--select2 select' ).select2( 'destroy' );
|
254 |
+
jQuery( '#select_taxonomies, #select_taxonomies--select2' ).remove();
|
255 |
+
if ( response ) {
|
256 |
+
var options = '';
|
257 |
+
jQuery.each( response, function ( index, value ) {
|
258 |
+
options += '<option>' + value + '</option>';
|
259 |
+
} );
|
260 |
+
var $select = jQuery( '<div id="select_taxonomies--select2" style="margin-top: 0px;margin-right: 6px; vertical-align: top;'
|
261 |
+
+ 'display: ' + (
|
262 |
+
(
|
263 |
+
'NOT SET' === val_op || 'IS SET' === val_op
|
264 |
+
) ? 'none' : 'inline-block'
|
265 |
+
) + ';">'
|
266 |
+
+ '<select id="select_taxonomies">' + options + '</select></div>' );
|
267 |
+
|
268 |
+
$select.insertBefore( jQuery( '#add_taxonomies' ) )
|
269 |
+
$select.find( 'select' ).select2_i18n( {tags: true} );
|
270 |
+
}
|
271 |
+
else {
|
272 |
+
jQuery( '<input type="text" id="select_taxonomies" style="margin-right: 8px;">' ).insertBefore( jQuery( '#add_taxonomies' ) );
|
273 |
+
}
|
274 |
+
|
275 |
+
jQuery( '#taxonomies_compare' ).trigger( 'change' );
|
276 |
+
}, 'json' );
|
277 |
+
} ).trigger( 'change' );
|
278 |
+
}, 0);
|
279 |
|
|
|
|
|
|
|
280 |
|
281 |
jQuery( '#add_taxonomies' ).on( 'click', function () {
|
282 |
|
328 |
} );
|
329 |
//PRODUCT TAXONOMIES END
|
330 |
|
331 |
+
setTimeout( function () {
|
332 |
+
// for filter by PRODUCT custom fields
|
333 |
+
jQuery( '#product_custom_fields' ).change( function () {
|
334 |
+
|
335 |
+
jQuery( '#select_product_custom_fields' ).attr( 'disabled', 'disabled' );
|
336 |
+
var data = {
|
337 |
+
'cf_name': jQuery( this ).val(),
|
338 |
+
method: "get_product_custom_fields_values",
|
339 |
+
action: "order_exporter",
|
340 |
+
woe_nonce: settings_form.woe_nonce,
|
341 |
+
tab: settings_form.woe_active_tab,
|
342 |
+
woe_order_post_type: woe_order_post_type,
|
343 |
+
};
|
344 |
+
|
345 |
+
var val_op = jQuery( '#product_custom_fields_compare' ).val();
|
346 |
+
jQuery( '#text_product_custom_fields' ).val( '' );
|
347 |
+
|
348 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
349 |
+
jQuery( '#select_product_custom_fields--select2 select' ).select2( 'destroy' );
|
350 |
+
jQuery( '#select_product_custom_fields, #select_product_custom_fields--select2' ).remove();
|
351 |
+
if ( response ) {
|
352 |
+
var options = '';
|
353 |
+
jQuery.each( response, function ( index, value ) {
|
354 |
+
options += '<option>' + value + '</option>';
|
355 |
+
} );
|
356 |
+
var $select = jQuery( '<div id="select_product_custom_fields--select2" style="margin-top: 0px;margin-right: 6px; vertical-align: top;'
|
357 |
+
+ 'display: ' + (
|
358 |
+
(
|
359 |
+
'LIKE' === val_op || 'NOT SET' === val_op || 'IS SET' === val_op
|
360 |
+
) ? 'none' : 'inline-block'
|
361 |
+
) + ';">'
|
362 |
+
+ '<select id="select_product_custom_fields">' + options + '</select></div>' );
|
363 |
+
$select.insertBefore( jQuery( '#add_product_custom_fields' ) )
|
364 |
+
$select.find( 'select' ).select2_i18n( {tags: true} );
|
365 |
+
}
|
366 |
+
else {
|
367 |
+
jQuery( '<input type="text" id="select_product_custom_fields" style="margin-right: 8px;">' ).insertBefore( jQuery( '#add_product_custom_fields' ) );
|
368 |
+
}
|
369 |
+
jQuery( '#product_custom_fields_compare' ).trigger( 'change' );
|
370 |
+
}, 'json' );
|
371 |
+
} ).trigger( 'change' );
|
372 |
+
}, 0);
|
373 |
|
374 |
jQuery( '#add_product_custom_fields' ).click( function () {
|
375 |
|
422 |
} );
|
423 |
//end of change
|
424 |
|
425 |
+
setTimeout( function () {
|
426 |
+
// SHIPPING LOCATIONS
|
427 |
+
jQuery( '#shipping_locations' ).change( function () {
|
428 |
+
|
429 |
+
jQuery( '#text_shipping_locations' ).attr( 'disabled', 'disabled' );
|
430 |
+
var data = {
|
431 |
+
'item': jQuery( this ).val(),
|
432 |
+
method: "get_order_shipping_values",
|
433 |
+
action: "order_exporter",
|
434 |
+
woe_nonce: settings_form.woe_nonce,
|
435 |
+
tab: settings_form.woe_active_tab,
|
436 |
+
woe_order_post_type: woe_order_post_type,
|
437 |
+
};
|
438 |
+
|
439 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
440 |
+
jQuery( '#text_shipping_locations--select2 select' ).select2( 'destroy' );
|
441 |
+
jQuery( '#text_shipping_locations, #text_shipping_locations--select2' ).remove();
|
442 |
+
if ( response ) {
|
443 |
+
var options = '';
|
444 |
+
jQuery.each( response, function ( index, value ) {
|
445 |
+
options += '<option>' + value + '</option>';
|
446 |
+
} );
|
447 |
+
|
448 |
+
var $select = jQuery( '<div id="text_shipping_locations--select2" style="margin-top: 0px;margin-right: 6px; vertical-align: top; display: inline-block;"><select id="text_shipping_locations">' + options + '</select></div>' );
|
449 |
+
$select.insertBefore( jQuery( '#add_shipping_locations' ) )
|
450 |
+
$select.find( 'select' ).select2_i18n( {tags: true} );
|
451 |
+
}
|
452 |
+
else {
|
453 |
+
jQuery( '<input type="text" id="text_shipping_locations" style="margin-right: 8px;">' ).insertBefore( jQuery( '#add_shipping_locations' ) );
|
454 |
+
}
|
455 |
+
}, 'json' );
|
456 |
+
} ).trigger( 'change' );
|
457 |
+
}, 0);
|
458 |
|
459 |
jQuery( '#add_shipping_locations' ).click( function () {
|
460 |
|
486 |
return false;
|
487 |
} );
|
488 |
|
489 |
+
setTimeout( function () {
|
490 |
+
// BILLING LOCATIONS
|
491 |
+
jQuery( '#billing_locations' ).change( function () {
|
492 |
+
|
493 |
+
jQuery( '#text_billing_locations' ).attr( 'disabled', 'disabled' );
|
494 |
+
var data = {
|
495 |
+
'item': jQuery( this ).val(),
|
496 |
+
method: "get_order_billing_values",
|
497 |
+
action: "order_exporter",
|
498 |
+
woe_nonce: settings_form.woe_nonce,
|
499 |
+
tab: settings_form.woe_active_tab,
|
500 |
+
woe_order_post_type: woe_order_post_type,
|
501 |
+
};
|
502 |
+
|
503 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
504 |
+
jQuery( '#text_billing_locations--select2 select' ).select2( 'destroy' );
|
505 |
+
jQuery( '#text_billing_locations, #text_billing_locations--select2' ).remove();
|
506 |
+
if ( response ) {
|
507 |
+
var options = '';
|
508 |
+
jQuery.each( response, function ( index, value ) {
|
509 |
+
options += '<option>' + value + '</option>';
|
510 |
+
} );
|
511 |
+
var $select = jQuery( '<div id="text_billing_locations--select2" style="margin-top: 0px;margin-right: 6px; vertical-align: top; display: inline-block;">'
|
512 |
+
+ '<select id="text_billing_locations">' + options + '</select></div>' );
|
513 |
+
$select.insertBefore( jQuery( '#add_billing_locations' ) )
|
514 |
+
$select.find( 'select' ).select2_i18n( {tags: true} );
|
515 |
+
}
|
516 |
+
else {
|
517 |
+
jQuery( '<input type="text" id="text_billing_locations" style="margin-right: 8px;">' ).insertBefore( jQuery( '#add_billing_locations' ) );
|
518 |
+
}
|
519 |
+
}, 'json' );
|
520 |
+
} ).trigger( 'change' );
|
521 |
+
}, 0);
|
522 |
|
523 |
jQuery( '#add_billing_locations' ).click( function () {
|
524 |
|
550 |
return false;
|
551 |
} )
|
552 |
|
553 |
+
setTimeout( function () {
|
554 |
+
// ITEM NAMES
|
555 |
+
jQuery( '#item_names' ).change( function () {
|
556 |
+
var val_op = jQuery( '#item_name_compare' ).val();
|
557 |
+
jQuery( '#text_order_item_name' ).val( '' );
|
558 |
+
jQuery( '#text_item_names' ).attr( 'disabled', 'disabled' );
|
559 |
+
var data = {
|
560 |
+
'item_type': jQuery( this ).val(),
|
561 |
+
method: "get_order_item_names",
|
562 |
+
action: "order_exporter",
|
563 |
+
woe_nonce: settings_form.woe_nonce,
|
564 |
+
tab: settings_form.woe_active_tab,
|
565 |
+
woe_order_post_type: woe_order_post_type,
|
566 |
+
};
|
567 |
+
|
568 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
569 |
+
jQuery( '#text_item_names--select2 select' ).select2( 'destroy' );
|
570 |
+
jQuery( '#text_item_names, #text_item_names--select2' ).remove();
|
571 |
+
if ( response ) {
|
572 |
+
var options = '';
|
573 |
+
jQuery.each( response, function ( index, value ) {
|
574 |
+
options += '<option>' + value + '</option>';
|
575 |
+
} );
|
576 |
+
|
577 |
+
var $select = jQuery( '<div id="text_item_names--select2" style="margin-top: 0px;margin-right: 6px; vertical-align: top; '
|
578 |
+
+ 'display: '+ (
|
579 |
+
(
|
580 |
+
'LIKE' === val_op || 'NOT SET' === val_op || 'IS SET' === val_op
|
581 |
+
) ? 'none' : 'inline-block'
|
582 |
+
) + ';"><select id="text_item_names">' + options + '</select></div>' );
|
583 |
+
$select.insertBefore( jQuery( '#add_item_names' ) );
|
584 |
+
$select.find( 'select' ).select2_i18n( {tags: true} );
|
585 |
+
|
586 |
+
if ( 'LIKE' === val_op || 'NOT SET' === val_op || 'IS SET' === val_op ) {
|
587 |
+
jQuery( '#text_item_names' ).attr( 'disabled', 'disabled' );
|
588 |
+
}
|
589 |
+
}
|
590 |
+
else {
|
591 |
+
jQuery( '<input type="text" id="text_item_names" style="margin-right: 8px;">' ).insertBefore( jQuery( '#add_item_names' ) );
|
592 |
+
}
|
593 |
+
}, 'json' );
|
594 |
+
} ).trigger( 'change' );
|
595 |
+
}, 0);
|
596 |
|
597 |
jQuery( '#add_item_names' ).click( function () {
|
598 |
var val = ! jQuery( "#text_item_names" ).is( ':disabled' ) ? jQuery( "#text_item_names" ).val() : jQuery( "#text_order_item_name" ).val();
|
623 |
return false;
|
624 |
} );
|
625 |
|
626 |
+
setTimeout( function () {
|
627 |
+
// ITEM METADATA
|
628 |
+
jQuery( '#item_metadata' ).change( function () {
|
629 |
+
var val_op = jQuery( '#item_metadata_compare' ).val();
|
630 |
+
jQuery( '#text_order_itemmetadata' ).val( '' );
|
631 |
+
jQuery( '#text_item_metadata' ).attr( 'disabled', 'disabled' );
|
632 |
+
var data = {
|
633 |
+
'meta_key': jQuery( this ).val(),
|
634 |
+
method: "get_order_item_meta_key_values",
|
635 |
+
action: "order_exporter",
|
636 |
+
woe_nonce: settings_form.woe_nonce,
|
637 |
+
tab: settings_form.woe_active_tab,
|
638 |
+
woe_order_post_type: woe_order_post_type,
|
639 |
+
};
|
640 |
+
|
641 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
642 |
+
jQuery( '#text_item_metadata--select2 select' ).select2( 'destroy' );
|
643 |
+
jQuery( '#text_item_metadata, #text_item_metadata--select2' ).remove();
|
644 |
+
if ( response ) {
|
645 |
+
var options = '';
|
646 |
+
jQuery.each( response, function ( index, value ) {
|
647 |
+
options += '<option>' + value + '</option>';
|
648 |
+
} );
|
649 |
+
var $select = jQuery( '<div id="text_item_metadata--select2" style="margin-top: 0px;margin-right: 6px; vertical-align: top; '
|
650 |
+
+ 'display: '+ (
|
651 |
+
(
|
652 |
+
'LIKE' === val_op || 'NOT SET' === val_op || 'IS SET' === val_op
|
653 |
+
) ? 'none' : 'inline-block'
|
654 |
+
) + ';"><select id="text_item_metadata">' + options + '</select></div>' );
|
655 |
+
$select.insertBefore( jQuery( '#add_item_metadata' ) );
|
656 |
+
$select.find( 'select' ).select2_i18n( {tags: true} );
|
657 |
+
|
658 |
+
if ( 'LIKE' === val_op || 'NOT SET' === val_op || 'IS SET' === val_op ) {
|
659 |
+
jQuery( '#text_item_metadata' ).attr( 'disabled', 'disabled' );
|
660 |
+
}
|
661 |
+
}
|
662 |
+
else {
|
663 |
+
jQuery( '<input type="text" id="text_item_metadata" style="margin-right: 8px;">' ).insertBefore( jQuery( '#add_item_metadata' ) );
|
664 |
+
}
|
665 |
+
}, 'json' );
|
666 |
+
} ).trigger( 'change' );
|
667 |
+
}, 0);
|
668 |
|
669 |
jQuery( '#add_item_metadata' ).click( function () {
|
670 |
var val = ! jQuery( "#text_item_metadata" ).is( ':disabled' ) ? jQuery( "#text_item_metadata" ).val() : jQuery( "#text_order_itemmetadata" ).val();
|
695 |
return false;
|
696 |
} );
|
697 |
|
698 |
+
setTimeout( function () {
|
699 |
+
// for filter by ORDER custom fields
|
700 |
+
jQuery( '#user_custom_fields' ).change( function () {
|
701 |
+
|
702 |
+
jQuery( '#select_user_custom_fields' ).attr( 'disabled', 'disabled' );
|
703 |
+
var data = {
|
704 |
+
'cf_name': jQuery( this ).val(),
|
705 |
+
method: "get_user_custom_fields_values",
|
706 |
+
action: "order_exporter",
|
707 |
+
woe_nonce: settings_form.woe_nonce,
|
708 |
+
tab: settings_form.woe_active_tab,
|
709 |
+
woe_order_post_type: woe_order_post_type,
|
710 |
+
};
|
711 |
+
var val_op = jQuery( '#select_user_custom_fields' ).val();
|
712 |
+
jQuery( '#text_user_custom_fields' ).val( '' );
|
713 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
714 |
+
jQuery( '#select_user_custom_fields' ).remove();
|
715 |
+
jQuery( '#select_user_custom_fields--select2 select' ).select2( 'destroy' );
|
716 |
+
jQuery( '#select_user_custom_fields, #select_user_custom_fields--select2' ).remove();
|
717 |
+
if ( response ) {
|
718 |
+
var options = '<option>' + export_messages.empty + '</option>';
|
719 |
+
jQuery.each( response, function ( index, value ) {
|
720 |
+
options += '<option>' + value + '</option>';
|
721 |
+
} );
|
722 |
+
var $select = jQuery( '<div id="select_user_custom_fields--select2" style="margin-top: 0px;margin-right: 6px; vertical-align: top;'
|
723 |
+
+ 'display: ' + (
|
724 |
+
(
|
725 |
+
'LIKE' === val_op || 'NOT SET' === val_op || 'IS SET' === val_op
|
726 |
+
) ? 'none' : 'inline-block'
|
727 |
+
) + ';">'
|
728 |
+
+ '<select id="select_user_custom_fields">' + options + '</select></div>' );
|
729 |
+
$select.insertBefore( jQuery( '#add_user_custom_fields' ) )
|
730 |
+
$select.find( 'select' ).select2_i18n( {tags: true} );
|
731 |
+
}
|
732 |
+
else {
|
733 |
+
jQuery( '<input type="text" id="select_user_custom_fields" style="margin-right: 8px;">' ).insertBefore(
|
734 |
+
jQuery( '#add_user_custom_fields' ) );
|
735 |
+
}
|
736 |
+
}, 'json' );
|
737 |
+
} ).trigger( 'change' );
|
738 |
+
}, 0);
|
739 |
|
740 |
jQuery( '#add_user_custom_fields' ).click( function () {
|
741 |
|
794 |
}
|
795 |
} );
|
796 |
|
797 |
+
setTimeout( function () {
|
798 |
+
// for filter by ORDER custom fields
|
799 |
+
jQuery( '#custom_fields' ).change( function () {
|
800 |
+
|
801 |
+
jQuery( '#select_custom_fields' ).attr( 'disabled', 'disabled' );
|
802 |
+
|
803 |
+
var data = {
|
804 |
+
'cf_name': jQuery( this ).val(),
|
805 |
+
method: "get_order_custom_fields_values",
|
806 |
+
action: "order_exporter",
|
807 |
+
woe_nonce: settings_form.woe_nonce,
|
808 |
+
tab: settings_form.woe_active_tab,
|
809 |
+
woe_order_post_type: woe_order_post_type,
|
810 |
+
};
|
811 |
+
|
812 |
+
var val_op = jQuery( '#custom_fields_compare' ).val();
|
813 |
+
jQuery( '#text_custom_fields' ).val( '' );
|
814 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
815 |
+
jQuery( '#select_custom_fields' ).remove();
|
816 |
+
jQuery( '#select_custom_fields--select2 select' ).select2( 'destroy' );
|
817 |
+
jQuery( '#select_custom_fields, #select_custom_fields--select2' ).remove();
|
818 |
+
if ( response ) {
|
819 |
+
var options = '<option>' + export_messages.empty + '</option>';
|
820 |
+
jQuery.each( response, function ( index, value ) {
|
821 |
+
options += '<option>' + value + '</option>';
|
822 |
+
} );
|
823 |
+
var $select = jQuery( '<div id="select_custom_fields--select2" style="margin-top: 0px;margin-right: 6px; vertical-align: top;'
|
824 |
+
+ 'display: ' + (
|
825 |
+
(
|
826 |
+
'LIKE' === val_op || 'NOT SET' === val_op || 'IS SET' === val_op
|
827 |
+
) ? 'none' : 'inline-block'
|
828 |
+
) + ';">'
|
829 |
+
+ '<select id="select_custom_fields">' + options + '</select></div>' );
|
830 |
+
$select.insertBefore( jQuery( '#add_custom_fields' ) )
|
831 |
+
$select.find( 'select' ).select2_i18n( {tags: true} );
|
832 |
+
}
|
833 |
+
else {
|
834 |
+
jQuery( '<input type="text" id="select_custom_fields" style="margin-right: 8px;">' ).insertBefore( jQuery( '#add_custom_fields' ) );
|
835 |
+
}
|
836 |
+
jQuery( '#custom_fields_compare' ).trigger( 'change' );
|
837 |
+
}, 'json' );
|
838 |
+
} ).trigger( 'change' );
|
839 |
+
}, 0);
|
840 |
|
841 |
jQuery( '#add_custom_fields' ).click( function () {
|
842 |
|
895 |
//end of change
|
896 |
|
897 |
|
898 |
+
setTimeout( function () {
|
899 |
+
woe_open_filter( 'my-order', 1 );
|
900 |
+
}, 0);
|
901 |
|
902 |
+
setTimeout( function () {
|
903 |
+
woe_open_filter( 'my-products' );
|
904 |
+
}, 0);
|
905 |
|
906 |
+
setTimeout( function () {
|
907 |
+
woe_open_filter( 'my-shipping' );
|
908 |
+
}, 0);
|
909 |
|
910 |
+
setTimeout( function () {
|
911 |
+
woe_open_filter( 'my-users' );
|
912 |
+
}, 0);
|
913 |
|
914 |
+
setTimeout( function () {
|
915 |
+
woe_open_filter( 'my-coupons', 1 );
|
916 |
+
}, 0);
|
917 |
|
918 |
+
setTimeout( function () {
|
919 |
+
woe_open_filter( 'my-billing' );
|
920 |
+
}, 0);
|
921 |
|
922 |
+
setTimeout( function () {
|
923 |
+
woe_open_filter( 'my-items-meta' );
|
924 |
+
}, 0);
|
925 |
|
926 |
} );
|
assets/js/settings-form.js
CHANGED
@@ -147,7 +147,11 @@ function woe_set_form_submitting() {
|
|
147 |
window.onload = function () {
|
148 |
|
149 |
var form = jQuery( '#export_job_settings' );
|
150 |
-
var on_load_form_data
|
|
|
|
|
|
|
|
|
151 |
|
152 |
var woe_is_dirty = function ( on_load_form_data ) {
|
153 |
return on_load_form_data.hashCode() !== form.serialize().hashCode()
|
147 |
window.onload = function () {
|
148 |
|
149 |
var form = jQuery( '#export_job_settings' );
|
150 |
+
var on_load_form_data;
|
151 |
+
|
152 |
+
setTimeout(function () {
|
153 |
+
on_load_form_data = form.serialize();
|
154 |
+
}, 1500);
|
155 |
|
156 |
var woe_is_dirty = function ( on_load_form_data ) {
|
157 |
return on_load_form_data.hashCode() !== form.serialize().hashCode()
|
classes/FPDF/class-woe-fpdf.php
CHANGED
@@ -515,7 +515,6 @@ class WOE_FPDF {
|
|
515 |
|
516 |
// Enable compression
|
517 |
$this->SetCompression( true );
|
518 |
-
|
519 |
}
|
520 |
|
521 |
/**
|
@@ -1407,166 +1406,226 @@ class WOE_FPDF {
|
|
1407 |
}
|
1408 |
|
1409 |
/**
|
1410 |
-
*
|
1411 |
-
*
|
1412 |
-
* @param
|
1413 |
-
* @param
|
1414 |
-
* @param string
|
1415 |
-
* @param
|
1416 |
-
*
|
|
|
|
|
|
|
|
|
|
|
1417 |
*
|
1418 |
* @return string
|
1419 |
*/
|
1420 |
-
public function MultiCell( $
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
|
|
|
|
|
|
|
|
1425 |
}
|
1426 |
-
|
1427 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1428 |
if ( $this->bol_uniform_subset ) {
|
1429 |
-
$int_length = mb_strlen( $
|
1430 |
-
while ( $int_length > 0 && mb_substr( $
|
1431 |
$int_length --;
|
1432 |
}
|
1433 |
} else {
|
1434 |
-
$int_length = strlen( $
|
1435 |
-
if ( $int_length > 0 && $
|
1436 |
$int_length --;
|
1437 |
}
|
1438 |
}
|
1439 |
-
|
1440 |
-
$
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
$
|
1445 |
-
$
|
|
|
1446 |
} else {
|
1447 |
-
$
|
1448 |
-
|
1449 |
-
$mix_adjusted_border_2 .= 'L';
|
1450 |
}
|
1451 |
-
if ( strpos( $
|
1452 |
-
$
|
|
|
|
|
|
|
|
|
|
|
1453 |
}
|
1454 |
-
$mix_adjusted_border = ( strpos( $int_border, 'T' ) !== false ) ? $mix_adjusted_border_2 . 'T' : $mix_adjusted_border_2;
|
1455 |
}
|
1456 |
}
|
1457 |
-
|
1458 |
-
$
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1465 |
// Get next character
|
1466 |
if ( $this->bol_uniform_subset ) {
|
1467 |
-
$
|
1468 |
} else {
|
1469 |
-
$
|
1470 |
}
|
1471 |
-
|
|
|
1472 |
// Explicit line break
|
1473 |
if ( $this->int_word_spacing > 0 ) {
|
1474 |
$this->int_word_spacing = 0;
|
1475 |
-
$this
|
1476 |
}
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
$
|
1484 |
-
$
|
1485 |
-
$
|
1486 |
-
$
|
1487 |
-
$
|
1488 |
-
|
1489 |
-
|
|
|
1490 |
}
|
1491 |
-
if ( $
|
1492 |
-
return substr( $
|
1493 |
}
|
1494 |
continue;
|
1495 |
-
}
|
1496 |
-
|
1497 |
-
$
|
1498 |
-
$
|
1499 |
-
$int_space_count ++;
|
1500 |
-
}
|
1501 |
-
|
1502 |
-
if ( $this->bol_uniform_subset ) {
|
1503 |
-
$int_l += $this->GetStringWidth( $str_character );
|
1504 |
} else {
|
1505 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1506 |
}
|
1507 |
|
1508 |
-
if ( $
|
1509 |
// Automatic line break
|
1510 |
-
if ( $
|
1511 |
-
if ( $
|
1512 |
-
$
|
1513 |
}
|
1514 |
if ( $this->int_word_spacing > 0 ) {
|
1515 |
$this->int_word_spacing = 0;
|
1516 |
-
$this
|
1517 |
-
}
|
1518 |
-
if ( $this->bol_uniform_subset ) {
|
1519 |
-
$this->Cell( $flt_width, $flt_height, mb_substr( $str_text, $int_j, $int_i - $int_j, 'UTF-8' ), $mix_adjusted_border, 2, $str_alignment, $bol_fill );
|
1520 |
-
} else {
|
1521 |
-
$this->Cell( $flt_width, $flt_height, substr( $str_text, $int_j, $int_i - $int_j ), $mix_adjusted_border, 2, $str_alignment, $bol_fill );
|
1522 |
}
|
|
|
|
|
|
|
|
|
|
|
1523 |
} else {
|
1524 |
-
if ( $
|
1525 |
-
$this->int_word_spacing = ( $
|
1526 |
-
$
|
|
|
|
|
|
|
1527 |
}
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
$
|
1534 |
}
|
1535 |
-
$
|
1536 |
-
$
|
1537 |
-
$
|
1538 |
-
$
|
1539 |
-
$
|
1540 |
-
if ( $
|
1541 |
-
$
|
1542 |
}
|
1543 |
|
1544 |
-
if ( $
|
1545 |
if ( $this->int_word_spacing > 0 ) {
|
1546 |
$this->int_word_spacing = 0;
|
1547 |
-
$this
|
1548 |
}
|
1549 |
|
1550 |
-
return substr( $
|
1551 |
}
|
1552 |
|
1553 |
} else {
|
1554 |
-
$
|
1555 |
}
|
1556 |
}
|
|
|
1557 |
// Last chunk
|
1558 |
if ( $this->int_word_spacing > 0 ) {
|
1559 |
$this->int_word_spacing = 0;
|
1560 |
-
$this
|
1561 |
}
|
1562 |
-
|
1563 |
-
|
|
|
1564 |
}
|
1565 |
-
|
1566 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1567 |
} else {
|
1568 |
-
|
1569 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1570 |
$this->flt_position_x = $this->int_left_margin;
|
1571 |
|
1572 |
return '';
|
515 |
|
516 |
// Enable compression
|
517 |
$this->SetCompression( true );
|
|
|
518 |
}
|
519 |
|
520 |
/**
|
1406 |
}
|
1407 |
|
1408 |
/**
|
1409 |
+
* Output text with automatic or explicit line breaks
|
1410 |
+
*
|
1411 |
+
* @param float $width
|
1412 |
+
* @param float $height
|
1413 |
+
* @param string $text
|
1414 |
+
* @param int|string $border Indicates if borders must be drawn around the cell block.
|
1415 |
+
* The value can be either a number: 0 - no border, 1 - frame
|
1416 |
+
* or a string containing some or all of the following characters (in any order): L - left, 'T' - top, 'R' - right, 'B' - bottom
|
1417 |
+
* @param string $horizontal_alignment
|
1418 |
+
* @param string $vertical_alignment
|
1419 |
+
* @param bool $bol_fill
|
1420 |
+
* @param int $lines_limit
|
1421 |
*
|
1422 |
* @return string
|
1423 |
*/
|
1424 |
+
public function MultiCell( $width, $height, $text, $border = 0, $horizontal_alignment = 'J', $vertical_alignment = 'T', $bol_fill = false, $lines_limit = 0 ) {
|
1425 |
+
$row_height = 5;
|
1426 |
+
|
1427 |
+
// was required for calculate char width
|
1428 |
+
// $arr_character_width = &$this->arr_current_font_info['cw'];
|
1429 |
+
|
1430 |
+
/* is it really necessary?
|
1431 |
+
if ( $width == 0 ) {
|
1432 |
+
$width = $this->flt_current_width - $this->int_right_margin - $this->flt_position_x;
|
1433 |
}
|
1434 |
+
*/
|
1435 |
+
|
1436 |
+
// define max width available for text
|
1437 |
+
$available_width = ( $width - 2 * $this->int_cell_margin );
|
1438 |
+
|
1439 |
+
// sanitize text
|
1440 |
+
$text = str_replace( "\r", '', $text );
|
1441 |
+
|
1442 |
+
// remove last char if it's line break
|
1443 |
if ( $this->bol_uniform_subset ) {
|
1444 |
+
$int_length = mb_strlen( $text, 'utf-8' );
|
1445 |
+
while ( $int_length > 0 && mb_substr( $text, $int_length - 1, 1, 'utf-8' ) == "\n" ) {
|
1446 |
$int_length --;
|
1447 |
}
|
1448 |
} else {
|
1449 |
+
$int_length = strlen( $text );
|
1450 |
+
if ( $int_length > 0 && $text[ $int_length - 1 ] == "\n" ) {
|
1451 |
$int_length --;
|
1452 |
}
|
1453 |
}
|
1454 |
+
|
1455 |
+
$adjusted_border = '';
|
1456 |
+
$border_between_cells = '';
|
1457 |
+
if ( $border ) {
|
1458 |
+
if ( $border === 1 ) {
|
1459 |
+
$border = 'LTRB';
|
1460 |
+
$adjusted_border = 'LRT';
|
1461 |
+
$border_between_cells = 'LR';
|
1462 |
} else {
|
1463 |
+
if ( strpos( $border, 'L' ) !== false ) {
|
1464 |
+
$border_between_cells .= 'L';
|
|
|
1465 |
}
|
1466 |
+
if ( strpos( $border, 'R' ) !== false ) {
|
1467 |
+
$border_between_cells .= 'R';
|
1468 |
+
}
|
1469 |
+
|
1470 |
+
$adjusted_border = $border_between_cells;
|
1471 |
+
if ( strpos( $border, 'T' ) !== false ) {
|
1472 |
+
$adjusted_border = $border_between_cells . 'T';
|
1473 |
}
|
|
|
1474 |
}
|
1475 |
}
|
1476 |
+
|
1477 |
+
$cellCallback = function ( $text, $from, $to, $adjusted_border ) use ( $width, $row_height, $horizontal_alignment, $bol_fill ) {
|
1478 |
+
if ( $this->bol_uniform_subset ) {
|
1479 |
+
$this->Cell( $width, $row_height, mb_substr( $text, $from, $to - $from, 'UTF-8' ), $adjusted_border, 2, $horizontal_alignment, $bol_fill );
|
1480 |
+
} else {
|
1481 |
+
$this->Cell( $width, $row_height, substr( $text, $from, $to - $from ), $adjusted_border, 2, $horizontal_alignment, $bol_fill );
|
1482 |
+
}
|
1483 |
+
};
|
1484 |
+
|
1485 |
+
$simple_draw_queue = array();
|
1486 |
+
|
1487 |
+
$last_space_char_pos = - 1;
|
1488 |
+
$current_char_pos = 0;
|
1489 |
+
$last_line_break_pos = 0;
|
1490 |
+
$current_line_width = 0;
|
1491 |
+
$space_counter = 0;
|
1492 |
+
$line_count = 1;
|
1493 |
+
$width_until_last_space = 0;
|
1494 |
+
while ( $current_char_pos < $int_length ) {
|
1495 |
// Get next character
|
1496 |
if ( $this->bol_uniform_subset ) {
|
1497 |
+
$current_char = mb_substr( $text, $current_char_pos, 1, 'UTF-8' );
|
1498 |
} else {
|
1499 |
+
$current_char = $text[ $current_char_pos ];
|
1500 |
}
|
1501 |
+
|
1502 |
+
if ( $current_char == "\n" ) {
|
1503 |
// Explicit line break
|
1504 |
if ( $this->int_word_spacing > 0 ) {
|
1505 |
$this->int_word_spacing = 0;
|
1506 |
+
$simple_draw_queue[] = array( array( $this, 'Out' ), array( '0 Tw' ) );
|
1507 |
}
|
1508 |
+
|
1509 |
+
$simple_draw_queue[] = array(
|
1510 |
+
$cellCallback,
|
1511 |
+
array( $text, $last_line_break_pos, $current_char_pos, $adjusted_border )
|
1512 |
+
);
|
1513 |
+
|
1514 |
+
$current_char_pos ++;
|
1515 |
+
$last_space_char_pos = - 1;
|
1516 |
+
$last_line_break_pos = $current_char_pos;
|
1517 |
+
$current_line_width = 0;
|
1518 |
+
$space_counter = 0;
|
1519 |
+
$line_count ++;
|
1520 |
+
if ( $border && $line_count == 2 ) {
|
1521 |
+
$adjusted_border = $border_between_cells;
|
1522 |
}
|
1523 |
+
if ( $lines_limit && $line_count > $lines_limit ) {
|
1524 |
+
return substr( $text, $current_char_pos );
|
1525 |
}
|
1526 |
continue;
|
1527 |
+
} elseif ( $current_char == ' ' ) {
|
1528 |
+
$last_space_char_pos = $current_char_pos;
|
1529 |
+
$width_until_last_space = $current_line_width;
|
1530 |
+
$space_counter ++;
|
|
|
|
|
|
|
|
|
|
|
1531 |
} else {
|
1532 |
+
// GetStringWidth() can calculate depends on $this->bol_uniform_subset
|
1533 |
+
$current_line_width += $this->GetStringWidth( $current_char );
|
1534 |
+
/*
|
1535 |
+
if ( $this->bol_uniform_subset ) {
|
1536 |
+
$current_line_width += $this->GetStringWidth( $str_character );
|
1537 |
+
} else {
|
1538 |
+
$current_line_width += $arr_character_width[ $str_character ] * $this->int_font_size_user / 1000;
|
1539 |
+
}
|
1540 |
+
*/
|
1541 |
}
|
1542 |
|
1543 |
+
if ( $current_line_width > $available_width ) {
|
1544 |
// Automatic line break
|
1545 |
+
if ( $last_space_char_pos == - 1 ) {
|
1546 |
+
if ( $current_char_pos == $last_line_break_pos ) {
|
1547 |
+
$current_char_pos ++;
|
1548 |
}
|
1549 |
if ( $this->int_word_spacing > 0 ) {
|
1550 |
$this->int_word_spacing = 0;
|
1551 |
+
$simple_draw_queue[] = array( array( $this, 'Out' ), array( '0 Tw' ) );
|
|
|
|
|
|
|
|
|
|
|
1552 |
}
|
1553 |
+
|
1554 |
+
$simple_draw_queue[] = array(
|
1555 |
+
$cellCallback,
|
1556 |
+
array( $text, $last_line_break_pos, $current_char_pos, $adjusted_border )
|
1557 |
+
);
|
1558 |
} else {
|
1559 |
+
if ( $horizontal_alignment == 'J' ) {
|
1560 |
+
$this->int_word_spacing = ( $space_counter > 1 ) ? ( $available_width - $width_until_last_space ) / ( $space_counter - 1 ) : 0;
|
1561 |
+
$simple_draw_queue[] = array(
|
1562 |
+
array( $this, 'Out' ),
|
1563 |
+
array( sprintf( '%.3F Tw', $this->int_word_spacing * $this->flt_scale_factor ) )
|
1564 |
+
);
|
1565 |
}
|
1566 |
+
|
1567 |
+
$simple_draw_queue[] = array(
|
1568 |
+
$cellCallback,
|
1569 |
+
array( $text, $last_line_break_pos, $last_space_char_pos, $adjusted_border )
|
1570 |
+
);
|
1571 |
+
$current_char_pos = $last_space_char_pos + 1;
|
1572 |
}
|
1573 |
+
$last_space_char_pos = - 1;
|
1574 |
+
$last_line_break_pos = $current_char_pos;
|
1575 |
+
$current_line_width = 0;
|
1576 |
+
$space_counter = 0;
|
1577 |
+
$line_count ++;
|
1578 |
+
if ( $border && $line_count == 2 ) {
|
1579 |
+
$adjusted_border = $border_between_cells;
|
1580 |
}
|
1581 |
|
1582 |
+
if ( $lines_limit && $line_count > $lines_limit ) {
|
1583 |
if ( $this->int_word_spacing > 0 ) {
|
1584 |
$this->int_word_spacing = 0;
|
1585 |
+
$simple_draw_queue[] = array( array( $this, 'Out' ), array( '0 Tw' ) );
|
1586 |
}
|
1587 |
|
1588 |
+
return substr( $text, $current_char_pos );
|
1589 |
}
|
1590 |
|
1591 |
} else {
|
1592 |
+
$current_char_pos ++;
|
1593 |
}
|
1594 |
}
|
1595 |
+
|
1596 |
// Last chunk
|
1597 |
if ( $this->int_word_spacing > 0 ) {
|
1598 |
$this->int_word_spacing = 0;
|
1599 |
+
$simple_draw_queue[] = array( array( $this, 'Out' ), array( '0 Tw' ) );
|
1600 |
}
|
1601 |
+
|
1602 |
+
if ( $border && strpos( $border, 'B' ) !== false ) {
|
1603 |
+
$adjusted_border .= 'B';
|
1604 |
}
|
1605 |
+
|
1606 |
+
$simple_draw_queue[] = array(
|
1607 |
+
$cellCallback,
|
1608 |
+
array( $text, $last_line_break_pos, $current_char_pos, $adjusted_border )
|
1609 |
+
);
|
1610 |
+
|
1611 |
+
// install y pos depends on vertical align
|
1612 |
+
if ( 'C' === $vertical_alignment ) {
|
1613 |
+
$this->flt_position_y += ( $height - $row_height * $line_count ) / 2;
|
1614 |
+
} elseif ( 'B' === $vertical_alignment ) {
|
1615 |
+
$this->flt_position_y += $height - $row_height * $line_count;
|
1616 |
} else {
|
1617 |
+
// do nothing for top vertical align
|
1618 |
}
|
1619 |
+
|
1620 |
+
foreach ( $simple_draw_queue as $item ) {
|
1621 |
+
if ( isset( $item[0] ) && is_callable( $item[0] ) ) {
|
1622 |
+
$func = $item[0];
|
1623 |
+
$args = isset( $item[1] ) ? $item[1] : array();
|
1624 |
+
|
1625 |
+
call_user_func_array( $func, $args );
|
1626 |
+
}
|
1627 |
+
}
|
1628 |
+
|
1629 |
$this->flt_position_x = $this->int_left_margin;
|
1630 |
|
1631 |
return '';
|
classes/FPDF/class-woe-pdf-mc-table.php
CHANGED
@@ -6,6 +6,7 @@ if ( ! class_exists( 'WOE_FPDF' ) ) {
|
|
6 |
class WOE_PDF_MC_Table extends WOE_FPDF {
|
7 |
protected $widths;
|
8 |
protected $aligns;
|
|
|
9 |
|
10 |
protected $table_header = array();
|
11 |
|
@@ -35,6 +36,7 @@ class WOE_PDF_MC_Table extends WOE_FPDF {
|
|
35 |
'stretch' => false,
|
36 |
'column_width' => array(),
|
37 |
'solid_width' => array(),
|
|
|
38 |
),
|
39 |
'table_header' => array(
|
40 |
'style' => '',
|
@@ -87,7 +89,7 @@ class WOE_PDF_MC_Table extends WOE_FPDF {
|
|
87 |
}
|
88 |
|
89 |
public function setTableRowProperty( $props ) {
|
90 |
-
$this->table_row_props = array_merge( $this->default_props['
|
91 |
}
|
92 |
|
93 |
public function setFooterProperty( $props ) {
|
@@ -140,13 +142,14 @@ class WOE_PDF_MC_Table extends WOE_FPDF {
|
|
140 |
}
|
141 |
|
142 |
public function Footer() {
|
|
|
143 |
$this->SetY( - 15 );
|
144 |
|
145 |
$this->changeBrushToDraw( 'footer' );
|
146 |
|
147 |
if ( ! empty( $this->footer_props['title'] ) ) {
|
148 |
// Title
|
149 |
-
$this->Cell( 0, 0, $this->footer_props['title'], 0, 0, 'C'
|
150 |
// Line break
|
151 |
$this->Ln( 10 );
|
152 |
}
|
@@ -162,47 +165,51 @@ class WOE_PDF_MC_Table extends WOE_FPDF {
|
|
162 |
'R',
|
163 |
) ) ? $this->footer_props['pagination'] : false;
|
164 |
if ( $align ) {
|
165 |
-
$this->Cell( 0, 10, 'Page '
|
166 |
}
|
167 |
}
|
168 |
}
|
169 |
|
170 |
-
public function addRow( $data, $widths = null, $h = null ) {
|
171 |
$this->changeBrushToDraw( 'table_row' );
|
172 |
-
|
|
|
173 |
}
|
174 |
|
175 |
-
protected function Row( $data, $widths = null, $h = null ) {
|
176 |
if ( ! $data ) {
|
177 |
return;
|
178 |
}
|
179 |
-
|
180 |
$widths = ! $widths ? $this->getRowWidths( $data ) : $widths;
|
181 |
$h = ! $h ? $this->getRowHeight( $widths, $data ) : $h;
|
182 |
-
|
183 |
//Issue a page break first if needed
|
184 |
$this->CheckPageBreak( $h );
|
185 |
-
|
186 |
$columns_count = $this->getColumnCountInPage( $widths );
|
187 |
if ( $extra_data = array_slice( $data, $columns_count ) ) {
|
188 |
$this->stretch_buffer[] = $extra_data;
|
189 |
$this->stretch_buffer_params[] = array(
|
190 |
'widths' => array_slice( $widths, $columns_count ),
|
191 |
'height' => $h,
|
|
|
192 |
);
|
193 |
}
|
194 |
$data = array_slice( $data, 0, $columns_count );
|
195 |
-
|
196 |
-
|
|
|
|
|
|
|
197 |
//Draw the cells of the row
|
198 |
for ( $i = 0; $i < count( $data ); $i ++ ) {
|
199 |
$w = $widths[ $i ];
|
200 |
-
$
|
|
|
201 |
//Save the current position
|
202 |
$x = $this->GetX();
|
203 |
$y = $this->GetY();
|
204 |
//Draw the border
|
205 |
-
$this->Rect( $x, $y, $w, $h, '
|
206 |
|
207 |
if ( isset( $data[ $i ]['type'], $data[ $i ]['value'] ) && 'image' === $data[ $i ]['type'] && file_exists( $data[ $i ]['value'] ) ) {
|
208 |
$source = $data[ $i ]['value'];
|
@@ -210,7 +217,7 @@ class WOE_PDF_MC_Table extends WOE_FPDF {
|
|
210 |
$this->Image( $source, $x + 1 / 2, $y + 1 / 2, $w - 1, $h - 1, $type );
|
211 |
} elseif ( ! is_array( $data[ $i ] ) ) {
|
212 |
//Print the text
|
213 |
-
$this->MultiCell( $w,
|
214 |
}
|
215 |
|
216 |
//Put the position to the right of the cell
|
@@ -424,6 +431,7 @@ class WOE_PDF_MC_Table extends WOE_FPDF {
|
|
424 |
|
425 |
$buffer = $this->stretch_buffer;
|
426 |
$stretch_buffer_params = $this->stretch_buffer_params;
|
|
|
427 |
$this->stretch_buffer = array();
|
428 |
$this->stretch_buffer_params = array();
|
429 |
|
@@ -433,10 +441,9 @@ class WOE_PDF_MC_Table extends WOE_FPDF {
|
|
433 |
$this->Row( array_shift( $buffer ), $params['widths'], $params['height'] );
|
434 |
$this->changeBrushToDraw( 'table_row' );
|
435 |
}
|
436 |
-
|
437 |
foreach ( $buffer as $index => $row ) {
|
438 |
$params = $stretch_buffer_params[ $index ];
|
439 |
-
$this->addRow( $row, $params['widths'], $params['height'] );
|
440 |
}
|
441 |
}
|
442 |
}
|
@@ -493,12 +500,30 @@ class WOE_PDF_MC_Table extends WOE_FPDF {
|
|
493 |
return $line_counter;
|
494 |
}
|
495 |
|
496 |
-
public function
|
497 |
//Set the array of column alignments
|
498 |
$this->aligns = $a;
|
499 |
}
|
500 |
|
501 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
502 |
if ( ! in_array( $what, array_keys( $this->default_props ) ) ) {
|
503 |
return false;
|
504 |
}
|
6 |
class WOE_PDF_MC_Table extends WOE_FPDF {
|
7 |
protected $widths;
|
8 |
protected $aligns;
|
9 |
+
protected $vertical_align;
|
10 |
|
11 |
protected $table_header = array();
|
12 |
|
36 |
'stretch' => false,
|
37 |
'column_width' => array(),
|
38 |
'solid_width' => array(),
|
39 |
+
'border_style' => 'DF',
|
40 |
),
|
41 |
'table_header' => array(
|
42 |
'style' => '',
|
89 |
}
|
90 |
|
91 |
public function setTableRowProperty( $props ) {
|
92 |
+
$this->table_row_props = array_merge( $this->default_props['table_row'], $props );
|
93 |
}
|
94 |
|
95 |
public function setFooterProperty( $props ) {
|
142 |
}
|
143 |
|
144 |
public function Footer() {
|
145 |
+
do_action('woe_pdf_auto_footer', $this);
|
146 |
$this->SetY( - 15 );
|
147 |
|
148 |
$this->changeBrushToDraw( 'footer' );
|
149 |
|
150 |
if ( ! empty( $this->footer_props['title'] ) ) {
|
151 |
// Title
|
152 |
+
$this->Cell( 0, 0, $this->footer_props['title'], 0, 0, 'C');
|
153 |
// Line break
|
154 |
$this->Ln( 10 );
|
155 |
}
|
165 |
'R',
|
166 |
) ) ? $this->footer_props['pagination'] : false;
|
167 |
if ( $align ) {
|
168 |
+
$this->Cell( 0, 10, sprintf( __('Page %s / %s', 'woo-order-export-lite'), $this->PageNo(), '{nb}' ) , 0, 0, $align );
|
169 |
}
|
170 |
}
|
171 |
}
|
172 |
|
173 |
+
public function addRow( $data, $widths = null, $h = null, $style = null ) {
|
174 |
$this->changeBrushToDraw( 'table_row' );
|
175 |
+
|
176 |
+
$this->Row( $data, $widths, $h, $style );
|
177 |
}
|
178 |
|
179 |
+
protected function Row( $data, $widths = null, $h = null, $style = null ) {
|
180 |
if ( ! $data ) {
|
181 |
return;
|
182 |
}
|
|
|
183 |
$widths = ! $widths ? $this->getRowWidths( $data ) : $widths;
|
184 |
$h = ! $h ? $this->getRowHeight( $widths, $data ) : $h;
|
|
|
185 |
//Issue a page break first if needed
|
186 |
$this->CheckPageBreak( $h );
|
187 |
+
|
188 |
$columns_count = $this->getColumnCountInPage( $widths );
|
189 |
if ( $extra_data = array_slice( $data, $columns_count ) ) {
|
190 |
$this->stretch_buffer[] = $extra_data;
|
191 |
$this->stretch_buffer_params[] = array(
|
192 |
'widths' => array_slice( $widths, $columns_count ),
|
193 |
'height' => $h,
|
194 |
+
'row_style' => $style
|
195 |
);
|
196 |
}
|
197 |
$data = array_slice( $data, 0, $columns_count );
|
198 |
+
if( $style ) {
|
199 |
+
$this->SetFillColor($style['background_color'][0], $style['background_color'][1], $style['background_color'][2]);
|
200 |
+
$this->SetTextColor($style['text_color'][0], $style['text_color'][1], $style['text_color'][2]);
|
201 |
+
$this->SetFontSize($style['size']);
|
202 |
+
}
|
203 |
//Draw the cells of the row
|
204 |
for ( $i = 0; $i < count( $data ); $i ++ ) {
|
205 |
$w = $widths[ $i ];
|
206 |
+
$horizontal_align = $this->getHorizontalAlign( $i );
|
207 |
+
$vertical_align = $this->getVerticalAlign();
|
208 |
//Save the current position
|
209 |
$x = $this->GetX();
|
210 |
$y = $this->GetY();
|
211 |
//Draw the border
|
212 |
+
$this->Rect( $x, $y, $w, $h, $this->table_props['border_style'] );
|
213 |
|
214 |
if ( isset( $data[ $i ]['type'], $data[ $i ]['value'] ) && 'image' === $data[ $i ]['type'] && file_exists( $data[ $i ]['value'] ) ) {
|
215 |
$source = $data[ $i ]['value'];
|
217 |
$this->Image( $source, $x + 1 / 2, $y + 1 / 2, $w - 1, $h - 1, $type );
|
218 |
} elseif ( ! is_array( $data[ $i ] ) ) {
|
219 |
//Print the text
|
220 |
+
$this->MultiCell( $w, $h, $data[ $i ], 0, $horizontal_align, $vertical_align );
|
221 |
}
|
222 |
|
223 |
//Put the position to the right of the cell
|
431 |
|
432 |
$buffer = $this->stretch_buffer;
|
433 |
$stretch_buffer_params = $this->stretch_buffer_params;
|
434 |
+
|
435 |
$this->stretch_buffer = array();
|
436 |
$this->stretch_buffer_params = array();
|
437 |
|
441 |
$this->Row( array_shift( $buffer ), $params['widths'], $params['height'] );
|
442 |
$this->changeBrushToDraw( 'table_row' );
|
443 |
}
|
|
|
444 |
foreach ( $buffer as $index => $row ) {
|
445 |
$params = $stretch_buffer_params[ $index ];
|
446 |
+
$this->addRow( $row, $params['widths'], $params['height'], $params['row_style'] );
|
447 |
}
|
448 |
}
|
449 |
}
|
500 |
return $line_counter;
|
501 |
}
|
502 |
|
503 |
+
public function setHorizontalAligns( $a ) {
|
504 |
//Set the array of column alignments
|
505 |
$this->aligns = $a;
|
506 |
}
|
507 |
|
508 |
+
public function setVerticalAlign( $a ) {
|
509 |
+
$this->vertical_align = $a;
|
510 |
+
}
|
511 |
+
|
512 |
+
protected function getVerticalAlign() {
|
513 |
+
return $this->vertical_align;
|
514 |
+
}
|
515 |
+
|
516 |
+
protected function getHorizontalAlign( $i ) {
|
517 |
+
$alignsCount = count( $this->aligns );
|
518 |
+
|
519 |
+
if ( $i >= $alignsCount ) {
|
520 |
+
$i = $i % $alignsCount;
|
521 |
+
}
|
522 |
+
|
523 |
+
return isset( $this->aligns[ $i ] ) ? $this->aligns[ $i ] : 'L';
|
524 |
+
}
|
525 |
+
|
526 |
+
public function changeBrushToDraw( $what ) {
|
527 |
if ( ! in_array( $what, array_keys( $this->default_props ) ) ) {
|
528 |
return false;
|
529 |
}
|
classes/admin/class-wc-order-export-manage.php
CHANGED
@@ -234,6 +234,7 @@ class WC_Order_Export_Manage {
|
|
234 |
'product_attributes' => array(),
|
235 |
'product_itemmeta' => array(),
|
236 |
'format' => 'XLS',
|
|
|
237 |
'format_xls_use_xls_format' => 0,
|
238 |
'format_xls_sheet_name' => __( 'Orders', 'woo-order-export-lite' ),
|
239 |
'format_xls_display_column_names' => 1,
|
@@ -242,6 +243,7 @@ class WC_Order_Export_Manage {
|
|
242 |
'format_xls_force_general_format' => 0,
|
243 |
'format_xls_row_images_width' => 50,
|
244 |
'format_xls_row_images_height' => 50,
|
|
|
245 |
'format_csv_enclosure' => '"',
|
246 |
'format_csv_delimiter' => ',',
|
247 |
'format_csv_linebreak' => '\r\n',
|
@@ -250,10 +252,12 @@ class WC_Order_Export_Manage {
|
|
250 |
'format_csv_item_rows_start_from_new_line' => 0,
|
251 |
'format_csv_encoding' => 'UTF-8',
|
252 |
'format_csv_delete_linebreaks' => 0,
|
|
|
253 |
'format_tsv_linebreak' => '\r\n',
|
254 |
'format_tsv_display_column_names' => 1,
|
255 |
'format_tsv_add_utf8_bom' => 0,
|
256 |
'format_tsv_encoding' => 'UTF-8',
|
|
|
257 |
'format_xml_root_tag' => 'Orders',
|
258 |
'format_xml_order_tag' => 'Order',
|
259 |
'format_xml_product_tag' => 'Product',
|
@@ -261,6 +265,11 @@ class WC_Order_Export_Manage {
|
|
261 |
'format_xml_prepend_raw_xml' => '',
|
262 |
'format_xml_append_raw_xml' => '',
|
263 |
'format_xml_self_closing_tags' => 1,
|
|
|
|
|
|
|
|
|
|
|
264 |
|
265 |
'format_pdf_display_column_names' => 1,
|
266 |
'format_pdf_repeat_header' => 1,
|
@@ -273,6 +282,7 @@ class WC_Order_Export_Manage {
|
|
273 |
'format_pdf_fit_page_width' => 0,
|
274 |
'format_pdf_cols_width' => '25',
|
275 |
'format_pdf_cols_align' => 'L',
|
|
|
276 |
'format_pdf_page_header_text_color' => '#000000',
|
277 |
'format_pdf_page_footer_text_color' => '#000000',
|
278 |
'format_pdf_table_header_text_color' => '#000000',
|
@@ -299,6 +309,8 @@ class WC_Order_Export_Manage {
|
|
299 |
'format_html_table_header_background_color' => '#FFFFFF',
|
300 |
'format_html_table_row_text_color' => '#000000',
|
301 |
'format_html_table_row_background_color' => '#FFFFFF',
|
|
|
|
|
302 |
'format_html_custom_css' => $settings['default_html_css'],
|
303 |
|
304 |
'all_products_from_order' => 1,
|
@@ -315,8 +327,6 @@ class WC_Order_Export_Manage {
|
|
315 |
'strip_tags_product_fields' => 0,
|
316 |
'cleanup_phone' => 0,
|
317 |
'enable_debug' => 0,
|
318 |
-
'format_json_start_tag' => '[',
|
319 |
-
'format_json_end_tag' => ']',
|
320 |
'custom_php' => 0,
|
321 |
'custom_php_code' => '',
|
322 |
'mark_exported_orders' => 0,
|
@@ -416,7 +426,7 @@ class WC_Order_Export_Manage {
|
|
416 |
$result = WC_Order_Export_Data_Extractor_UI::get_order_fields( $format );
|
417 |
break;
|
418 |
case 'order_product_fields':
|
419 |
-
$result = WC_Order_Export_Data_Extractor_UI::get_order_product_fields( $format );
|
420 |
break;
|
421 |
case 'order_coupon_fields':
|
422 |
$result = WC_Order_Export_Data_Extractor_UI::get_order_coupon_fields( $format );
|
@@ -450,7 +460,7 @@ class WC_Order_Export_Manage {
|
|
450 |
|
451 |
public static function make_all_fields( $format ) {
|
452 |
$order_fields = array();
|
453 |
-
foreach ( array_keys( WC_Order_Export_Data_Extractor_UI::
|
454 |
if ( 'products' == $segment ) {
|
455 |
$method = "get_order_product_fields";
|
456 |
$filter = "woe_get_order_product_fields";
|
234 |
'product_attributes' => array(),
|
235 |
'product_itemmeta' => array(),
|
236 |
'format' => 'XLS',
|
237 |
+
|
238 |
'format_xls_use_xls_format' => 0,
|
239 |
'format_xls_sheet_name' => __( 'Orders', 'woo-order-export-lite' ),
|
240 |
'format_xls_display_column_names' => 1,
|
243 |
'format_xls_force_general_format' => 0,
|
244 |
'format_xls_row_images_width' => 50,
|
245 |
'format_xls_row_images_height' => 50,
|
246 |
+
|
247 |
'format_csv_enclosure' => '"',
|
248 |
'format_csv_delimiter' => ',',
|
249 |
'format_csv_linebreak' => '\r\n',
|
252 |
'format_csv_item_rows_start_from_new_line' => 0,
|
253 |
'format_csv_encoding' => 'UTF-8',
|
254 |
'format_csv_delete_linebreaks' => 0,
|
255 |
+
|
256 |
'format_tsv_linebreak' => '\r\n',
|
257 |
'format_tsv_display_column_names' => 1,
|
258 |
'format_tsv_add_utf8_bom' => 0,
|
259 |
'format_tsv_encoding' => 'UTF-8',
|
260 |
+
|
261 |
'format_xml_root_tag' => 'Orders',
|
262 |
'format_xml_order_tag' => 'Order',
|
263 |
'format_xml_product_tag' => 'Product',
|
265 |
'format_xml_prepend_raw_xml' => '',
|
266 |
'format_xml_append_raw_xml' => '',
|
267 |
'format_xml_self_closing_tags' => 1,
|
268 |
+
|
269 |
+
'format_json_start_tag' => '[',
|
270 |
+
'format_json_end_tag' => ']',
|
271 |
+
'format_json_unescaped_slashes' => 0,
|
272 |
+
'format_json_numeric_check' => 0,
|
273 |
|
274 |
'format_pdf_display_column_names' => 1,
|
275 |
'format_pdf_repeat_header' => 1,
|
282 |
'format_pdf_fit_page_width' => 0,
|
283 |
'format_pdf_cols_width' => '25',
|
284 |
'format_pdf_cols_align' => 'L',
|
285 |
+
'format_pdf_cols_vertical_align' => 'T',
|
286 |
'format_pdf_page_header_text_color' => '#000000',
|
287 |
'format_pdf_page_footer_text_color' => '#000000',
|
288 |
'format_pdf_table_header_text_color' => '#000000',
|
309 |
'format_html_table_header_background_color' => '#FFFFFF',
|
310 |
'format_html_table_row_text_color' => '#000000',
|
311 |
'format_html_table_row_background_color' => '#FFFFFF',
|
312 |
+
'format_html_row_images_width' => 100,
|
313 |
+
'format_html_row_images_height' => 100,
|
314 |
'format_html_custom_css' => $settings['default_html_css'],
|
315 |
|
316 |
'all_products_from_order' => 1,
|
327 |
'strip_tags_product_fields' => 0,
|
328 |
'cleanup_phone' => 0,
|
329 |
'enable_debug' => 0,
|
|
|
|
|
330 |
'custom_php' => 0,
|
331 |
'custom_php_code' => '',
|
332 |
'mark_exported_orders' => 0,
|
426 |
$result = WC_Order_Export_Data_Extractor_UI::get_order_fields( $format );
|
427 |
break;
|
428 |
case 'order_product_fields':
|
429 |
+
$result = array_merge(WC_Order_Export_Data_Extractor_UI::get_order_product_fields( $format ), WC_Order_Export_Data_Extractor_UI::get_order_fields_product_items());
|
430 |
break;
|
431 |
case 'order_coupon_fields':
|
432 |
$result = WC_Order_Export_Data_Extractor_UI::get_order_coupon_fields( $format );
|
460 |
|
461 |
public static function make_all_fields( $format ) {
|
462 |
$order_fields = array();
|
463 |
+
foreach ( array_keys( WC_Order_Export_Data_Extractor_UI::get_unselected_fields_segments() ) as $segment ) {
|
464 |
if ( 'products' == $segment ) {
|
465 |
$method = "get_order_product_fields";
|
466 |
$filter = "woe_get_order_product_fields";
|
classes/admin/tabs/ajax/trait-wc-order-export-admin-tab-abstract-ajax-export.php
CHANGED
@@ -12,8 +12,14 @@ trait WC_Order_Export_Admin_Tab_Abstract_Ajax_Export {
|
|
12 |
// use unsaved settings
|
13 |
|
14 |
do_action( 'woe_start_preview_job', $_POST['id'], $settings );
|
15 |
-
|
|
|
|
|
|
|
16 |
WC_Order_Export_Engine::build_file( $settings, 'preview', 'browser', 0, $_POST['limit'] );
|
|
|
|
|
|
|
17 |
}
|
18 |
|
19 |
public function ajax_estimate() {
|
@@ -31,7 +37,7 @@ trait WC_Order_Export_Admin_Tab_Abstract_Ajax_Export {
|
|
31 |
$this->start_prevent_object_cache();
|
32 |
$settings = WC_Order_Export_Manage::make_new_settings( $_POST );
|
33 |
|
34 |
-
$filename = WC_Order_Export_Engine::
|
35 |
if ( ! $filename ) {
|
36 |
die( __( 'Can\'t create temporary file', 'woo-order-export-lite' ) );
|
37 |
}
|
12 |
// use unsaved settings
|
13 |
|
14 |
do_action( 'woe_start_preview_job', $_POST['id'], $settings );
|
15 |
+
|
16 |
+
WC_Order_Export_Engine::kill_buffers();
|
17 |
+
ob_start(); // we need html for preview , even empty!
|
18 |
+
$total = WC_Order_Export_Engine::build_file( $settings, 'estimate_preview', 'file', 0, 0, 'test');
|
19 |
WC_Order_Export_Engine::build_file( $settings, 'preview', 'browser', 0, $_POST['limit'] );
|
20 |
+
$html = ob_get_contents();
|
21 |
+
ob_end_clean();
|
22 |
+
echo json_encode( array( 'total' => $total, 'html' => $html ) );
|
23 |
}
|
24 |
|
25 |
public function ajax_estimate() {
|
37 |
$this->start_prevent_object_cache();
|
38 |
$settings = WC_Order_Export_Manage::make_new_settings( $_POST );
|
39 |
|
40 |
+
$filename = WC_Order_Export_Engine::get_filename( "orders" );
|
41 |
if ( ! $filename ) {
|
42 |
die( __( 'Can\'t create temporary file', 'woo-order-export-lite' ) );
|
43 |
}
|
classes/class-wc-order-export-admin.php
CHANGED
@@ -21,13 +21,13 @@ class WC_Order_Export_Admin {
|
|
21 |
|
22 |
if ( is_admin() ) { // admin actions
|
23 |
add_action( 'admin_menu', array( $this, 'add_menu' ) );
|
24 |
-
|
25 |
// load scripts on our pages only
|
26 |
if ( isset( $_GET['page'] ) && $_GET['page'] == 'wc-order-export' ) {
|
27 |
add_action( 'admin_enqueue_scripts', array( $this, 'thematic_enqueue_scripts' ) );
|
28 |
add_filter( 'script_loader_src', array( $this, 'script_loader_src' ), 999, 2 );
|
29 |
}
|
30 |
-
|
31 |
add_action( 'wp_loaded' , function() { //init tabs after loading text domains!
|
32 |
$this->tabs = $this->get_tabs();
|
33 |
});
|
@@ -63,7 +63,7 @@ class WC_Order_Export_Admin {
|
|
63 |
}
|
64 |
|
65 |
do_action( 'woe_order_export_admin_init', $this );
|
66 |
-
|
67 |
$this->settings = WC_Order_Export_Main_Settings::get_settings();
|
68 |
|
69 |
}
|
@@ -288,8 +288,9 @@ class WC_Order_Export_Admin {
|
|
288 |
$translation_array = array(
|
289 |
'empty_column_name' => __( 'empty column name', 'woo-order-export-lite' ),
|
290 |
'empty_meta_key' => __( 'empty meta key', 'woo-order-export-lite' ),
|
291 |
-
'empty_meta_key_and_taxonomy' => __( 'select product field or
|
292 |
'woo-order-export-lite' ),
|
|
|
293 |
'empty_value' => __( 'empty value', 'woo-order-export-lite' ),
|
294 |
'empty_title' => __( 'title is empty', 'woo-order-export-lite' ),
|
295 |
'wrong_date_range' => __( 'Date From is greater than Date To', 'woo-order-export-lite' ),
|
@@ -390,7 +391,7 @@ class WC_Order_Export_Admin {
|
|
390 |
// AJAX part
|
391 |
// calls ajax_action_XXXX
|
392 |
public function ajax_gate() {
|
393 |
-
|
394 |
if( !current_user_can('view_woocommerce_reports') ){
|
395 |
die( __( 'You can not do it', 'woo-order-export-lite' ) );
|
396 |
}
|
21 |
|
22 |
if ( is_admin() ) { // admin actions
|
23 |
add_action( 'admin_menu', array( $this, 'add_menu' ) );
|
24 |
+
|
25 |
// load scripts on our pages only
|
26 |
if ( isset( $_GET['page'] ) && $_GET['page'] == 'wc-order-export' ) {
|
27 |
add_action( 'admin_enqueue_scripts', array( $this, 'thematic_enqueue_scripts' ) );
|
28 |
add_filter( 'script_loader_src', array( $this, 'script_loader_src' ), 999, 2 );
|
29 |
}
|
30 |
+
|
31 |
add_action( 'wp_loaded' , function() { //init tabs after loading text domains!
|
32 |
$this->tabs = $this->get_tabs();
|
33 |
});
|
63 |
}
|
64 |
|
65 |
do_action( 'woe_order_export_admin_init', $this );
|
66 |
+
|
67 |
$this->settings = WC_Order_Export_Main_Settings::get_settings();
|
68 |
|
69 |
}
|
288 |
$translation_array = array(
|
289 |
'empty_column_name' => __( 'empty column name', 'woo-order-export-lite' ),
|
290 |
'empty_meta_key' => __( 'empty meta key', 'woo-order-export-lite' ),
|
291 |
+
'empty_meta_key_and_taxonomy' => __( 'select product field or taxonomy',
|
292 |
'woo-order-export-lite' ),
|
293 |
+
'empty_item_field' => __( 'select item field', 'woo-order-export-lite' ),
|
294 |
'empty_value' => __( 'empty value', 'woo-order-export-lite' ),
|
295 |
'empty_title' => __( 'title is empty', 'woo-order-export-lite' ),
|
296 |
'wrong_date_range' => __( 'Date From is greater than Date To', 'woo-order-export-lite' ),
|
391 |
// AJAX part
|
392 |
// calls ajax_action_XXXX
|
393 |
public function ajax_gate() {
|
394 |
+
|
395 |
if( !current_user_can('view_woocommerce_reports') ){
|
396 |
die( __( 'You can not do it', 'woo-order-export-lite' ) );
|
397 |
}
|
classes/core/class-wc-order-export-data-extractor-ui.php
CHANGED
@@ -199,8 +199,13 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
199 |
|
200 |
public static function get_order_custom_fields_values( $key ) {
|
201 |
global $wpdb;
|
202 |
-
|
203 |
-
|
|
|
|
|
|
|
|
|
|
|
204 |
sort( $values );
|
205 |
|
206 |
return $values;
|
@@ -217,7 +222,15 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
217 |
|
218 |
public static function get_product_custom_fields_values( $key ) {
|
219 |
global $wpdb;
|
220 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
$key ) );
|
222 |
sort( $values );
|
223 |
|
@@ -273,7 +286,14 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
273 |
|
274 |
public static function get_order_meta_values( $type, $key ) {
|
275 |
global $wpdb;
|
276 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
array( $type . strtolower( $key ) ) );
|
278 |
$results = $wpdb->get_col( $query );
|
279 |
$data = array_filter( $results );
|
@@ -326,24 +346,14 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
326 |
|
327 |
public static function get_order_product_fields( $format ) {
|
328 |
$map = array(
|
329 |
-
'item_id' => array(
|
330 |
-
'label' => __( 'Item ID', 'woo-order-export-lite' ),
|
331 |
-
'checked' => 0,
|
332 |
-
'format' => 'number',
|
333 |
-
),
|
334 |
-
'line_id' => array(
|
335 |
-
'label' => __( 'Item #', 'woo-order-export-lite' ),
|
336 |
-
'checked' => 1,
|
337 |
-
'format' => 'number',
|
338 |
-
),
|
339 |
'sku' => array(
|
340 |
'label' => __( 'SKU', 'woo-order-export-lite' ),
|
341 |
'checked' => 1,
|
342 |
'format' => 'string',
|
343 |
),
|
344 |
-
'
|
345 |
-
'label' => __( '
|
346 |
-
'checked' =>
|
347 |
'format' => 'string',
|
348 |
),
|
349 |
'product_id' => array(
|
@@ -372,90 +382,15 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
372 |
'format' => 'string',
|
373 |
),
|
374 |
'seller' => array(
|
375 |
-
'label' => __( '
|
376 |
'checked' => 0,
|
377 |
'format' => 'string',
|
378 |
),
|
379 |
-
'qty' => array(
|
380 |
-
'label' => __( 'Quantity', 'woo-order-export-lite' ),
|
381 |
-
'checked' => 1,
|
382 |
-
'format' => 'number',
|
383 |
-
),
|
384 |
-
'qty_minus_refund' => array(
|
385 |
-
'label' => __( 'Quantity (- Refund)', 'woo-order-export-lite' ),
|
386 |
-
'checked' => 0,
|
387 |
-
'format' => 'number',
|
388 |
-
),
|
389 |
-
'item_price' => array(
|
390 |
-
'label' => __( 'Item Cost', 'woo-order-export-lite' ),
|
391 |
-
'checked' => 1,
|
392 |
-
'format' => 'money',
|
393 |
-
),
|
394 |
'price' => array(
|
395 |
'label' => __( 'Product Current Price', 'woo-order-export-lite' ),
|
396 |
'checked' => 0,
|
397 |
'format' => 'money',
|
398 |
),
|
399 |
-
'line_no_tax' => array(
|
400 |
-
'label' => __( 'Order Line (w/o tax)', 'woo-order-export-lite' ),
|
401 |
-
'checked' => 0,
|
402 |
-
'format' => 'money',
|
403 |
-
),
|
404 |
-
'line_tax' => array(
|
405 |
-
'label' => __( 'Order Line Tax', 'woo-order-export-lite' ),
|
406 |
-
'checked' => 0,
|
407 |
-
'format' => 'money',
|
408 |
-
),
|
409 |
-
'line_tax_refunded' => array(
|
410 |
-
'label' => __( 'Order Line Tax Refunded', 'woo-order-export-lite' ),
|
411 |
-
'checked' => 0,
|
412 |
-
'format' => 'money',
|
413 |
-
),
|
414 |
-
'line_tax_minus_refund' => array(
|
415 |
-
'label' => __( 'Order Line Tax (- Refund)', 'woo-order-export-lite' ),
|
416 |
-
'checked' => 0,
|
417 |
-
'format' => 'money',
|
418 |
-
),
|
419 |
-
'line_subtotal' => array(
|
420 |
-
'label' => __( 'Order Line Subtotal', 'woo-order-export-lite' ),
|
421 |
-
'checked' => 0,
|
422 |
-
'format' => 'money',
|
423 |
-
),
|
424 |
-
'line_subtotal_tax' => array(
|
425 |
-
'label' => __( 'Order Line Subtotal Tax', 'woo-order-export-lite' ),
|
426 |
-
'checked' => 0,
|
427 |
-
'format' => 'money',
|
428 |
-
),
|
429 |
-
'line_total' => array(
|
430 |
-
'label' => __( 'Order Line Total', 'woo-order-export-lite' ),
|
431 |
-
'checked' => 0,
|
432 |
-
'format' => 'money',
|
433 |
-
),
|
434 |
-
'line_total_plus_tax' => array(
|
435 |
-
'label' => __( 'Order Line Total (include tax)', 'woo-order-export-lite' ),
|
436 |
-
'checked' => 0,
|
437 |
-
'format' => 'money',
|
438 |
-
),
|
439 |
-
'line_total_refunded' => array(
|
440 |
-
'label' => __( 'Order Line Total Refunded', 'woo-order-export-lite' ),
|
441 |
-
'checked' => 0,
|
442 |
-
'format' => 'money',
|
443 |
-
),
|
444 |
-
'line_total_minus_refund' => array(
|
445 |
-
'label' => __( 'Order Line Total (- Refund)', 'woo-order-export-lite' ),
|
446 |
-
'checked' => 0,
|
447 |
-
'format' => 'money',
|
448 |
-
),
|
449 |
-
'discount_amount' => array(
|
450 |
-
'label' => __( 'Item Discount Amount', 'woo-order-export-lite' ),
|
451 |
-
'checked' => 0,
|
452 |
-
'format' => 'money',
|
453 |
-
),
|
454 |
-
'tax_rate' => array(
|
455 |
-
'label' => __( 'Item Tax Rate', 'woo-order-export-lite' ),
|
456 |
-
'checked' => 0,
|
457 |
-
'format' => 'number',
|
458 |
-
),
|
459 |
'type' => array(
|
460 |
'label' => __( 'Type', 'woo-order-export-lite' ),
|
461 |
'checked' => 0,
|
@@ -501,11 +436,6 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
501 |
'checked' => 0,
|
502 |
'format' => 'string',
|
503 |
),
|
504 |
-
'item_download_url' => array(
|
505 |
-
'label' => __( 'Item download URL', 'woo-order-export-lite' ),
|
506 |
-
'checked' => 0,
|
507 |
-
'format' => 'string',
|
508 |
-
),
|
509 |
'image_url' => array(
|
510 |
'label' => __( 'Image URL', 'woo-order-export-lite' ),
|
511 |
'checked' => 0,
|
@@ -767,6 +697,16 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
767 |
'checked' => 0,
|
768 |
'format' => 'number',
|
769 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
770 |
'summary_report_total_amount' => array(
|
771 |
'label' => __( 'Summary Report Total Amount', 'woo-order-export-lite' ),
|
772 |
'checked' => 0,
|
@@ -777,6 +717,16 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
777 |
'checked' => 0,
|
778 |
'format' => 'money',
|
779 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
780 |
'summary_report_total_refund_count' => array(
|
781 |
'label' => __( 'Summary Report Total Refunds', 'woo-order-export-lite' ),
|
782 |
'checked' => 0,
|
@@ -972,6 +922,138 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
972 |
);
|
973 |
}
|
974 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
975 |
// meta
|
976 |
public static function get_order_fields_coupons() {
|
977 |
return array(
|
@@ -986,21 +1068,6 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
986 |
|
987 |
public static function get_order_fields_cart() {
|
988 |
return array(
|
989 |
-
'shipping_method_title' => array(
|
990 |
-
'label' => __( 'Shipping Method Title', 'woo-order-export-lite' ),
|
991 |
-
'checked' => 1,
|
992 |
-
'format' => 'string',
|
993 |
-
),
|
994 |
-
'shipping_method' => array(
|
995 |
-
'label' => __( 'Shipping Method', 'woo-order-export-lite' ),
|
996 |
-
'checked' => 0,
|
997 |
-
'format' => 'string',
|
998 |
-
),
|
999 |
-
'shipping_method_only' => array(
|
1000 |
-
'label' => __( 'Shipping Method (no id)', 'woo-order-export-lite' ),
|
1001 |
-
'checked' => 0,
|
1002 |
-
'format' => 'string',
|
1003 |
-
),
|
1004 |
'payment_method_title' => array(
|
1005 |
'label' => __( 'Payment Method Title', 'woo-order-export-lite' ),
|
1006 |
'checked' => 1,
|
@@ -1056,6 +1123,21 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
1056 |
|
1057 |
public static function get_order_fields_ship_calc() {
|
1058 |
return array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1059 |
'order_shipping' => array(
|
1060 |
'label' => __( 'Order Shipping Amount', 'woo-order-export-lite' ),
|
1061 |
'checked' => 1,
|
@@ -1144,28 +1226,7 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
1144 |
}
|
1145 |
|
1146 |
public static function get_order_fields_misc() {
|
1147 |
-
return array(
|
1148 |
-
'total_weight_items' => array(
|
1149 |
-
'label' => __( 'Total weight', 'woo-order-export-lite' ),
|
1150 |
-
'checked' => 0,
|
1151 |
-
'format' => 'number',
|
1152 |
-
),
|
1153 |
-
'count_total_items' => array(
|
1154 |
-
'label' => __( 'Total items', 'woo-order-export-lite' ),
|
1155 |
-
'checked' => 0,
|
1156 |
-
'format' => 'number',
|
1157 |
-
),
|
1158 |
-
'count_exported_items' => array(
|
1159 |
-
'label' => __( 'Exported items', 'woo-order-export-lite' ),
|
1160 |
-
'checked' => 0,
|
1161 |
-
'format' => 'number',
|
1162 |
-
),
|
1163 |
-
'count_unique_products' => array(
|
1164 |
-
'label' => __( 'Total products', 'woo-order-export-lite' ),
|
1165 |
-
'checked' => 0,
|
1166 |
-
'format' => 'number',
|
1167 |
-
),
|
1168 |
-
);
|
1169 |
}
|
1170 |
|
1171 |
// for UI only
|
@@ -1187,6 +1248,7 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
1187 |
'billing' => __('Billing Address', 'woo-order-export-lite'),
|
1188 |
'shipping' => __('Shipping Address', 'woo-order-export-lite'),
|
1189 |
'products' => __('Products', 'woo-order-export-lite'),
|
|
|
1190 |
'coupons' => __('Coupons', 'woo-order-export-lite'),
|
1191 |
'other_items' => __('Other items', 'woo-order-export-lite'),
|
1192 |
'cart' => __('Cart', 'woo-order-export-lite'),
|
@@ -1196,6 +1258,30 @@ class WC_Order_Export_Data_Extractor_UI extends WC_Order_Export_Data_Extractor {
|
|
1196 |
));
|
1197 |
}
|
1198 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1199 |
public static function get_format_fields() {
|
1200 |
return array(
|
1201 |
'string' => __( 'String', 'woo-order-export-lite' ),
|
199 |
|
200 |
public static function get_order_custom_fields_values( $key ) {
|
201 |
global $wpdb;
|
202 |
+
|
203 |
+
$order_ids = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_type = '" . self::$object_type . "' ORDER BY ID DESC LIMIT 1000" );
|
204 |
+
if( empty($order_ids) )
|
205 |
+
return array();
|
206 |
+
|
207 |
+
$order_ids = join( ",", $order_ids );
|
208 |
+
$values = $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id IN ($order_ids)", $key ) );
|
209 |
sort( $values );
|
210 |
|
211 |
return $values;
|
222 |
|
223 |
public static function get_product_custom_fields_values( $key ) {
|
224 |
global $wpdb;
|
225 |
+
|
226 |
+
$product_ids = $wpdb->get_col( "SELECT DISTINCT ID FROM {$wpdb->posts} WHERE post_type = 'product_variation' OR post_type = 'product' ORDER BY ID DESC LIMIT 1000" );
|
227 |
+
if( empty($product_ids) )
|
228 |
+
return array();
|
229 |
+
|
230 |
+
$product_ids = join( ",", $product_ids );
|
231 |
+
|
232 |
+
|
233 |
+
$values = $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT meta_value FROM {$wpdb->postmeta} WHERE meta_key = %s AND post_id IN ($product_ids)",
|
234 |
$key ) );
|
235 |
sort( $values );
|
236 |
|
286 |
|
287 |
public static function get_order_meta_values( $type, $key ) {
|
288 |
global $wpdb;
|
289 |
+
|
290 |
+
$order_ids = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_type = '" . self::$object_type . "' ORDER BY ID DESC LIMIT 1000" );
|
291 |
+
if( empty($order_ids) )
|
292 |
+
return array();
|
293 |
+
|
294 |
+
$order_ids = join( ",", $order_ids );
|
295 |
+
|
296 |
+
$query = $wpdb->prepare( 'SELECT DISTINCT meta_value FROM ' . $wpdb->postmeta . " WHERE meta_key = %s AND post_id IN($order_ids)",
|
297 |
array( $type . strtolower( $key ) ) );
|
298 |
$results = $wpdb->get_col( $query );
|
299 |
$data = array_filter( $results );
|
346 |
|
347 |
public static function get_order_product_fields( $format ) {
|
348 |
$map = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
'sku' => array(
|
350 |
'label' => __( 'SKU', 'woo-order-export-lite' ),
|
351 |
'checked' => 1,
|
352 |
'format' => 'string',
|
353 |
),
|
354 |
+
'sku_parent' => array(
|
355 |
+
'label' => __( 'SKU (parent)', 'woo-order-export-lite' ),
|
356 |
+
'checked' => 0,
|
357 |
'format' => 'string',
|
358 |
),
|
359 |
'product_id' => array(
|
382 |
'format' => 'string',
|
383 |
),
|
384 |
'seller' => array(
|
385 |
+
'label' => __( 'Product Seller', 'woo-order-export-lite' ),
|
386 |
'checked' => 0,
|
387 |
'format' => 'string',
|
388 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
'price' => array(
|
390 |
'label' => __( 'Product Current Price', 'woo-order-export-lite' ),
|
391 |
'checked' => 0,
|
392 |
'format' => 'money',
|
393 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
'type' => array(
|
395 |
'label' => __( 'Type', 'woo-order-export-lite' ),
|
396 |
'checked' => 0,
|
436 |
'checked' => 0,
|
437 |
'format' => 'string',
|
438 |
),
|
|
|
|
|
|
|
|
|
|
|
439 |
'image_url' => array(
|
440 |
'label' => __( 'Image URL', 'woo-order-export-lite' ),
|
441 |
'checked' => 0,
|
697 |
'checked' => 0,
|
698 |
'format' => 'number',
|
699 |
),
|
700 |
+
'summary_report_total_count_items' => array(
|
701 |
+
'label' => __( 'Summary Report Total Items', 'woo-order-export-lite' ),
|
702 |
+
'checked' => 0,
|
703 |
+
'format' => 'number',
|
704 |
+
),
|
705 |
+
'summary_report_total_count_items_exported' => array(
|
706 |
+
'label' => __( 'Summary Report Total Items (Exported)', 'woo-order-export-lite' ),
|
707 |
+
'checked' => 0,
|
708 |
+
'format' => 'number',
|
709 |
+
),
|
710 |
'summary_report_total_amount' => array(
|
711 |
'label' => __( 'Summary Report Total Amount', 'woo-order-export-lite' ),
|
712 |
'checked' => 0,
|
717 |
'checked' => 0,
|
718 |
'format' => 'money',
|
719 |
),
|
720 |
+
'summary_report_total_shipping' => array(
|
721 |
+
'label' => __( 'Summary Report Total Shipping', 'woo-order-export-lite' ),
|
722 |
+
'checked' => 0,
|
723 |
+
'format' => 'money',
|
724 |
+
),
|
725 |
+
'summary_report_total_discount' => array(
|
726 |
+
'label' => __( 'Summary Report Total Discount', 'woo-order-export-lite' ),
|
727 |
+
'checked' => 0,
|
728 |
+
'format' => 'money',
|
729 |
+
),
|
730 |
'summary_report_total_refund_count' => array(
|
731 |
'label' => __( 'Summary Report Total Refunds', 'woo-order-export-lite' ),
|
732 |
'checked' => 0,
|
922 |
);
|
923 |
}
|
924 |
|
925 |
+
public static function get_order_fields_product_items() {
|
926 |
+
$map = array(
|
927 |
+
'item_id' => array(
|
928 |
+
'label' => __( 'Item ID', 'woo-order-export-lite' ),
|
929 |
+
'checked' => 0,
|
930 |
+
'format' => 'number',
|
931 |
+
),
|
932 |
+
'line_id' => array(
|
933 |
+
'label' => __( 'Item #', 'woo-order-export-lite' ),
|
934 |
+
'checked' => 1,
|
935 |
+
'format' => 'number',
|
936 |
+
),
|
937 |
+
'name' => array(
|
938 |
+
'label' => __( 'Item Name', 'woo-order-export-lite' ),
|
939 |
+
'checked' => 1,
|
940 |
+
'format' => 'string',
|
941 |
+
),
|
942 |
+
'qty' => array(
|
943 |
+
'label' => __( 'Quantity', 'woo-order-export-lite' ),
|
944 |
+
'checked' => 1,
|
945 |
+
'format' => 'number',
|
946 |
+
),
|
947 |
+
'qty_minus_refund' => array(
|
948 |
+
'label' => __( 'Quantity (- Refund)', 'woo-order-export-lite' ),
|
949 |
+
'checked' => 0,
|
950 |
+
'format' => 'number',
|
951 |
+
),
|
952 |
+
'item_price' => array(
|
953 |
+
'label' => __( 'Item Cost', 'woo-order-export-lite' ),
|
954 |
+
'checked' => 1,
|
955 |
+
'format' => 'money',
|
956 |
+
),
|
957 |
+
'line_no_tax' => array(
|
958 |
+
'label' => __( 'Order Line (w/o tax)', 'woo-order-export-lite' ),
|
959 |
+
'checked' => 0,
|
960 |
+
'format' => 'money',
|
961 |
+
),
|
962 |
+
'line_tax' => array(
|
963 |
+
'label' => __( 'Order Line Tax', 'woo-order-export-lite' ),
|
964 |
+
'checked' => 0,
|
965 |
+
'format' => 'money',
|
966 |
+
),
|
967 |
+
'line_tax_refunded' => array(
|
968 |
+
'label' => __( 'Order Line Tax Refunded', 'woo-order-export-lite' ),
|
969 |
+
'checked' => 0,
|
970 |
+
'format' => 'money',
|
971 |
+
),
|
972 |
+
'line_tax_minus_refund' => array(
|
973 |
+
'label' => __( 'Order Line Tax (- Refund)', 'woo-order-export-lite' ),
|
974 |
+
'checked' => 0,
|
975 |
+
'format' => 'money',
|
976 |
+
),
|
977 |
+
'line_subtotal' => array(
|
978 |
+
'label' => __( 'Order Line Subtotal', 'woo-order-export-lite' ),
|
979 |
+
'checked' => 0,
|
980 |
+
'format' => 'money',
|
981 |
+
),
|
982 |
+
'line_subtotal_tax' => array(
|
983 |
+
'label' => __( 'Order Line Subtotal Tax', 'woo-order-export-lite' ),
|
984 |
+
'checked' => 0,
|
985 |
+
'format' => 'money',
|
986 |
+
),
|
987 |
+
'line_total' => array(
|
988 |
+
'label' => __( 'Order Line Total', 'woo-order-export-lite' ),
|
989 |
+
'checked' => 0,
|
990 |
+
'format' => 'money',
|
991 |
+
),
|
992 |
+
'line_total_plus_tax' => array(
|
993 |
+
'label' => __( 'Order Line Total (include tax)', 'woo-order-export-lite' ),
|
994 |
+
'checked' => 0,
|
995 |
+
'format' => 'money',
|
996 |
+
),
|
997 |
+
'line_total_refunded' => array(
|
998 |
+
'label' => __( 'Order Line Total Refunded', 'woo-order-export-lite' ),
|
999 |
+
'checked' => 0,
|
1000 |
+
'format' => 'money',
|
1001 |
+
),
|
1002 |
+
'line_total_minus_refund' => array(
|
1003 |
+
'label' => __( 'Order Line Total (- Refund)', 'woo-order-export-lite' ),
|
1004 |
+
'checked' => 0,
|
1005 |
+
'format' => 'money',
|
1006 |
+
),
|
1007 |
+
'discount_amount' => array(
|
1008 |
+
'label' => __( 'Item Discount Amount', 'woo-order-export-lite' ),
|
1009 |
+
'checked' => 0,
|
1010 |
+
'format' => 'money',
|
1011 |
+
),
|
1012 |
+
'tax_rate' => array(
|
1013 |
+
'label' => __( 'Item Tax Rate', 'woo-order-export-lite' ),
|
1014 |
+
'checked' => 0,
|
1015 |
+
'format' => 'number',
|
1016 |
+
),
|
1017 |
+
'item_download_url' => array(
|
1018 |
+
'label' => __( 'Item download URL', 'woo-order-export-lite' ),
|
1019 |
+
'checked' => 0,
|
1020 |
+
'format' => 'string',
|
1021 |
+
),
|
1022 |
+
);
|
1023 |
+
|
1024 |
+
foreach ( $map as $key => &$value ) {
|
1025 |
+
$value['colname'] = $value['label'];
|
1026 |
+
$value['default'] = 1;
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
return $map;
|
1030 |
+
}
|
1031 |
+
|
1032 |
+
public static function get_order_fields_product_totals() {
|
1033 |
+
return array(
|
1034 |
+
'total_weight_items' => array(
|
1035 |
+
'label' => __( 'Total weight', 'woo-order-export-lite' ),
|
1036 |
+
'checked' => 0,
|
1037 |
+
'format' => 'number',
|
1038 |
+
),
|
1039 |
+
'count_total_items' => array(
|
1040 |
+
'label' => __( 'Total items', 'woo-order-export-lite' ),
|
1041 |
+
'checked' => 0,
|
1042 |
+
'format' => 'number',
|
1043 |
+
),
|
1044 |
+
'count_exported_items' => array(
|
1045 |
+
'label' => __( 'Exported items', 'woo-order-export-lite' ),
|
1046 |
+
'checked' => 0,
|
1047 |
+
'format' => 'number',
|
1048 |
+
),
|
1049 |
+
'count_unique_products' => array(
|
1050 |
+
'label' => __( 'Total products', 'woo-order-export-lite' ),
|
1051 |
+
'checked' => 0,
|
1052 |
+
'format' => 'number',
|
1053 |
+
),
|
1054 |
+
);
|
1055 |
+
}
|
1056 |
+
|
1057 |
// meta
|
1058 |
public static function get_order_fields_coupons() {
|
1059 |
return array(
|
1068 |
|
1069 |
public static function get_order_fields_cart() {
|
1070 |
return array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1071 |
'payment_method_title' => array(
|
1072 |
'label' => __( 'Payment Method Title', 'woo-order-export-lite' ),
|
1073 |
'checked' => 1,
|
1123 |
|
1124 |
public static function get_order_fields_ship_calc() {
|
1125 |
return array(
|
1126 |
+
'shipping_method_title' => array(
|
1127 |
+
'label' => __( 'Shipping Method Title', 'woo-order-export-lite' ),
|
1128 |
+
'checked' => 1,
|
1129 |
+
'format' => 'string',
|
1130 |
+
),
|
1131 |
+
'shipping_method' => array(
|
1132 |
+
'label' => __( 'Shipping Method', 'woo-order-export-lite' ),
|
1133 |
+
'checked' => 0,
|
1134 |
+
'format' => 'string',
|
1135 |
+
),
|
1136 |
+
'shipping_method_only' => array(
|
1137 |
+
'label' => __( 'Shipping Method (no id)', 'woo-order-export-lite' ),
|
1138 |
+
'checked' => 0,
|
1139 |
+
'format' => 'string',
|
1140 |
+
),
|
1141 |
'order_shipping' => array(
|
1142 |
'label' => __( 'Order Shipping Amount', 'woo-order-export-lite' ),
|
1143 |
'checked' => 1,
|
1226 |
}
|
1227 |
|
1228 |
public static function get_order_fields_misc() {
|
1229 |
+
return array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1230 |
}
|
1231 |
|
1232 |
// for UI only
|
1248 |
'billing' => __('Billing Address', 'woo-order-export-lite'),
|
1249 |
'shipping' => __('Shipping Address', 'woo-order-export-lite'),
|
1250 |
'products' => __('Products', 'woo-order-export-lite'),
|
1251 |
+
'product_totals' => __('Product totals', 'woo-order-export-lite'),
|
1252 |
'coupons' => __('Coupons', 'woo-order-export-lite'),
|
1253 |
'other_items' => __('Other items', 'woo-order-export-lite'),
|
1254 |
'cart' => __('Cart', 'woo-order-export-lite'),
|
1258 |
));
|
1259 |
}
|
1260 |
|
1261 |
+
/**
|
1262 |
+
* Same as get_order_segments() but with "product_items"
|
1263 |
+
*
|
1264 |
+
* @return array
|
1265 |
+
* @see WC_Order_Export_Data_Extractor_UI::get_order_segments
|
1266 |
+
*/
|
1267 |
+
public static function get_unselected_fields_segments() {
|
1268 |
+
return array(
|
1269 |
+
'common' => __( 'Common', 'woo-order-export-lite' ),
|
1270 |
+
'user' => __( 'User', 'woo-order-export-lite' ),
|
1271 |
+
'billing' => __( 'Billing Address', 'woo-order-export-lite' ),
|
1272 |
+
'shipping' => __( 'Shipping Address', 'woo-order-export-lite' ),
|
1273 |
+
'products' => __( 'Products', 'woo-order-export-lite' ),
|
1274 |
+
'product_items' => __( 'Product items', 'woo-order-export-lite' ),
|
1275 |
+
'product_totals' => __( 'Product totals', 'woo-order-export-lite' ),
|
1276 |
+
'coupons' => __( 'Coupons', 'woo-order-export-lite' ),
|
1277 |
+
'other_items' => __( 'Other items', 'woo-order-export-lite' ),
|
1278 |
+
'cart' => __( 'Cart', 'woo-order-export-lite' ),
|
1279 |
+
'ship_calc' => __( 'Shipping', 'woo-order-export-lite' ),
|
1280 |
+
'totals' => __( 'Totals', 'woo-order-export-lite' ),
|
1281 |
+
'misc' => __( 'Others', 'woo-order-export-lite' ),
|
1282 |
+
);
|
1283 |
+
}
|
1284 |
+
|
1285 |
public static function get_format_fields() {
|
1286 |
return array(
|
1287 |
'string' => __( 'String', 'woo-order-export-lite' ),
|
classes/core/class-wc-order-export-data-extractor.php
CHANGED
@@ -3,6 +3,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
3 |
exit; // Exit if accessed directly
|
4 |
}
|
5 |
|
|
|
|
|
|
|
|
|
6 |
class WC_Order_Export_Data_Extractor {
|
7 |
static $statuses;
|
8 |
static $countries;
|
@@ -444,11 +448,11 @@ class WC_Order_Export_Data_Extractor {
|
|
444 |
return false;
|
445 |
}
|
446 |
|
447 |
-
$sql = "SELECT DISTINCT p_id FROM
|
448 |
(SELECT order_items.order_item_id as order_item_id, MAX(CONVERT(orderitemmeta_product.meta_value ,UNSIGNED INTEGER)) as p_id FROM {$wpdb->prefix}woocommerce_order_items as order_items
|
449 |
$left_join_order_items_meta
|
450 |
WHERE order_item_type='line_item' $order_items_meta_where GROUP BY order_item_id
|
451 |
-
) AS temp";
|
452 |
if ( self::$track_sql_queries ) {
|
453 |
self::$sql_queries[] = $sql;
|
454 |
}
|
@@ -550,6 +554,7 @@ class WC_Order_Export_Data_Extractor {
|
|
550 |
$attrs = self::get_product_taxonomies();
|
551 |
$names2fields = array_flip( $attrs );
|
552 |
$filters = self::parse_complex_pairs( $settings['product_taxonomies']);
|
|
|
553 |
//print_r($filters );die();
|
554 |
foreach ( $filters as $operator => $fields ) {
|
555 |
foreach ( $fields as $label => $values ) {
|
@@ -559,21 +564,23 @@ class WC_Order_Export_Data_Extractor {
|
|
559 |
$label = esc_sql( $label );
|
560 |
|
561 |
if ($operator == 'NOT SET') {
|
562 |
-
$taxonomy_where
|
563 |
INNER JOIN {$wpdb->term_taxonomy} AS `{$field}_cat` ON `{$field}_cat`.term_taxonomy_id = `{$field}_rel`.term_taxonomy_id
|
564 |
WHERE `{$field}_cat`.taxonomy='$label' AND `{$field}_cat`.term_id IN (SELECT term_id FROM {$wpdb->terms} ) ))";
|
565 |
} elseif ($operator == 'IS SET') {
|
566 |
-
$taxonomy_where
|
567 |
INNER JOIN {$wpdb->term_taxonomy} AS `{$field}_cat` ON `{$field}_cat`.term_taxonomy_id = `{$field}_rel`.term_taxonomy_id
|
568 |
WHERE `{$field}_cat`.taxonomy='$label' AND `{$field}_cat`.term_id IN (SELECT term_id FROM {$wpdb->terms} ) ))";
|
569 |
} else {
|
570 |
-
$taxonomy_where
|
571 |
INNER JOIN {$wpdb->term_taxonomy} AS `{$field}_cat` ON `{$field}_cat`.term_taxonomy_id = `{$field}_rel`.term_taxonomy_id
|
572 |
WHERE `{$field}_cat`.taxonomy='$label' AND `{$field}_cat`.term_id IN (SELECT term_id FROM {$wpdb->terms} WHERE name IN ($values) ) ))";
|
573 |
}
|
574 |
}
|
575 |
}
|
576 |
}
|
|
|
|
|
577 |
}
|
578 |
|
579 |
$product_category_where = "";
|
@@ -884,14 +891,14 @@ class WC_Order_Export_Data_Extractor {
|
|
884 |
if ( ! in_array( $settings['sort'], WC_Order_Export_Engine::get_wp_posts_fields() ) ) {
|
885 |
$pos = "sort";
|
886 |
$left_join_order_meta[] = "LEFT JOIN {$wpdb->postmeta} AS ordermeta_cf_{$pos} " .
|
887 |
-
"ON ordermeta_cf_{$pos}.post_id = orders.
|
888 |
}
|
889 |
}
|
890 |
|
891 |
if ( $settings['export_unmarked_orders'] ) {
|
892 |
$pos = "export_unmarked_orders";
|
893 |
$field = "woe_order_exported";
|
894 |
-
$left_join_order_meta[] = "LEFT JOIN {$wpdb->postmeta} AS ordermeta_cf_{$pos} ON ordermeta_cf_{$pos}.post_id = orders.
|
895 |
$order_meta_where [] = " ( ordermeta_cf_{$pos}.meta_value IS NULL ) ";
|
896 |
}
|
897 |
|
@@ -901,7 +908,7 @@ class WC_Order_Export_Data_Extractor {
|
|
901 |
foreach ( $filters as $operator => $fields ) {
|
902 |
foreach ( $fields as $field => $values ) {
|
903 |
if ( $values ) {
|
904 |
-
$left_join_order_meta[] = "LEFT JOIN {$wpdb->postmeta} AS ordermeta_cf_{$pos} ON ordermeta_cf_{$pos}.post_id = orders.
|
905 |
if ( $operator == 'IN' OR $operator == 'NOT IN' ) {
|
906 |
$values = self::sql_subset( $values );
|
907 |
$order_meta_where [] = " ( ordermeta_cf_{$pos}.meta_value $operator ($values) ) ";
|
@@ -1053,9 +1060,9 @@ class WC_Order_Export_Data_Extractor {
|
|
1053 |
}
|
1054 |
$order_types = join( ",", apply_filters( "woe_sql_order_types", $order_types ) );
|
1055 |
|
1056 |
-
$sql = "SELECT " . apply_filters( "woe_sql_get_order_ids_fields", "ID AS order_id" ) . " FROM {$wpdb->posts} AS orders
|
1057 |
{$left_join_order_meta}
|
1058 |
-
WHERE orders.post_type in ( $order_types) AND $order_sql $order_meta_where $order_items_where";
|
1059 |
|
1060 |
if ( self::$track_sql_queries ) {
|
1061 |
self::$sql_queries[] = $sql;
|
@@ -1372,46 +1379,15 @@ class WC_Order_Export_Data_Extractor {
|
|
1372 |
global $wpdb;
|
1373 |
$coupons = array();
|
1374 |
foreach ( $order->get_items( 'coupon' ) as $item ) {
|
1375 |
-
$coupon_meta = array();
|
1376 |
-
$get_coupon_meta = ( array_diff( $labels->get_keys(), array( 'code', 'discount_amount', 'discount_amount_tax', 'excerpt' ) ) );
|
1377 |
-
$coupon_object = new WC_Coupon( $item['name'] );
|
1378 |
-
|
1379 |
-
if ( $get_coupon_meta ) {
|
1380 |
-
$recs = $wpdb->get_results( $wpdb->prepare( "SELECT meta_value,meta_key FROM {$wpdb->postmeta} AS meta
|
1381 |
-
JOIN {$wpdb->posts} AS posts ON posts.ID = meta.post_id
|
1382 |
-
WHERE posts.post_title=%s", $item['name'] ) );
|
1383 |
-
foreach ( $recs as $rec ) {
|
1384 |
-
$coupon_meta[ $rec->meta_key ] = $rec->meta_value;
|
1385 |
-
}
|
1386 |
-
|
1387 |
-
foreach ( $coupon_object->get_meta_data() as $meta) {
|
1388 |
-
$coupon_meta[ $meta->key ] = $meta->value;
|
1389 |
-
};
|
1390 |
-
}
|
1391 |
-
|
1392 |
$row = array();
|
|
|
1393 |
foreach ( $labels->unique_keys() as $field ) {
|
1394 |
-
|
1395 |
-
$row[ $field ] = $item[ $field ];
|
1396 |
-
} elseif ( $field == 'code' ) {
|
1397 |
-
$row['code'] = $item["name"];
|
1398 |
-
} elseif ( $field == 'discount_amount_plus_tax' ) {
|
1399 |
-
$row['discount_amount_plus_tax'] = $item["discount_amount"] + $item["discount_amount_tax"];
|
1400 |
-
} elseif ( $field == 'excerpt' ) {
|
1401 |
-
$post = get_page_by_title( $item['name'], OBJECT, 'shop_' . $item['type'] );
|
1402 |
-
$row[ $field ] = $post ? $post->post_excerpt : '';
|
1403 |
-
} elseif ( isset( $coupon_meta[ $field ] ) ) {
|
1404 |
-
$row[ $field ] = $coupon_meta[ $field ];
|
1405 |
-
} elseif ( isset( $static_vals[ $field ] ) ) {
|
1406 |
-
$row[ $field ] = $static_vals[ $field ];
|
1407 |
-
} else {
|
1408 |
-
$row[ $field ] = '';
|
1409 |
-
}
|
1410 |
|
1411 |
$row[ $field ] = apply_filters( "woe_get_order_coupon_value_{$field}", $row[ $field ], $order,
|
1412 |
$item );
|
1413 |
}
|
1414 |
-
$row = apply_filters( 'woe_fetch_order_coupon', $row, $item, $
|
1415 |
if ( $row ) {
|
1416 |
$coupons[] = $row;
|
1417 |
}
|
@@ -1423,10 +1399,11 @@ class WC_Order_Export_Data_Extractor {
|
|
1423 |
|
1424 |
|
1425 |
/**
|
1426 |
-
* @param WC_Order
|
1427 |
-
* @param WC_Order_Export_Labels
|
1428 |
-
* @param array
|
1429 |
-
* @param array
|
|
|
1430 |
*
|
1431 |
* @return array
|
1432 |
*/
|
@@ -1434,10 +1411,10 @@ class WC_Order_Export_Data_Extractor {
|
|
1434 |
$order,
|
1435 |
$labels,
|
1436 |
$static_vals,
|
1437 |
-
$options
|
|
|
1438 |
) {
|
1439 |
$export_only_products = $options['include_products'];
|
1440 |
-
$product_fields_with_tags = array( 'product_variation', 'post_content', 'post_excerpt' );
|
1441 |
$products = array();
|
1442 |
$i = 0;
|
1443 |
|
@@ -1456,7 +1433,7 @@ class WC_Order_Export_Data_Extractor {
|
|
1456 |
continue;
|
1457 |
}
|
1458 |
|
1459 |
-
$product = $
|
1460 |
$product = apply_filters( "woe_get_order_product", $product );
|
1461 |
|
1462 |
$item_meta = get_metadata( 'order_item', $item_id );
|
@@ -1510,203 +1487,9 @@ class WC_Order_Export_Data_Extractor {
|
|
1510 |
|
1511 |
$i ++;
|
1512 |
$row = array();
|
|
|
1513 |
foreach ( $labels->unique_keys() as $field ) {
|
1514 |
-
|
1515 |
-
substr( $field, 2 ), array( 'fields' => 'names' ) )
|
1516 |
-
) {
|
1517 |
-
$row[ $field ] = implode( ', ', $taxonomies );
|
1518 |
-
} else if ( $field == 'product_shipping_class' ) {
|
1519 |
-
$taxonomies = array();
|
1520 |
-
if ( ! empty( $item['variation_id'] ) )// try get from variation at first!
|
1521 |
-
{
|
1522 |
-
$taxonomies = wc_get_product_terms( $item['variation_id'], $field,
|
1523 |
-
array( 'fields' => 'names' ) );
|
1524 |
-
}
|
1525 |
-
if ( ! $taxonomies ) {
|
1526 |
-
$taxonomies = wc_get_product_terms( $item['product_id'], $field, array( 'fields' => 'names' ) );
|
1527 |
-
}
|
1528 |
-
//done
|
1529 |
-
$row[ $field ] = implode( ', ', $taxonomies );
|
1530 |
-
} elseif ( $field == 'line_total_plus_tax' ) {
|
1531 |
-
$row[ $field ] = $item_meta["_line_total"][0] + $item_meta["_line_tax"][0];
|
1532 |
-
} elseif ( $field == 'line_subtotal_tax' ) {
|
1533 |
-
$row[ $field ] = $item_meta["_line_subtotal_tax"][0];
|
1534 |
-
} elseif ( $field == 'name' ) {
|
1535 |
-
$row[ $field ] = $item["name"];
|
1536 |
-
} elseif ( $field == 'product_name' ) {
|
1537 |
-
$row[ $field ] = $product ? $product->get_name() : '';
|
1538 |
-
} elseif ( $field == 'product_name_main' ) {
|
1539 |
-
$row[ $field ] = $product ? $product->get_title() : '';
|
1540 |
-
} elseif ( $field == 'product_variation' ) {
|
1541 |
-
$row[ $field ] = self::get_product_variation( $item, $order, $item_id, $product );
|
1542 |
-
} elseif ( $field == 'seller' ) {
|
1543 |
-
$row[ $field ] = '';
|
1544 |
-
if ( $post ) {
|
1545 |
-
$user = get_userdata( $post->post_author );
|
1546 |
-
$row[ $field ] = ! empty( $user->display_name ) ? $user->display_name : '';
|
1547 |
-
}
|
1548 |
-
} elseif ( $field == 'post_content' ) {
|
1549 |
-
$row[ $field ] = $post ? $post->post_content : '';
|
1550 |
-
} elseif ( $field == 'post_excerpt' ) {
|
1551 |
-
$row[ $field ] = $post ? $post->post_excerpt : '';
|
1552 |
-
} elseif ( $field == 'embedded_product_image' ) {
|
1553 |
-
$row[ $field ] = "";
|
1554 |
-
|
1555 |
-
if ( $post && get_post_thumbnail_id( $post->ID ) ) {
|
1556 |
-
$attachment_id = get_post_thumbnail_id( $post->ID );
|
1557 |
-
} else {
|
1558 |
-
$attachment_id = get_option( 'woocommerce_placeholder_image', 0 );
|
1559 |
-
}
|
1560 |
-
|
1561 |
-
if ( is_array( $imagedata = wp_get_attachment_metadata( $attachment_id ) ) ) {
|
1562 |
-
$file = get_attached_file( $attachment_id );
|
1563 |
-
if ( ! empty( $imagedata['sizes']['woocommerce_thumbnail']['file'] ) ) {
|
1564 |
-
$thumbnail_base_name = $imagedata['sizes']['woocommerce_thumbnail']['file'];
|
1565 |
-
|
1566 |
-
if ( ( $thumbfile = str_replace( basename( $file ), $thumbnail_base_name, $file ) ) && file_exists( $thumbfile ) ) {
|
1567 |
-
$row[ $field ] = $thumbfile;
|
1568 |
-
}
|
1569 |
-
}
|
1570 |
-
}
|
1571 |
-
} elseif ( $field == 'type' ) {
|
1572 |
-
$row[ $field ] = '';
|
1573 |
-
if ( $product ) {
|
1574 |
-
$row[ $field ] = method_exists( $product,
|
1575 |
-
'get_type' ) ? $product->get_type() : $product->product_type;
|
1576 |
-
}
|
1577 |
-
} elseif ( $field == 'tags' ) {
|
1578 |
-
$terms = get_the_terms( $product_id, 'product_tag' );
|
1579 |
-
$row[ $field ] = array();
|
1580 |
-
if ( $terms ) {
|
1581 |
-
foreach ( $terms as $term ) {
|
1582 |
-
$row[ $field ][] = $term->name;
|
1583 |
-
}
|
1584 |
-
}
|
1585 |
-
$row[ $field ] = join( ",", $row[ $field ] );
|
1586 |
-
} elseif ( $field == 'category' ) {
|
1587 |
-
$terms = get_the_terms( $product_id, 'product_cat' );
|
1588 |
-
$row[ $field ] = array();
|
1589 |
-
if ( $terms ) {
|
1590 |
-
foreach ( $terms as $term ) {
|
1591 |
-
$row[ $field ][] = $term->name;
|
1592 |
-
}
|
1593 |
-
}
|
1594 |
-
$row[ $field ] = join( ",", $row[ $field ] );// hierarhy ???
|
1595 |
-
} elseif ( $field == 'line_no_tax' ) {
|
1596 |
-
$row[ $field ] = $item_meta["_line_total"][0];
|
1597 |
-
//item refund
|
1598 |
-
} elseif ( $field == 'line_total_refunded' ) {
|
1599 |
-
$row[ $field ] = $order->get_total_refunded_for_item( $item_id );
|
1600 |
-
} elseif ( $field == 'line_total_minus_refund' ) {
|
1601 |
-
$row[ $field ] = $item_meta["_line_total"][0] - $order->get_total_refunded_for_item( $item_id );
|
1602 |
-
} elseif ( $field == 'qty_minus_refund' ) {
|
1603 |
-
$row[ $field ] = $item_meta["_qty"][0] + $order->get_qty_refunded_for_item( $item_id ); // Yes we add negative! qty
|
1604 |
-
//tax refund
|
1605 |
-
} elseif ( $field == 'line_tax_refunded' ) {
|
1606 |
-
$row[ $field ] = self::get_order_item_taxes_refund( $order, $item_id );
|
1607 |
-
} elseif ( $field == 'line_tax_minus_refund' ) {
|
1608 |
-
$row[ $field ] = $item_meta["_line_tax"][0] - self::get_order_item_taxes_refund( $order, $item_id );
|
1609 |
-
} elseif ( $field == 'line_id' ) {
|
1610 |
-
$row[ $field ] = $i;
|
1611 |
-
} elseif ( $field == 'item_id' ) {
|
1612 |
-
$row[ $field ] = $item_id;
|
1613 |
-
} elseif ( $field == 'item_price' ) {
|
1614 |
-
$row[ $field ] = $order->get_item_total( $item, false, true ); // YES we have to calc item price
|
1615 |
-
} elseif ( $field == 'discount_amount' ) {
|
1616 |
-
if ( method_exists( $item, "get_subtotal" ) ) {
|
1617 |
-
$row[ $field ] = $item->get_subtotal() - $item->get_total();
|
1618 |
-
} else //2.6
|
1619 |
-
{
|
1620 |
-
$row[ $field ] = $item['line_subtotal'] - $item['line_total'];
|
1621 |
-
}
|
1622 |
-
} elseif ( $field == 'tax_rate' ) {
|
1623 |
-
if ( method_exists( $item, "get_subtotal" ) ) {
|
1624 |
-
$subtotal_amount = $item->get_subtotal();
|
1625 |
-
$subtotal_tax = $item->get_subtotal_tax();
|
1626 |
-
} else {
|
1627 |
-
$subtotal_amount = $item['line_subtotal'];
|
1628 |
-
$subtotal_tax = $item['line_subtotal_tax'];
|
1629 |
-
}
|
1630 |
-
$row[ $field ] = ( $subtotal_amount <> 0 ) ? round( 100 * $subtotal_tax / $subtotal_amount, apply_filters('woe_tax_rate_rounding_precision', 2) ) : 0;
|
1631 |
-
} elseif ( $field == 'product_url' ) {
|
1632 |
-
$row[ $field ] = get_permalink( $product_id );
|
1633 |
-
} elseif ( $field == 'sku' ) {
|
1634 |
-
$row[ $field ] = method_exists( $product,
|
1635 |
-
'get_' . $field ) ? $product->{'get_' . $field}() : get_post_meta( $product_id, '_' . $field,
|
1636 |
-
true );
|
1637 |
-
} elseif ( $field == 'download_url' ) {
|
1638 |
-
$row[ $field ] = '';
|
1639 |
-
if ( $product AND $product->is_downloadable() ) {
|
1640 |
-
$files = get_post_meta( $product->get_id(), '_downloadable_files', true );
|
1641 |
-
$links = array();
|
1642 |
-
if ( $files ) {
|
1643 |
-
foreach ( $files as $file ) {
|
1644 |
-
$links[] = $file['file'];
|
1645 |
-
}
|
1646 |
-
}
|
1647 |
-
$row[ $field ] = implode( "\n", $links );
|
1648 |
-
}
|
1649 |
-
} elseif ( $field == 'item_download_url' ) {
|
1650 |
-
$row[ $field ] = '';
|
1651 |
-
if ( $product AND $product->is_downloadable() ) {
|
1652 |
-
$files = $item->get_item_downloads();
|
1653 |
-
$links = array();
|
1654 |
-
if ( $files ) {
|
1655 |
-
foreach ( $files as $file ) {
|
1656 |
-
$links[] = $file['download_url'];
|
1657 |
-
}
|
1658 |
-
}
|
1659 |
-
$row[ $field ] = implode( "\n", $links );
|
1660 |
-
}
|
1661 |
-
} elseif ( $field == 'image_url' ) {
|
1662 |
-
// make full url, wp_get_attachment_image_src can return false
|
1663 |
-
$images_src = ( is_object( $product ) AND $product->get_image_id() ) ? wp_get_attachment_image_src( $product->get_image_id(),
|
1664 |
-
'full' ) : false;
|
1665 |
-
$row[ $field ] = is_array( $images_src ) ? current( $images_src ) : '';
|
1666 |
-
} elseif ( $field == 'full_category_names' ) {
|
1667 |
-
$row[ $field ] = self::get_product_category_full( $product_id );
|
1668 |
-
} elseif ( isset( $static_vals[ $field ] ) ) {
|
1669 |
-
$row[ $field ] = $static_vals[ $field ];
|
1670 |
-
} elseif ( isset( $item_meta[ $field ] ) ) { //meta from order
|
1671 |
-
$row[ $field ] = join( self::$export_itemmeta_values_separator, $item_meta[ $field ] );
|
1672 |
-
} elseif ( isset( $item_meta[ "_" . $field ] ) ) {// or hidden field
|
1673 |
-
$row[ $field ] = join( self::$export_itemmeta_values_separator, $item_meta[ "_" . $field ] );
|
1674 |
-
} elseif ( isset( $item['item_meta'][ $field ] ) ) { // meta from item line
|
1675 |
-
$row[ $field ] = join( self::$export_itemmeta_values_separator, $item['item_meta'][ $field ] );
|
1676 |
-
} elseif ( isset( $item['item_meta'][ "_" . $field ] ) ) { // or hidden field
|
1677 |
-
$row[ $field ] = join( self::$export_itemmeta_values_separator,
|
1678 |
-
$item['item_meta'][ "_" . $field ] );
|
1679 |
-
} else {
|
1680 |
-
$row[ $field ] = '';
|
1681 |
-
if ( ! empty( $item['variation_id'] ) ) {
|
1682 |
-
$row[ $field ] = get_post_meta( $item['variation_id'], $field, true );
|
1683 |
-
}
|
1684 |
-
if ( $row[ $field ] === '' ) // empty value ? try get custom!
|
1685 |
-
{
|
1686 |
-
$row[ $field ] = get_post_meta( $product_id, $field, true );
|
1687 |
-
}
|
1688 |
-
if ( $row[ $field ] === '' ) // empty value ?
|
1689 |
-
{
|
1690 |
-
$row[ $field ] = method_exists( $product,
|
1691 |
-
'get_' . $field ) ? $product->{'get_' . $field}() : get_post_meta( $product_id,
|
1692 |
-
'_' . $field, true );
|
1693 |
-
}
|
1694 |
-
if ( $row[ $field ] === '' AND empty( $item['variation_id'] ) ) // empty value ? try get attribute for !variaton
|
1695 |
-
{
|
1696 |
-
$row[ $field ] = $product ? $product->get_attribute( $field ) : '';
|
1697 |
-
}
|
1698 |
-
}
|
1699 |
-
|
1700 |
-
if ( $options['strip_tags_product_fields'] AND in_array( $field, $product_fields_with_tags ) ) {
|
1701 |
-
$row[ $field ] = strip_tags( $row[ $field ] );
|
1702 |
-
}
|
1703 |
-
|
1704 |
-
if ( isset( $row[ $field ] ) ) {
|
1705 |
-
$row[ $field ] = apply_filters( "woe_get_order_product_value_{$field}", $row[ $field ], $order,
|
1706 |
-
$item, $product, $item_meta );
|
1707 |
-
// $row[ $field ] = apply_filters( "woe_get_order_product_{$format}_value_{$field}", $row[ $field ],
|
1708 |
-
// $order, $item, $product, $item_meta );
|
1709 |
-
}
|
1710 |
}
|
1711 |
$row = apply_filters( 'woe_fetch_order_product', $row, $order, $item, $product, $item_meta );
|
1712 |
if ( $row ) {
|
@@ -1724,30 +1507,6 @@ class WC_Order_Export_Data_Extractor {
|
|
1724 |
*
|
1725 |
* @return string
|
1726 |
*/
|
1727 |
-
public static function get_product_category_full( $product_id ) {
|
1728 |
-
$full_names = array();
|
1729 |
-
if ( ! $product_id ) {
|
1730 |
-
return '';
|
1731 |
-
}
|
1732 |
-
$prod_terms = get_the_terms( $product_id, 'product_cat' );
|
1733 |
-
if ( ! $prod_terms ) {
|
1734 |
-
return '';
|
1735 |
-
}
|
1736 |
-
|
1737 |
-
foreach ( $prod_terms as $prod_term ) {
|
1738 |
-
$parts = array( $prod_term->name );
|
1739 |
-
$product_parent_categories_all_hierachy = get_ancestors( $prod_term->term_id, 'product_cat' );
|
1740 |
-
foreach ( $product_parent_categories_all_hierachy as $id ) {
|
1741 |
-
$parent = get_term( $id );
|
1742 |
-
$parts[] = $parent->name;
|
1743 |
-
}
|
1744 |
-
$full_names[] = join( self::$export_subcategories_separator, array_reverse( $parts ) );
|
1745 |
-
}
|
1746 |
-
|
1747 |
-
return join( self::$export_line_categories_separator, $full_names );
|
1748 |
-
}
|
1749 |
-
|
1750 |
-
|
1751 |
/**
|
1752 |
* @param $order WC_Order
|
1753 |
* @param $item_id
|
@@ -1777,68 +1536,16 @@ class WC_Order_Export_Data_Extractor {
|
|
1777 |
|
1778 |
// $extra_rows = array();
|
1779 |
$row = array();
|
1780 |
-
|
1781 |
-
// get order meta
|
1782 |
-
$order_meta = array();
|
1783 |
-
if ( $order_post_meta = get_post_meta( $order_id ) ) {
|
1784 |
-
foreach ( $order_post_meta as $meta_key => $meta_values ) {
|
1785 |
-
$order_meta[ $meta_key ] = join( self::$export_custom_fields_separator, $meta_values );
|
1786 |
-
}
|
1787 |
-
}
|
1788 |
-
|
1789 |
// take order
|
1790 |
self::$current_order = $order = new WC_Order( $order_id );
|
1791 |
|
1792 |
-
|
1793 |
-
foreach ( array( "billing_country", "billing_state", "shipping_country", "shipping_state" ) as $field_30 ) {
|
1794 |
-
$$field_30 = method_exists( $order,
|
1795 |
-
'get_' . $field_30 ) ? $order->{'get_' . $field_30}() : $order->$field_30;
|
1796 |
-
}
|
1797 |
-
|
1798 |
-
$parent_order_id = method_exists( $order,
|
1799 |
-
'get_parent_id' ) ? $order->get_parent_id() : $order->post->post_parent;
|
1800 |
-
$parent_order = $parent_order_id ? new WC_Order( $parent_order_id ) : false;
|
1801 |
-
$post = method_exists( $order, 'get_id' ) ? get_post( $order->get_id() ) : $order->post;
|
1802 |
-
|
1803 |
-
// correct meta for child orders
|
1804 |
-
if ( $parent_order_id ) {
|
1805 |
-
// overwrite child values for refunds
|
1806 |
-
$is_refund = ( $post->post_type == 'shop_order_refund' );
|
1807 |
-
$overwrite_child_order_meta = apply_filters( 'woe_overwrite_child_order_meta', $is_refund );
|
1808 |
-
|
1809 |
-
if ( $parent_order_meta = get_post_meta( $parent_order_id ) ) {
|
1810 |
-
foreach ( $parent_order_meta as $meta_key => $meta_values ) {
|
1811 |
-
if ( $overwrite_child_order_meta OR ! isset( $order_meta[ $meta_key ] ) ) {
|
1812 |
-
$order_meta[ $meta_key ] = join( self::$export_custom_fields_separator, $meta_values );
|
1813 |
-
}
|
1814 |
-
}
|
1815 |
-
}
|
1816 |
-
|
1817 |
-
//refund rewrites it
|
1818 |
-
if ( $overwrite_child_order_meta ) {
|
1819 |
-
foreach (
|
1820 |
-
array(
|
1821 |
-
"billing_country",
|
1822 |
-
"billing_state",
|
1823 |
-
"shipping_country",
|
1824 |
-
"shipping_state",
|
1825 |
-
) as $field_30
|
1826 |
-
) {
|
1827 |
-
$$field_30 = method_exists( $parent_order,
|
1828 |
-
'get_' . $field_30 ) ? $parent_order->{'get_' . $field_30}() : $parent_order->$field_30;
|
1829 |
-
}
|
1830 |
-
}
|
1831 |
-
//refund status
|
1832 |
-
if ( $is_refund ) {
|
1833 |
-
$order_status = 'refunded';
|
1834 |
-
}
|
1835 |
-
}
|
1836 |
|
1837 |
// we know parent!
|
1838 |
-
if ( ( $export['products'] || $options['include_products'] ) &&
|
1839 |
isset( $labels['order']->count_unique_products ) || isset( $labels['order']->total_weight_items ) ) {
|
1840 |
// no labels for products??
|
1841 |
-
$tmp_labels =
|
1842 |
//need qty?
|
1843 |
if ( isset( $labels['order']->total_weight_items ) || isset( $labels['order']->count_unique_products ) ) {
|
1844 |
if ( ! isset( $tmp_labels->qty ) ) {
|
@@ -1856,7 +1563,8 @@ class WC_Order_Export_Data_Extractor {
|
|
1856 |
$order,
|
1857 |
$tmp_labels,
|
1858 |
isset( $static_vals['products'] ) ? $static_vals['products'] : array(),
|
1859 |
-
$options
|
|
|
1860 |
);
|
1861 |
if ( $options['include_products'] AND empty( $data['products'] ) AND apply_filters( "woe_skip_order_without_products", false ) ) {
|
1862 |
return array();
|
@@ -1864,10 +1572,10 @@ class WC_Order_Export_Data_Extractor {
|
|
1864 |
} else {
|
1865 |
$data['products'] = array();
|
1866 |
}
|
1867 |
-
if ( ( $export['coupons'] OR isset( $labels['order']->coupons_used ) ) &&
|
1868 |
// get coupons from main order
|
1869 |
$data['coupons'] = self::fetch_order_coupons(
|
1870 |
-
$
|
1871 |
$labels['coupons'],
|
1872 |
isset( $static_vals['coupons'] ) ? $static_vals['coupons'] : array(),
|
1873 |
$options
|
@@ -1876,290 +1584,10 @@ class WC_Order_Export_Data_Extractor {
|
|
1876 |
$data['coupons'] = array();
|
1877 |
}
|
1878 |
|
1879 |
-
|
1880 |
-
$user = ! empty( $order_meta['_customer_user'] ) ? get_userdata( $order_meta['_customer_user'] ) : false;
|
1881 |
-
// setup missed fields for full addresses
|
1882 |
-
$optional_fields = array( '_billing_address_1', '_billing_address_2', '_billing_first_name', '_billing_last_name', '_shipping_address_1', '_shipping_address_2', '_shipping_first_name', '_shipping_last_name' );
|
1883 |
-
foreach ($optional_fields as $optional_field ) {
|
1884 |
-
if ( ! isset( $order_meta[ $optional_field ] ) ) {
|
1885 |
-
$order_meta[ $optional_field ] = '';
|
1886 |
-
}
|
1887 |
-
}
|
1888 |
-
|
1889 |
-
$order_meta = apply_filters( 'woe_fetch_order_meta', $order_meta, $order_id );
|
1890 |
-
|
1891 |
// fill as it must
|
1892 |
foreach ( $labels['order']->get_fetch_fields() as $field ) {
|
1893 |
-
|
1894 |
-
$key = substr( $field, 5 );
|
1895 |
-
$row[ $field ] = $user ? $user->get( $key ) : '';
|
1896 |
-
} elseif ( substr( $field, 0, 4 ) == "FEE_" ) {
|
1897 |
-
|
1898 |
-
$key = substr( $field, 4 );
|
1899 |
-
|
1900 |
-
$value = $wpdb->get_col( $wpdb->prepare(
|
1901 |
-
"SELECT
|
1902 |
-
itemmeta.meta_value
|
1903 |
-
FROM
|
1904 |
-
{$wpdb->prefix}woocommerce_order_items items
|
1905 |
-
INNER JOIN
|
1906 |
-
{$wpdb->prefix}woocommerce_order_itemmeta itemmeta
|
1907 |
-
ON
|
1908 |
-
items.order_item_id = itemmeta.order_item_id AND itemmeta.meta_key = '_fee_amount'
|
1909 |
-
WHERE
|
1910 |
-
items.order_id = %s AND items.order_item_type = 'fee' AND items.order_item_name = %s",
|
1911 |
-
$order_id,
|
1912 |
-
$key
|
1913 |
-
) );
|
1914 |
-
|
1915 |
-
$row[ $field ] = isset($value[0]) ? $value[0] : '';
|
1916 |
-
|
1917 |
-
} elseif ( substr( $field, 0, 9 ) == "SHIPPING_" ) {
|
1918 |
-
|
1919 |
-
$key = substr( $field, 9 );
|
1920 |
-
|
1921 |
-
$value = $wpdb->get_col( $wpdb->prepare(
|
1922 |
-
"SELECT
|
1923 |
-
itemmeta.meta_value
|
1924 |
-
FROM
|
1925 |
-
{$wpdb->prefix}woocommerce_order_items items
|
1926 |
-
INNER JOIN
|
1927 |
-
{$wpdb->prefix}woocommerce_order_itemmeta itemmeta
|
1928 |
-
ON
|
1929 |
-
items.order_item_id = itemmeta.order_item_id AND itemmeta.meta_key = 'cost'
|
1930 |
-
WHERE
|
1931 |
-
items.order_id = %s AND items.order_item_type = 'shipping' AND items.order_item_name = %s",
|
1932 |
-
$order_id,
|
1933 |
-
$key
|
1934 |
-
) );
|
1935 |
-
|
1936 |
-
$row[ $field ] = isset($value[0]) ? $value[0] : '';
|
1937 |
-
|
1938 |
-
} elseif ( substr( $field, 0, 4 ) == "TAX_" ) {
|
1939 |
-
|
1940 |
-
$key = substr( $field, 4 );
|
1941 |
-
|
1942 |
-
$value = $wpdb->get_col( $wpdb->prepare(
|
1943 |
-
"SELECT
|
1944 |
-
itemmeta.meta_value
|
1945 |
-
FROM
|
1946 |
-
{$wpdb->prefix}woocommerce_order_items items
|
1947 |
-
INNER JOIN
|
1948 |
-
{$wpdb->prefix}woocommerce_order_itemmeta itemmeta
|
1949 |
-
ON
|
1950 |
-
items.order_item_id = itemmeta.order_item_id AND itemmeta.meta_key = 'tax_amount'
|
1951 |
-
WHERE
|
1952 |
-
items.order_id = %s AND items.order_item_type = 'tax' AND items.order_item_name = %s",
|
1953 |
-
$order_id,
|
1954 |
-
$key
|
1955 |
-
) );
|
1956 |
-
|
1957 |
-
$row[ $field ] = isset($value[0]) ? $value[0] : '';
|
1958 |
-
|
1959 |
-
} elseif ( $field == 'order_id' ) {
|
1960 |
-
$row[ $field ] = $order_id;
|
1961 |
-
} elseif ( $field == 'order_date' ) {
|
1962 |
-
$row[ $field ] = ! method_exists( $order,
|
1963 |
-
"get_date_created" ) ? $order->order_date : ( $order->get_date_created() ? gmdate( 'Y-m-d H:i:s',
|
1964 |
-
$order->get_date_created()->getOffsetTimestamp() ) : '' );
|
1965 |
-
} elseif ( $field == 'modified_date' ) {
|
1966 |
-
$row[ $field ] = ! method_exists( $order,
|
1967 |
-
"get_date_modified" ) ? $order->modified_date : ( $order->get_date_modified() ? gmdate( 'Y-m-d H:i:s',
|
1968 |
-
$order->get_date_modified()->getOffsetTimestamp() ) : '' );
|
1969 |
-
} elseif ( $field == 'completed_date' ) {
|
1970 |
-
$row[ $field ] = ! method_exists( $order,
|
1971 |
-
"get_date_completed" ) ? $order->completed_date : ( $order->get_date_completed() ? gmdate( 'Y-m-d H:i:s',
|
1972 |
-
$order->get_date_completed()->getOffsetTimestamp() ) : '' );
|
1973 |
-
} elseif ( $field == 'paid_date' ) {
|
1974 |
-
$row[ $field ] = ! method_exists( $order,
|
1975 |
-
"get_date_paid" ) ? $order->paid_date : ( $order->get_date_paid() ? gmdate( 'Y-m-d H:i:s',
|
1976 |
-
$order->get_date_paid()->getOffsetTimestamp() ) : '' );
|
1977 |
-
} elseif ( $field == 'order_number' ) {
|
1978 |
-
$row[ $field ] = $parent_order ? $parent_order->get_order_number() : $order->get_order_number(); // use parent order number
|
1979 |
-
} elseif ( $field == 'order_subtotal' ) {
|
1980 |
-
$row[ $field ] = wc_format_decimal( $order->get_subtotal(), 2 );
|
1981 |
-
} elseif ( $field == 'order_subtotal_minus_discount' ) {
|
1982 |
-
$row[ $field ] = $order->get_subtotal() - $order->get_total_discount();
|
1983 |
-
} elseif ( $field == 'order_subtotal_refunded' ) {
|
1984 |
-
$row[ $field ] = wc_format_decimal( self::get_order_subtotal_refunded( $order ), 2 );
|
1985 |
-
} elseif ( $field == 'order_subtotal_minus_refund' ) {
|
1986 |
-
$row[ $field ] = wc_format_decimal( $order->get_subtotal() - self::get_order_subtotal_refunded( $order ),
|
1987 |
-
2 );
|
1988 |
-
//order total
|
1989 |
-
} elseif ( $field == 'order_total' ) {
|
1990 |
-
$row[ $field ] = $order->get_total();
|
1991 |
-
} elseif ( $field == 'order_total_no_tax' ) {
|
1992 |
-
$row[ $field ] = $order->get_total() - $order->get_total_tax();
|
1993 |
-
} elseif ( $field == 'order_refund' ) {
|
1994 |
-
$row[ $field ] = $order->get_total_refunded();
|
1995 |
-
} elseif ( $field == 'order_total_inc_refund' ) {
|
1996 |
-
$row[ $field ] = $order->get_total() - $order->get_total_refunded();
|
1997 |
-
//shipping
|
1998 |
-
} elseif ( $field == 'order_shipping' ) {
|
1999 |
-
$row[ $field ] = $order->get_shipping_total();
|
2000 |
-
} elseif ( $field == 'order_shipping_plus_tax' ) {
|
2001 |
-
$row[ $field ] = $order->get_shipping_total() + $order->get_shipping_tax();
|
2002 |
-
} elseif ( $field == 'order_shipping_refunded' ) {
|
2003 |
-
$row[ $field ] = $order->get_total_shipping_refunded();
|
2004 |
-
} elseif ( $field == 'order_shipping_minus_refund' ) {
|
2005 |
-
$row[ $field ] = $order->get_shipping_total() - $order->get_total_shipping_refunded();
|
2006 |
-
//shipping tax
|
2007 |
-
} elseif ( $field == 'order_shipping_tax_refunded' ) {
|
2008 |
-
$row[ $field ] = self::get_order_shipping_tax_refunded( $order_id );
|
2009 |
-
} elseif ( $field == 'order_shipping_tax_minus_refund' ) {
|
2010 |
-
$row[ $field ] = $order->get_shipping_tax() - self::get_order_shipping_tax_refunded( $order_id );
|
2011 |
-
//order tax
|
2012 |
-
} elseif ( $field == 'order_tax' ) {
|
2013 |
-
$row[ $field ] = wc_round_tax_total( $order->get_cart_tax() );
|
2014 |
-
} elseif ( $field == 'order_total_fee' ) {
|
2015 |
-
$row[ $field ] = array_sum( array_map( function ( $item ) {
|
2016 |
-
return $item->get_total();
|
2017 |
-
}, $order->get_fees() ) );
|
2018 |
-
} elseif ( $field == 'order_total_tax' ) {
|
2019 |
-
$row[ $field ] = wc_round_tax_total( $order->get_total_tax() );
|
2020 |
-
} elseif ( $field == 'order_total_tax_refunded' ) {
|
2021 |
-
$row[ $field ] = wc_round_tax_total( $order->get_total_tax_refunded() );
|
2022 |
-
} elseif ( $field == 'order_total_tax_minus_refund' ) {
|
2023 |
-
$row[ $field ] = wc_round_tax_total( $order->get_total_tax() - $order->get_total_tax_refunded() );
|
2024 |
-
} elseif ( $field == 'order_status' ) {
|
2025 |
-
$status = empty( $order_status ) ? $order->get_status() : $order_status;
|
2026 |
-
$status = 'wc-' === substr( $status, 0, 3 ) ? substr( $status, 3 ) : $status;
|
2027 |
-
$row[ $field ] = isset( self::$statuses[ 'wc-' . $status ] ) ? self::$statuses[ 'wc-' . $status ] : $status;
|
2028 |
-
} elseif ( $field == 'user_login' OR $field == 'user_email' OR $field == 'user_url' ) {
|
2029 |
-
$row[ $field ] = $user ? $user->$field : "";
|
2030 |
-
} elseif ( $field == 'user_role' ) {
|
2031 |
-
$roles = $wp_roles->roles;
|
2032 |
-
$row[ $field ] = ( isset( $user->roles[0] ) && isset( $roles[ $user->roles[0] ] ) ) ? $roles[ $user->roles[0] ]['name'] : ""; // take first role Name
|
2033 |
-
} elseif ( $field == 'customer_total_orders' ) {
|
2034 |
-
$row[ $field ] = ( isset( $user->ID ) ) ? wc_get_customer_order_count( $user->ID ) : 0;
|
2035 |
-
} elseif ( $field == 'customer_first_order_date' ) {
|
2036 |
-
$first_order = self::get_customer_order( $user, $order_meta, 'first' );
|
2037 |
-
$row[ $field ] = $first_order ? ( $first_order->get_date_created() ? gmdate( 'Y-m-d H:i:s',
|
2038 |
-
$first_order->get_date_created()->getOffsetTimestamp() ) : '' ) : '';
|
2039 |
-
} elseif ( $field == 'customer_last_order_date' ) {
|
2040 |
-
$last_order = self::get_customer_order( $user, $order_meta, 'last' );
|
2041 |
-
$row[ $field ] = $last_order? ( $last_order->get_date_created() ? gmdate( 'Y-m-d H:i:s',
|
2042 |
-
$last_order->get_date_created()->getOffsetTimestamp() ) : '' ) : '';
|
2043 |
-
} elseif ( $field == 'billing_address' ) {
|
2044 |
-
$row[ $field ] = join( ", ",
|
2045 |
-
array_filter( array( $order_meta["_billing_address_1"], $order_meta["_billing_address_2"] ) ) );
|
2046 |
-
} elseif ( $field == 'shipping_address' ) {
|
2047 |
-
$row[ $field ] = join( ", ",
|
2048 |
-
array_filter( array( $order_meta["_shipping_address_1"], $order_meta["_shipping_address_2"] ) ) );
|
2049 |
-
} elseif ( $field == 'billing_full_name' ) {
|
2050 |
-
$row[ $field ] = trim( $order_meta["_billing_first_name"] . ' ' . $order_meta["_billing_last_name"] );
|
2051 |
-
} elseif ( $field == 'shipping_full_name' ) {
|
2052 |
-
$row[ $field ] = trim( $order_meta["_shipping_first_name"] . ' ' . $order_meta["_shipping_last_name"] );
|
2053 |
-
} elseif ( $field == 'billing_country_full' ) {
|
2054 |
-
$row[ $field ] = isset( self::$countries[ $billing_country ] ) ? self::$countries[ $billing_country ] : $billing_country;
|
2055 |
-
} elseif ( $field == 'shipping_country_full' ) {
|
2056 |
-
$row[ $field ] = isset( self::$countries[ $shipping_country ] ) ? self::$countries[ $shipping_country ] : $shipping_country;
|
2057 |
-
} elseif ( $field == 'billing_state_full' ) {
|
2058 |
-
$country_states = WC()->countries->get_states( $billing_country );
|
2059 |
-
$row[ $field ] = isset( $country_states[ $billing_state ] ) ? html_entity_decode( $country_states[ $billing_state ] ) : $billing_state;
|
2060 |
-
} elseif ( $field == 'shipping_state_full' ) {
|
2061 |
-
$country_states = WC()->countries->get_states( $shipping_country );
|
2062 |
-
$row[ $field ] = isset( $country_states[ $shipping_state ] ) ? html_entity_decode( $country_states[ $shipping_state ] ) : $shipping_state;
|
2063 |
-
} elseif ( $field == 'billing_citystatezip' ) {
|
2064 |
-
$row[ $field ] = self::get_city_state_postcode_field_value( $order, 'billing' );
|
2065 |
-
} elseif ( $field == 'billing_citystatezip_us' ) {
|
2066 |
-
$row[ $field ] = self::get_city_state_postcode_field_value( $order, 'billing', true );
|
2067 |
-
} elseif ( $field == 'shipping_citystatezip' ) {
|
2068 |
-
$row[ $field ] = self::get_city_state_postcode_field_value( $order, 'shipping' );
|
2069 |
-
} elseif ( $field == 'shipping_citystatezip_us' ) {
|
2070 |
-
$row[ $field ] = self::get_city_state_postcode_field_value( $order, 'shipping', true );
|
2071 |
-
} elseif ( $field == 'products' OR $field == 'coupons' ) {
|
2072 |
-
if ( isset( $data[ $field ] ) ) {
|
2073 |
-
$row[ $field ] = $data[ $field ];
|
2074 |
-
}
|
2075 |
-
} elseif ( $field == 'shipping_method_title' ) {
|
2076 |
-
$row[ $field ] = $order->get_shipping_method();
|
2077 |
-
} elseif ( $field == 'shipping_method' OR $field == 'shipping_method_only') {
|
2078 |
-
$shipping_methods = $order->get_items( 'shipping' );
|
2079 |
-
$shipping_method = reset( $shipping_methods ); // take first entry
|
2080 |
-
if ( ! empty( $shipping_method ) ) {
|
2081 |
-
$row[ $field ] = $field == 'shipping_method_only' ? $shipping_method['method_id'] : $shipping_method['method_id'] . ':' . $shipping_method['instance_id'];
|
2082 |
-
}
|
2083 |
-
} elseif ( $field == 'coupons_used' ) {
|
2084 |
-
$row[ $field ] = count( $data['coupons'] );
|
2085 |
-
} elseif ( $field == 'total_weight_items' ) {
|
2086 |
-
$row[ $field ] = 0;
|
2087 |
-
foreach ( $data['products'] as $product ) {
|
2088 |
-
$row[ $field ] += (float) $product['qty'] * (float) $product['weight'];
|
2089 |
-
}
|
2090 |
-
} elseif ( $field == 'count_total_items' ) {
|
2091 |
-
$row[ $field ] = $order->get_item_count();
|
2092 |
-
} elseif ( $field == 'count_exported_items' ) {
|
2093 |
-
$row[ $field ] = 0; // count only exported!
|
2094 |
-
if ( $export['products'] ) {
|
2095 |
-
foreach ( $data['products'] as $product ) {
|
2096 |
-
$row[ $field ] += $product['qty'];
|
2097 |
-
}
|
2098 |
-
}
|
2099 |
-
} elseif ( $field == 'count_unique_products' ) { // speed! replace with own counter ?
|
2100 |
-
$row[ $field ] = count( $data['products'] );
|
2101 |
-
} elseif ( $field == 'customer_note' ) {
|
2102 |
-
$notes = array( $post->post_excerpt );
|
2103 |
-
if ( $options['export_refund_notes'] ) {
|
2104 |
-
$refunds = $order->get_refunds();
|
2105 |
-
foreach ( $refunds as $refund ) {
|
2106 |
-
// added get_reason for WC 3.0
|
2107 |
-
$notes[] = method_exists( $refund,
|
2108 |
-
'get_reason' ) ? $refund->get_reason() : $refund->get_refund_reason();
|
2109 |
-
}
|
2110 |
-
}
|
2111 |
-
$row[ $field ] = implode( "\n", array_filter( $notes ) );
|
2112 |
-
} elseif ( $field == 'first_refund_date' ) {
|
2113 |
-
$value = '';
|
2114 |
-
foreach ( $order->get_refunds() as $refund ) {
|
2115 |
-
$value = ! method_exists( $refund,
|
2116 |
-
"get_date_created" ) ? $refund->date : ( $refund->get_date_created() ? gmdate( 'Y-m-d H:i:s',
|
2117 |
-
$refund->get_date_created()->getOffsetTimestamp() ) : '' );
|
2118 |
-
break;// take only first
|
2119 |
-
}
|
2120 |
-
$row[ $field ] = $value;
|
2121 |
-
} elseif ( isset( $static_vals['order'][ $field ] ) ) {
|
2122 |
-
$row[ $field ] = $static_vals['order'][ $field ];
|
2123 |
-
} elseif ( $field == 'order_notes' ) {
|
2124 |
-
remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10 );
|
2125 |
-
$args = array(
|
2126 |
-
'post_id' => $order_id,
|
2127 |
-
'approve' => 'approve',
|
2128 |
-
'type' => 'order_note',
|
2129 |
-
);
|
2130 |
-
$notes = get_comments( $args );
|
2131 |
-
add_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
|
2132 |
-
$comments = array();
|
2133 |
-
if ( $notes ) {
|
2134 |
-
foreach ( $notes as $note ) {
|
2135 |
-
if ( ! empty( $options['export_all_comments'] ) || $note->comment_author !== __( 'WooCommerce',
|
2136 |
-
'woocommerce' ) ) { // skip system notes by default
|
2137 |
-
$comments[] = apply_filters( 'woe_get_order_notes', $note->comment_content, $note, $order );
|
2138 |
-
}
|
2139 |
-
}
|
2140 |
-
}
|
2141 |
-
$row[ $field ] = implode( "\n", $comments );
|
2142 |
-
} elseif ( $field == 'embedded_edit_order_link' ) {
|
2143 |
-
$row[ $field ] = sprintf(
|
2144 |
-
'<a href="%s" target="_blank">%s</a>',
|
2145 |
-
get_edit_post_link($order_id),
|
2146 |
-
__( 'Edit order', 'woo-order-export-lite' )
|
2147 |
-
);
|
2148 |
-
} elseif ( isset( $order_meta[ $field ] ) ) {
|
2149 |
-
$field_data = array();
|
2150 |
-
do_action( 'woocommerce_order_export_add_field_data', $field_data, $order_meta[ $field ], $field );
|
2151 |
-
if ( empty( $field_data ) ) {
|
2152 |
-
$field_data[ $field ] = $order_meta[ $field ];
|
2153 |
-
}
|
2154 |
-
$row = array_merge( $row, $field_data );
|
2155 |
-
} elseif ( isset( $order_meta[ "_" . $field ] ) ) { // or hidden field
|
2156 |
-
$row[ $field ] = $order_meta[ "_" . $field ];
|
2157 |
-
} else { // order_date...
|
2158 |
-
$row[ $field ] = method_exists( $order,
|
2159 |
-
'get_' . $field ) ? $order->{'get_' . $field}() : get_post_meta( $order_id, '_' . $field, true );
|
2160 |
-
//print_r($field."=".$label); echo "debug static!\n\n";
|
2161 |
-
}
|
2162 |
-
|
2163 |
//use empty value for missed field
|
2164 |
if ( $field != 'products' AND $field != 'coupons' ) {
|
2165 |
if ( ! isset( $row[ $field ] ) ) {
|
@@ -2169,17 +1597,16 @@ class WC_Order_Export_Data_Extractor {
|
|
2169 |
$row[ $field ] = json_encode( $row[ $field ] );
|
2170 |
}
|
2171 |
}
|
2172 |
-
|
2173 |
if ( isset( $row[ $field ] ) ) {
|
2174 |
$row[ $field ] = apply_filters( "woe_get_order_value_{$field}", $row[ $field ], $order, $field );
|
2175 |
} //if order field set
|
2176 |
}
|
2177 |
|
2178 |
//no labels - no data !
|
2179 |
-
if (
|
2180 |
$row['products'] = array();
|
2181 |
}
|
2182 |
-
if (
|
2183 |
$row['coupons'] = array();
|
2184 |
}
|
2185 |
|
@@ -2332,7 +1759,7 @@ class WC_Order_Export_Data_Extractor {
|
|
2332 |
return $shipping_methods;
|
2333 |
}
|
2334 |
|
2335 |
-
|
2336 |
global $wpdb;
|
2337 |
|
2338 |
if( isset($user->ID)) {
|
3 |
exit; // Exit if accessed directly
|
4 |
}
|
5 |
|
6 |
+
include_once 'class-wc-order-export-order-fields.php';
|
7 |
+
include_once 'class-wc-order-export-order-product-fields.php';
|
8 |
+
include_once 'class-wc-order-export-order-coupon-fields.php';
|
9 |
+
|
10 |
class WC_Order_Export_Data_Extractor {
|
11 |
static $statuses;
|
12 |
static $countries;
|
448 |
return false;
|
449 |
}
|
450 |
|
451 |
+
$sql = apply_filters( "woe_sql_get_product_ids", "SELECT DISTINCT p_id FROM
|
452 |
(SELECT order_items.order_item_id as order_item_id, MAX(CONVERT(orderitemmeta_product.meta_value ,UNSIGNED INTEGER)) as p_id FROM {$wpdb->prefix}woocommerce_order_items as order_items
|
453 |
$left_join_order_items_meta
|
454 |
WHERE order_item_type='line_item' $order_items_meta_where GROUP BY order_item_id
|
455 |
+
) AS temp", $settings );
|
456 |
if ( self::$track_sql_queries ) {
|
457 |
self::$sql_queries[] = $sql;
|
458 |
}
|
554 |
$attrs = self::get_product_taxonomies();
|
555 |
$names2fields = array_flip( $attrs );
|
556 |
$filters = self::parse_complex_pairs( $settings['product_taxonomies']);
|
557 |
+
$taxonomy_where = array();
|
558 |
//print_r($filters );die();
|
559 |
foreach ( $filters as $operator => $fields ) {
|
560 |
foreach ( $fields as $label => $values ) {
|
564 |
$label = esc_sql( $label );
|
565 |
|
566 |
if ($operator == 'NOT SET') {
|
567 |
+
$taxonomy_where[] = "NOT ( orderitemmeta_product.meta_key IN('_product_id') AND orderitemmeta_product.meta_value IN (SELECT object_id FROM {$wpdb->term_relationships} AS `{$field}_rel`
|
568 |
INNER JOIN {$wpdb->term_taxonomy} AS `{$field}_cat` ON `{$field}_cat`.term_taxonomy_id = `{$field}_rel`.term_taxonomy_id
|
569 |
WHERE `{$field}_cat`.taxonomy='$label' AND `{$field}_cat`.term_id IN (SELECT term_id FROM {$wpdb->terms} ) ))";
|
570 |
} elseif ($operator == 'IS SET') {
|
571 |
+
$taxonomy_where[] = "( orderitemmeta_product.meta_key IN('_product_id') AND orderitemmeta_product.meta_value IN (SELECT object_id FROM {$wpdb->term_relationships} AS `{$field}_rel`
|
572 |
INNER JOIN {$wpdb->term_taxonomy} AS `{$field}_cat` ON `{$field}_cat`.term_taxonomy_id = `{$field}_rel`.term_taxonomy_id
|
573 |
WHERE `{$field}_cat`.taxonomy='$label' AND `{$field}_cat`.term_id IN (SELECT term_id FROM {$wpdb->terms} ) ))";
|
574 |
} else {
|
575 |
+
$taxonomy_where[] = "( orderitemmeta_product.meta_key IN('_product_id') AND orderitemmeta_product.meta_value $operator (SELECT object_id FROM {$wpdb->term_relationships} AS `{$field}_rel`
|
576 |
INNER JOIN {$wpdb->term_taxonomy} AS `{$field}_cat` ON `{$field}_cat`.term_taxonomy_id = `{$field}_rel`.term_taxonomy_id
|
577 |
WHERE `{$field}_cat`.taxonomy='$label' AND `{$field}_cat`.term_id IN (SELECT term_id FROM {$wpdb->terms} WHERE name IN ($values) ) ))";
|
578 |
}
|
579 |
}
|
580 |
}
|
581 |
}
|
582 |
+
if( $taxonomy_where )
|
583 |
+
$taxonomy_where = "AND ( " . join( apply_filters( "woe_sql_taxonomies_where_operator", "AND" ), $taxonomy_where) ." )";
|
584 |
}
|
585 |
|
586 |
$product_category_where = "";
|
891 |
if ( ! in_array( $settings['sort'], WC_Order_Export_Engine::get_wp_posts_fields() ) ) {
|
892 |
$pos = "sort";
|
893 |
$left_join_order_meta[] = "LEFT JOIN {$wpdb->postmeta} AS ordermeta_cf_{$pos} " .
|
894 |
+
"ON ordermeta_cf_{$pos}.post_id = orders.ID AND ordermeta_cf_{$pos}.meta_key='{$sort_field}'";
|
895 |
}
|
896 |
}
|
897 |
|
898 |
if ( $settings['export_unmarked_orders'] ) {
|
899 |
$pos = "export_unmarked_orders";
|
900 |
$field = "woe_order_exported";
|
901 |
+
$left_join_order_meta[] = "LEFT JOIN {$wpdb->postmeta} AS ordermeta_cf_{$pos} ON ordermeta_cf_{$pos}.post_id = orders.ID AND ordermeta_cf_{$pos}.meta_key='$field'";
|
902 |
$order_meta_where [] = " ( ordermeta_cf_{$pos}.meta_value IS NULL ) ";
|
903 |
}
|
904 |
|
908 |
foreach ( $filters as $operator => $fields ) {
|
909 |
foreach ( $fields as $field => $values ) {
|
910 |
if ( $values ) {
|
911 |
+
$left_join_order_meta[] = "LEFT JOIN {$wpdb->postmeta} AS ordermeta_cf_{$pos} ON ordermeta_cf_{$pos}.post_id = orders.ID AND ordermeta_cf_{$pos}.meta_key='$field'";
|
912 |
if ( $operator == 'IN' OR $operator == 'NOT IN' ) {
|
913 |
$values = self::sql_subset( $values );
|
914 |
$order_meta_where [] = " ( ordermeta_cf_{$pos}.meta_value $operator ($values) ) ";
|
1060 |
}
|
1061 |
$order_types = join( ",", apply_filters( "woe_sql_order_types", $order_types ) );
|
1062 |
|
1063 |
+
$sql = apply_filters( "woe_sql_get_order_ids", "SELECT " . apply_filters( "woe_sql_get_order_ids_fields", "ID AS order_id" ) . " FROM {$wpdb->posts} AS orders
|
1064 |
{$left_join_order_meta}
|
1065 |
+
WHERE orders.post_type in ( $order_types) AND $order_sql $order_meta_where $order_items_where", $settings );
|
1066 |
|
1067 |
if ( self::$track_sql_queries ) {
|
1068 |
self::$sql_queries[] = $sql;
|
1379 |
global $wpdb;
|
1380 |
$coupons = array();
|
1381 |
foreach ( $order->get_items( 'coupon' ) as $item ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1382 |
$row = array();
|
1383 |
+
$coupon = new WC_Order_Export_Order_Coupon_Fields( $item, $labels, $static_vals );
|
1384 |
foreach ( $labels->unique_keys() as $field ) {
|
1385 |
+
$row[ $field ] = $coupon->get($field);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1386 |
|
1387 |
$row[ $field ] = apply_filters( "woe_get_order_coupon_value_{$field}", $row[ $field ], $order,
|
1388 |
$item );
|
1389 |
}
|
1390 |
+
$row = apply_filters( 'woe_fetch_order_coupon', $row, $item, $coupon->get_coupon_meta() );
|
1391 |
if ( $row ) {
|
1392 |
$coupons[] = $row;
|
1393 |
}
|
1399 |
|
1400 |
|
1401 |
/**
|
1402 |
+
* @param WC_Order $order
|
1403 |
+
* @param WC_Order_Export_Labels $labels
|
1404 |
+
* @param array $static_vals
|
1405 |
+
* @param array $options
|
1406 |
+
* @param WC_Order_Export_Order_Fields $woe_order
|
1407 |
*
|
1408 |
* @return array
|
1409 |
*/
|
1411 |
$order,
|
1412 |
$labels,
|
1413 |
$static_vals,
|
1414 |
+
$options,
|
1415 |
+
$woe_order
|
1416 |
) {
|
1417 |
$export_only_products = $options['include_products'];
|
|
|
1418 |
$products = array();
|
1419 |
$i = 0;
|
1420 |
|
1433 |
continue;
|
1434 |
}
|
1435 |
|
1436 |
+
$product = $item->get_product();
|
1437 |
$product = apply_filters( "woe_get_order_product", $product );
|
1438 |
|
1439 |
$item_meta = get_metadata( 'order_item', $item_id );
|
1487 |
|
1488 |
$i ++;
|
1489 |
$row = array();
|
1490 |
+
$woe_product = new WC_Order_Export_Order_Product_Fields( $item, $product, $order, $post, $i, $static_vals, $options, $woe_order );
|
1491 |
foreach ( $labels->unique_keys() as $field ) {
|
1492 |
+
$row[$field] = $woe_product->get($field);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1493 |
}
|
1494 |
$row = apply_filters( 'woe_fetch_order_product', $row, $order, $item, $product, $item_meta );
|
1495 |
if ( $row ) {
|
1507 |
*
|
1508 |
* @return string
|
1509 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1510 |
/**
|
1511 |
* @param $order WC_Order
|
1512 |
* @param $item_id
|
1536 |
|
1537 |
// $extra_rows = array();
|
1538 |
$row = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1539 |
// take order
|
1540 |
self::$current_order = $order = new WC_Order( $order_id );
|
1541 |
|
1542 |
+
$woe_order = new WC_Order_Export_Order_Fields( $order, $static_vals, $options, $export );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1543 |
|
1544 |
// we know parent!
|
1545 |
+
if ( ( $export['products'] || $options['include_products'] ) && $labels['products']->is_not_empty() ||
|
1546 |
isset( $labels['order']->count_unique_products ) || isset( $labels['order']->total_weight_items ) ) {
|
1547 |
// no labels for products??
|
1548 |
+
$tmp_labels = $labels['products']->is_not_empty() ? clone $labels['products'] : new WC_Order_Export_Labels();
|
1549 |
//need qty?
|
1550 |
if ( isset( $labels['order']->total_weight_items ) || isset( $labels['order']->count_unique_products ) ) {
|
1551 |
if ( ! isset( $tmp_labels->qty ) ) {
|
1563 |
$order,
|
1564 |
$tmp_labels,
|
1565 |
isset( $static_vals['products'] ) ? $static_vals['products'] : array(),
|
1566 |
+
$options,
|
1567 |
+
$woe_order
|
1568 |
);
|
1569 |
if ( $options['include_products'] AND empty( $data['products'] ) AND apply_filters( "woe_skip_order_without_products", false ) ) {
|
1570 |
return array();
|
1572 |
} else {
|
1573 |
$data['products'] = array();
|
1574 |
}
|
1575 |
+
if ( ( $export['coupons'] OR isset( $labels['order']->coupons_used ) ) && $labels['coupons']->is_not_empty() ) {
|
1576 |
// get coupons from main order
|
1577 |
$data['coupons'] = self::fetch_order_coupons(
|
1578 |
+
$woe_order->get_parent_order() ? $woe_order->get_parent_order() : $order,
|
1579 |
$labels['coupons'],
|
1580 |
isset( $static_vals['coupons'] ) ? $static_vals['coupons'] : array(),
|
1581 |
$options
|
1584 |
$data['coupons'] = array();
|
1585 |
}
|
1586 |
|
1587 |
+
$woe_order->set_data($data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1588 |
// fill as it must
|
1589 |
foreach ( $labels['order']->get_fetch_fields() as $field ) {
|
1590 |
+
$row = $woe_order->get($row, $field);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1591 |
//use empty value for missed field
|
1592 |
if ( $field != 'products' AND $field != 'coupons' ) {
|
1593 |
if ( ! isset( $row[ $field ] ) ) {
|
1597 |
$row[ $field ] = json_encode( $row[ $field ] );
|
1598 |
}
|
1599 |
}
|
|
|
1600 |
if ( isset( $row[ $field ] ) ) {
|
1601 |
$row[ $field ] = apply_filters( "woe_get_order_value_{$field}", $row[ $field ], $order, $field );
|
1602 |
} //if order field set
|
1603 |
}
|
1604 |
|
1605 |
//no labels - no data !
|
1606 |
+
if ( $labels['products']->is_not_empty() == false ) {
|
1607 |
$row['products'] = array();
|
1608 |
}
|
1609 |
+
if ( $labels['coupons']->is_not_empty() == false ) {
|
1610 |
$row['coupons'] = array();
|
1611 |
}
|
1612 |
|
1759 |
return $shipping_methods;
|
1760 |
}
|
1761 |
|
1762 |
+
public static function get_customer_order( $user, $order_meta, $first_or_last ) {
|
1763 |
global $wpdb;
|
1764 |
|
1765 |
if( isset($user->ID)) {
|
classes/core/class-wc-order-export-engine.php
CHANGED
@@ -317,11 +317,19 @@ class WC_Order_Export_Engine {
|
|
317 |
if ( ! isset( $settings['skip_empty_file'] ) ) {
|
318 |
$settings['skip_empty_file'] = true;
|
319 |
}
|
320 |
-
|
|
|
321 |
ob_start( array( 'WC_Order_Export_Engine', 'code_error_callback' ) );
|
322 |
$result = eval( $settings['custom_php_code'] );
|
323 |
ob_end_clean();
|
324 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
// This report works with products!
|
326 |
if ( $settings['summary_report_by_products'] ) {
|
327 |
$settings['order_fields']['products']['checked'] = 1;
|
@@ -368,10 +376,12 @@ class WC_Order_Export_Engine {
|
|
368 |
) {
|
369 |
global $wpdb;
|
370 |
|
371 |
-
self
|
|
|
|
|
|
|
372 |
$settings = self::validate_defaults( $settings );
|
373 |
self::$current_job_settings = $settings;
|
374 |
-
self::$current_job_build_mode = $make_mode;
|
375 |
self::$date_format = trim( $settings['date_format'] . ' ' . $settings['time_format'] );
|
376 |
//debug sql?
|
377 |
if ( $make_mode == 'preview' AND $settings['enable_debug'] ) {
|
@@ -383,10 +393,10 @@ class WC_Order_Export_Engine {
|
|
383 |
if ( $output_mode == 'browser' ) {
|
384 |
$filename = 'php://output';
|
385 |
} else {
|
386 |
-
$filename =
|
387 |
}
|
388 |
|
389 |
-
if ( $make_mode !== 'estimate' ) {
|
390 |
$formater = self::init_formater( $make_mode, $settings, $filename, $labels, $static_vals, $offset );
|
391 |
}
|
392 |
$format = strtolower( $settings['format'] );
|
@@ -402,7 +412,7 @@ class WC_Order_Export_Engine {
|
|
402 |
//get IDs
|
403 |
$sql = WC_Order_Export_Data_Extractor::sql_get_order_ids( $settings );
|
404 |
$settings = self::replace_sort_field( $settings );
|
405 |
-
if ( $make_mode == 'estimate' ) { //if estimate return total count
|
406 |
return $wpdb->get_var( str_replace( 'ID AS order_id', 'COUNT(ID) AS order_count', $sql ) );
|
407 |
} elseif ( $make_mode == 'preview' ) {
|
408 |
$sql .= apply_filters( "woe_sql_get_order_ids_order_by",
|
@@ -419,6 +429,7 @@ class WC_Order_Export_Engine {
|
|
419 |
self::$orders_for_export = $order_ids;
|
420 |
|
421 |
// prepare for XLS/CSV moved to plain formatter
|
|
|
422 |
|
423 |
// check it once
|
424 |
self::_check_products_and_coupons_fields( $settings, $export );
|
@@ -492,7 +503,7 @@ class WC_Order_Export_Engine {
|
|
492 |
self::$date_format = trim( $settings['date_format'] . ' ' . $settings['time_format'] );
|
493 |
self::$extractor_options = self::_install_options( $settings );
|
494 |
|
495 |
-
$filename =
|
496 |
|
497 |
$formater = self::init_formater( '', $settings, $filename, $labels, $static_vals, 0 );
|
498 |
// $format = strtolower( $settings['format'] );
|
@@ -524,6 +535,7 @@ class WC_Order_Export_Engine {
|
|
524 |
}
|
525 |
|
526 |
// prepare for XLS/CSV moved to plain formatter
|
|
|
527 |
|
528 |
// check it once
|
529 |
self::_check_products_and_coupons_fields( $settings, $export );
|
@@ -576,7 +588,7 @@ class WC_Order_Export_Engine {
|
|
576 |
}
|
577 |
|
578 |
public static function replace_sort_field( $settings ) {
|
579 |
-
$settings['sort'] = ! in_array( $settings['sort'], self::get_wp_posts_fields() ) ?
|
580 |
|
581 |
return $settings;
|
582 |
}
|
@@ -589,4 +601,8 @@ class WC_Order_Export_Engine {
|
|
589 |
'post_status',
|
590 |
);
|
591 |
}
|
|
|
|
|
|
|
|
|
592 |
}
|
317 |
if ( ! isset( $settings['skip_empty_file'] ) ) {
|
318 |
$settings['skip_empty_file'] = true;
|
319 |
}
|
320 |
+
// "preview" runs after "estimate, so we already activated code
|
321 |
+
if ( self::$current_job_build_mode!=='preview' AND $settings['custom_php'] ) {
|
322 |
ob_start( array( 'WC_Order_Export_Engine', 'code_error_callback' ) );
|
323 |
$result = eval( $settings['custom_php_code'] );
|
324 |
ob_end_clean();
|
325 |
}
|
326 |
+
if($settings['product_sku']) {
|
327 |
+
$sku_array = preg_split( "#,|\r?\n#", $settings['product_sku'], null, PREG_SPLIT_NO_EMPTY ) ;
|
328 |
+
foreach($sku_array as $sku) {
|
329 |
+
$sku = "_sku = " . $sku;
|
330 |
+
$settings['product_custom_fields'][] = $sku;
|
331 |
+
}
|
332 |
+
}
|
333 |
// This report works with products!
|
334 |
if ( $settings['summary_report_by_products'] ) {
|
335 |
$settings['order_fields']['products']['checked'] = 1;
|
376 |
) {
|
377 |
global $wpdb;
|
378 |
|
379 |
+
self::$current_job_build_mode = $make_mode;
|
380 |
+
if($make_mode != 'preview' AND $make_mode != 'estimate_preview') { // caller uses kill_buffers() already
|
381 |
+
self::kill_buffers();
|
382 |
+
}
|
383 |
$settings = self::validate_defaults( $settings );
|
384 |
self::$current_job_settings = $settings;
|
|
|
385 |
self::$date_format = trim( $settings['date_format'] . ' ' . $settings['time_format'] );
|
386 |
//debug sql?
|
387 |
if ( $make_mode == 'preview' AND $settings['enable_debug'] ) {
|
393 |
if ( $output_mode == 'browser' ) {
|
394 |
$filename = 'php://output';
|
395 |
} else {
|
396 |
+
$filename = self::get_filename($settings['format'], $filename);
|
397 |
}
|
398 |
|
399 |
+
if ( $make_mode !== 'estimate' AND $make_mode!='estimate_preview' ) {
|
400 |
$formater = self::init_formater( $make_mode, $settings, $filename, $labels, $static_vals, $offset );
|
401 |
}
|
402 |
$format = strtolower( $settings['format'] );
|
412 |
//get IDs
|
413 |
$sql = WC_Order_Export_Data_Extractor::sql_get_order_ids( $settings );
|
414 |
$settings = self::replace_sort_field( $settings );
|
415 |
+
if ( $make_mode == 'estimate' OR $make_mode =='estimate_preview' ) { //if estimate return total count
|
416 |
return $wpdb->get_var( str_replace( 'ID AS order_id', 'COUNT(ID) AS order_count', $sql ) );
|
417 |
} elseif ( $make_mode == 'preview' ) {
|
418 |
$sql .= apply_filters( "woe_sql_get_order_ids_order_by",
|
429 |
self::$orders_for_export = $order_ids;
|
430 |
|
431 |
// prepare for XLS/CSV moved to plain formatter
|
432 |
+
$formater->adjust_duplicated_fields_settings( $order_ids );
|
433 |
|
434 |
// check it once
|
435 |
self::_check_products_and_coupons_fields( $settings, $export );
|
503 |
self::$date_format = trim( $settings['date_format'] . ' ' . $settings['time_format'] );
|
504 |
self::$extractor_options = self::_install_options( $settings );
|
505 |
|
506 |
+
$filename = self::get_filename($settings['format'], $filename);
|
507 |
|
508 |
$formater = self::init_formater( '', $settings, $filename, $labels, $static_vals, 0 );
|
509 |
// $format = strtolower( $settings['format'] );
|
535 |
}
|
536 |
|
537 |
// prepare for XLS/CSV moved to plain formatter
|
538 |
+
$formater->adjust_duplicated_fields_settings( $order_ids );
|
539 |
|
540 |
// check it once
|
541 |
self::_check_products_and_coupons_fields( $settings, $export );
|
588 |
}
|
589 |
|
590 |
public static function replace_sort_field( $settings ) {
|
591 |
+
$settings['sort'] = ! in_array( $settings['sort'], self::get_wp_posts_fields() ) ? 'ordermeta_cf_sort.meta_value' : $settings['sort'];
|
592 |
|
593 |
return $settings;
|
594 |
}
|
601 |
'post_status',
|
602 |
);
|
603 |
}
|
604 |
+
public static function get_filename($prefix, $filename = '') {
|
605 |
+
$filename = ( ! empty( $filename ) ? $filename : self::tempnam( sys_get_temp_dir(), $prefix ) );
|
606 |
+
return apply_filters( 'woe_custom_export_get_filename', $filename );
|
607 |
+
}
|
608 |
}
|
classes/core/class-wc-order-export-order-coupon-fields.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class WC_Order_Export_Order_Coupon_Fields {
|
3 |
+
var $item;
|
4 |
+
var $coupon_meta;
|
5 |
+
var $static_vals;
|
6 |
+
|
7 |
+
public function __construct($item, $labels, $static_vals) {
|
8 |
+
global $wpdb;
|
9 |
+
|
10 |
+
$this->coupon_meta = array();
|
11 |
+
$get_coupon_meta = ( array_diff( $labels->get_keys(), array( 'code', 'discount_amount', 'discount_amount_tax', 'excerpt' ) ) );
|
12 |
+
$coupon_object = new WC_Coupon( $item['name'] );
|
13 |
+
|
14 |
+
if ( $get_coupon_meta ) {
|
15 |
+
$recs = $wpdb->get_results( $wpdb->prepare( "SELECT meta_value,meta_key FROM {$wpdb->postmeta} AS meta
|
16 |
+
JOIN {$wpdb->posts} AS posts ON posts.ID = meta.post_id
|
17 |
+
WHERE posts.post_title=%s", $item['name'] ) );
|
18 |
+
foreach ( $recs as $rec ) {
|
19 |
+
$this->coupon_meta[ $rec->meta_key ] = $rec->meta_value;
|
20 |
+
}
|
21 |
+
|
22 |
+
foreach ( $coupon_object->get_meta_data() as $meta) {
|
23 |
+
$this->coupon_meta[ $meta->key ] = $meta->value;
|
24 |
+
};
|
25 |
+
}
|
26 |
+
$this->item = $item;
|
27 |
+
$this->static_vals = $static_vals;
|
28 |
+
}
|
29 |
+
|
30 |
+
public function get($field) {
|
31 |
+
if ( isset( $this->item[ $field ] ) ) {
|
32 |
+
return $this->item[ $field ];
|
33 |
+
} elseif ( $field == 'code' ) {
|
34 |
+
return $this->item["name"];
|
35 |
+
} elseif ( $field == 'discount_amount_plus_tax' ) {
|
36 |
+
return $this->item["discount_amount"] + $this->item["discount_amount_tax"];
|
37 |
+
} elseif ( $field == 'excerpt' ) {
|
38 |
+
$post = get_page_by_title( $this->item['name'], OBJECT, 'shop_' . $this->item['type'] );
|
39 |
+
return $post ? $post->post_excerpt : '';
|
40 |
+
} elseif ( isset( $this->coupon_meta[ $field ] ) ) {
|
41 |
+
return $this->coupon_meta[ $field ];
|
42 |
+
} elseif ( isset( $this->static_vals[ $field ] ) ) {
|
43 |
+
return $this->static_vals[ $field ];
|
44 |
+
} else {
|
45 |
+
return '';
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
public function get_coupon_meta() {
|
50 |
+
return $this->coupon_meta;
|
51 |
+
}
|
52 |
+
}
|
classes/core/class-wc-order-export-order-fields.php
ADDED
@@ -0,0 +1,388 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class WC_Order_Export_Order_Fields {
|
3 |
+
var $order;
|
4 |
+
var $order_id;
|
5 |
+
var $parent_order;
|
6 |
+
var $order_status;
|
7 |
+
var $order_meta;
|
8 |
+
var $billing_country;
|
9 |
+
var $shipping_country;
|
10 |
+
var $billing_state;
|
11 |
+
var $shipping_state;
|
12 |
+
var $user;
|
13 |
+
var $data;
|
14 |
+
var $post;
|
15 |
+
var $static_vals;
|
16 |
+
var $options;
|
17 |
+
var $export;
|
18 |
+
|
19 |
+
public function __construct($order, $static_vals,
|
20 |
+
$options, $export) {
|
21 |
+
$this->static_vals = $static_vals;
|
22 |
+
$this->options = $options;
|
23 |
+
$this->export = $export;
|
24 |
+
$this->order = $order;
|
25 |
+
$this->order_id = $order->get_id();
|
26 |
+
|
27 |
+
|
28 |
+
// get order meta
|
29 |
+
$this->order_meta = array();
|
30 |
+
if ( $order_post_meta = get_post_meta( $this->order_id ) ) {
|
31 |
+
foreach ( $order_post_meta as $meta_key => $meta_values ) {
|
32 |
+
$this->order_meta[ $meta_key ] = join( WC_Order_Export_Data_Extractor::$export_custom_fields_separator, $meta_values );
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
|
37 |
+
|
38 |
+
// add fields for WC 3.0
|
39 |
+
foreach ( array( "billing_country", "billing_state", "shipping_country", "shipping_state" ) as $field_30 ) {
|
40 |
+
$this->$field_30 = method_exists( $this->order,
|
41 |
+
'get_' . $field_30 ) ? $this->order->{'get_' . $field_30}() : $this->order->$field_30;
|
42 |
+
}
|
43 |
+
|
44 |
+
$parent_order_id = method_exists( $this->order,
|
45 |
+
'get_parent_id' ) ? $this->order->get_parent_id() : $this->order->post->post_parent;
|
46 |
+
$this->parent_order = $parent_order_id ? new WC_Order( $parent_order_id ) : false;
|
47 |
+
$this->post = method_exists( $this->order, 'get_id' ) ? get_post( $this->order->get_id() ) : $this->order->post;
|
48 |
+
|
49 |
+
// correct meta for child orders
|
50 |
+
if ( $parent_order_id ) {
|
51 |
+
// overwrite child values for refunds
|
52 |
+
$is_refund = ( $this->post->post_type == 'shop_order_refund' );
|
53 |
+
$overwrite_child_order_meta = apply_filters( 'woe_overwrite_child_order_meta', $is_refund );
|
54 |
+
|
55 |
+
if ( $parent_order_meta = get_post_meta( $parent_order_id ) ) {
|
56 |
+
foreach ( $parent_order_meta as $meta_key => $meta_values ) {
|
57 |
+
if ( $overwrite_child_order_meta OR ! isset( $this->order_meta[ $meta_key ] ) ) {
|
58 |
+
$this->order_meta[ $meta_key ] = join( WC_Order_Export_Data_Extractor::$export_custom_fields_separator, $meta_values );
|
59 |
+
}
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
//refund rewrites it
|
64 |
+
if ( $overwrite_child_order_meta ) {
|
65 |
+
foreach (
|
66 |
+
array(
|
67 |
+
"billing_country",
|
68 |
+
"billing_state",
|
69 |
+
"shipping_country",
|
70 |
+
"shipping_state",
|
71 |
+
) as $field_30
|
72 |
+
) {
|
73 |
+
$this->$field_30 = method_exists( $this->parent_order,
|
74 |
+
'get_' . $field_30 ) ? $this->parent_order->{'get_' . $field_30}() : $this->parent_order->$field_30;
|
75 |
+
}
|
76 |
+
}
|
77 |
+
//refund status
|
78 |
+
if ( $is_refund ) {
|
79 |
+
$this->order_status = 'refunded';
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
// extra WP_User
|
84 |
+
$this->user = ! empty( $this->order_meta['_customer_user'] ) ? get_userdata( $this->order_meta['_customer_user'] ) : false;
|
85 |
+
// setup missed fields for full addresses
|
86 |
+
$optional_fields = array( '_billing_address_1', '_billing_address_2', '_billing_first_name', '_billing_last_name', '_shipping_address_1', '_shipping_address_2', '_shipping_first_name', '_shipping_last_name' );
|
87 |
+
foreach ($optional_fields as $optional_field ) {
|
88 |
+
if ( ! isset( $this->order_meta[ $optional_field ] ) ) {
|
89 |
+
$this->order_meta[ $optional_field ] = '';
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
$this->order_meta = apply_filters( 'woe_fetch_order_meta', $this->order_meta, $this->order_id );
|
94 |
+
}
|
95 |
+
|
96 |
+
public function set_data($data) {
|
97 |
+
$this->data = $data;
|
98 |
+
}
|
99 |
+
|
100 |
+
public function get_parent_order() {
|
101 |
+
return $this->parent_order;
|
102 |
+
}
|
103 |
+
|
104 |
+
public function get_one_field($field) {
|
105 |
+
$row = array( $field=>'');
|
106 |
+
$row = $this->get($row, $field);
|
107 |
+
return $row[$field];
|
108 |
+
}
|
109 |
+
|
110 |
+
public function get($row, $field) {
|
111 |
+
global $wpdb;
|
112 |
+
global $wp_roles;
|
113 |
+
|
114 |
+
if ( substr( $field, 0, 5 ) == "USER_" ) { //user field
|
115 |
+
$key = substr( $field, 5 );
|
116 |
+
$row[$field] = $this->user ? $this->user->get( $key ) : '';
|
117 |
+
} elseif ( substr( $field, 0, 4 ) == "FEE_" ) {
|
118 |
+
|
119 |
+
$key = substr( $field, 4 );
|
120 |
+
|
121 |
+
$value = $wpdb->get_col( $wpdb->prepare(
|
122 |
+
"SELECT
|
123 |
+
itemmeta.meta_value
|
124 |
+
FROM
|
125 |
+
{$wpdb->prefix}woocommerce_order_items items
|
126 |
+
INNER JOIN
|
127 |
+
{$wpdb->prefix}woocommerce_order_itemmeta itemmeta
|
128 |
+
ON
|
129 |
+
items.order_item_id = itemmeta.order_item_id AND itemmeta.meta_key = '_fee_amount'
|
130 |
+
WHERE
|
131 |
+
items.order_id = %s AND items.order_item_type = 'fee' AND items.order_item_name = %s",
|
132 |
+
$this->order_id,
|
133 |
+
$key
|
134 |
+
) );
|
135 |
+
|
136 |
+
$row[$field] = isset($value[0]) ? $value[0] : '';
|
137 |
+
|
138 |
+
} elseif ( substr( $field, 0, 9 ) == "SHIPPING_" ) {
|
139 |
+
|
140 |
+
$key = substr( $field, 9 );
|
141 |
+
|
142 |
+
$value = $wpdb->get_col( $wpdb->prepare(
|
143 |
+
"SELECT
|
144 |
+
itemmeta.meta_value
|
145 |
+
FROM
|
146 |
+
{$wpdb->prefix}woocommerce_order_items items
|
147 |
+
INNER JOIN
|
148 |
+
{$wpdb->prefix}woocommerce_order_itemmeta itemmeta
|
149 |
+
ON
|
150 |
+
items.order_item_id = itemmeta.order_item_id AND itemmeta.meta_key = 'cost'
|
151 |
+
WHERE
|
152 |
+
items.order_id = %s AND items.order_item_type = 'shipping' AND items.order_item_name = %s",
|
153 |
+
$this->order_id,
|
154 |
+
$key
|
155 |
+
) );
|
156 |
+
|
157 |
+
$row[$field] = isset($value[0]) ? $value[0] : '';
|
158 |
+
|
159 |
+
} elseif ( substr( $field, 0, 4 ) == "TAX_" ) {
|
160 |
+
|
161 |
+
$key = substr( $field, 4 );
|
162 |
+
|
163 |
+
$value = $wpdb->get_col( $wpdb->prepare(
|
164 |
+
"SELECT
|
165 |
+
itemmeta.meta_value
|
166 |
+
FROM
|
167 |
+
{$wpdb->prefix}woocommerce_order_items items
|
168 |
+
INNER JOIN
|
169 |
+
{$wpdb->prefix}woocommerce_order_itemmeta itemmeta
|
170 |
+
ON
|
171 |
+
items.order_item_id = itemmeta.order_item_id AND itemmeta.meta_key = 'tax_amount'
|
172 |
+
WHERE
|
173 |
+
items.order_id = %s AND items.order_item_type = 'tax' AND items.order_item_name = %s",
|
174 |
+
$this->order_id,
|
175 |
+
$key
|
176 |
+
) );
|
177 |
+
|
178 |
+
$row[$field] = isset($value[0]) ? $value[0] : '';
|
179 |
+
|
180 |
+
} elseif ( $field == 'order_id' ) {
|
181 |
+
$row[$field] = $this->order_id;
|
182 |
+
} elseif ( $field == 'order_date' ) {
|
183 |
+
$row[$field] = ! method_exists( $this->order,
|
184 |
+
"get_date_created" ) ? $this->order->order_date : ( $this->order->get_date_created() ? gmdate( 'Y-m-d H:i:s',
|
185 |
+
$this->order->get_date_created()->getOffsetTimestamp() ) : '' );
|
186 |
+
} elseif ( $field == 'modified_date' ) {
|
187 |
+
$row[$field] = ! method_exists( $this->order,
|
188 |
+
"get_date_modified" ) ? $this->order->modified_date : ( $this->order->get_date_modified() ? gmdate( 'Y-m-d H:i:s',
|
189 |
+
$this->order->get_date_modified()->getOffsetTimestamp() ) : '' );
|
190 |
+
} elseif ( $field == 'completed_date' ) {
|
191 |
+
$row[$field] = ! method_exists( $this->order,
|
192 |
+
"get_date_completed" ) ? $this->order->completed_date : ( $this->order->get_date_completed() ? gmdate( 'Y-m-d H:i:s',
|
193 |
+
$this->order->get_date_completed()->getOffsetTimestamp() ) : '' );
|
194 |
+
} elseif ( $field == 'paid_date' ) {
|
195 |
+
$row[$field] = ! method_exists( $this->order,
|
196 |
+
"get_date_paid" ) ? $this->order->paid_date : ( $this->order->get_date_paid() ? gmdate( 'Y-m-d H:i:s',
|
197 |
+
$this->order->get_date_paid()->getOffsetTimestamp() ) : '' );
|
198 |
+
} elseif ( $field == 'order_number' ) {
|
199 |
+
$row[$field] = $this->parent_order ? $this->parent_order->get_order_number() : $this->order->get_order_number(); // use parent order number
|
200 |
+
} elseif ( $field == 'order_subtotal' ) {
|
201 |
+
$row[$field] = wc_format_decimal( $this->order->get_subtotal(), 2 );
|
202 |
+
} elseif ( $field == 'order_subtotal_minus_discount' ) {
|
203 |
+
$row[$field] = $this->order->get_subtotal() - $this->order->get_total_discount();
|
204 |
+
} elseif ( $field == 'order_subtotal_refunded' ) {
|
205 |
+
$row[$field] = wc_format_decimal( WC_Order_Export_Data_Extractor::get_order_subtotal_refunded( $this->order ), 2 );
|
206 |
+
} elseif ( $field == 'order_subtotal_minus_refund' ) {
|
207 |
+
$row[$field] = wc_format_decimal( $this->order->get_subtotal() - WC_Order_Export_Data_Extractor::get_order_subtotal_refunded( $this->order ),
|
208 |
+
2 );
|
209 |
+
//order total
|
210 |
+
} elseif ( $field == 'order_total' ) {
|
211 |
+
$row[$field] = $this->order->get_total();
|
212 |
+
} elseif ( $field == 'order_total_no_tax' ) {
|
213 |
+
$row[$field] = $this->order->get_total() - $this->order->get_total_tax();
|
214 |
+
} elseif ( $field == 'order_refund' ) {
|
215 |
+
$row[$field] = $this->order->get_total_refunded();
|
216 |
+
} elseif ( $field == 'order_total_inc_refund' ) {
|
217 |
+
$row[$field] = $this->order->get_total() - $this->order->get_total_refunded();
|
218 |
+
//shipping
|
219 |
+
} elseif ( $field == 'order_shipping' ) {
|
220 |
+
$row[$field] = method_exists($this->order,"get_shipping_total") ? $this->order->get_shipping_total() : $this->order->get_total_shipping();
|
221 |
+
} elseif ( $field == 'order_shipping_plus_tax' ) {
|
222 |
+
$row[$field] = ( method_exists($this->order,"get_shipping_total") ? $this->order->get_shipping_total() : $this->order->get_total_shipping() ) + $this->order->get_shipping_tax();
|
223 |
+
} elseif ( $field == 'order_shipping_refunded' ) {
|
224 |
+
$row[$field] = $this->order->get_total_shipping_refunded();
|
225 |
+
} elseif ( $field == 'order_shipping_minus_refund' ) {
|
226 |
+
$row[$field] = ( method_exists($this->order,"get_shipping_total") ? $this->order->get_shipping_total() : $this->order->get_total_shipping() ) - $this->order->get_total_shipping_refunded();
|
227 |
+
//shipping tax
|
228 |
+
} elseif ( $field == 'order_shipping_tax_refunded' ) {
|
229 |
+
$row[$field] = WC_Order_Export_Data_Extractor::get_order_shipping_tax_refunded( $this->order_id );
|
230 |
+
} elseif ( $field == 'order_shipping_tax_minus_refund' ) {
|
231 |
+
$row[$field] = $this->order->get_shipping_tax() - WC_Order_Export_Data_Extractor::get_order_shipping_tax_refunded( $this->order_id );
|
232 |
+
//order tax
|
233 |
+
} elseif ( $field == 'order_tax' ) {
|
234 |
+
$row[$field] = wc_round_tax_total( $this->order->get_cart_tax() );
|
235 |
+
} elseif ( $field == 'order_total_fee' ) {
|
236 |
+
$row[ $field ] = array_sum( array_map( function ( $item ) {
|
237 |
+
return $item->get_total();
|
238 |
+
}, $this->order->get_fees() ) );
|
239 |
+
} elseif ( $field == 'order_total_tax' ) {
|
240 |
+
$row[$field] = wc_round_tax_total( $this->order->get_total_tax() );
|
241 |
+
} elseif ( $field == 'order_total_tax_refunded' ) {
|
242 |
+
$row[$field] = wc_round_tax_total( $this->order->get_total_tax_refunded() );
|
243 |
+
} elseif ( $field == 'order_total_tax_minus_refund' ) {
|
244 |
+
$row[$field] = wc_round_tax_total( $this->order->get_total_tax() - $this->order->get_total_tax_refunded() );
|
245 |
+
} elseif ( $field == 'order_status' ) {
|
246 |
+
$status = empty( $this->order_status ) ? $this->order->get_status() : $this->order_status;
|
247 |
+
$status = 'wc-' === substr( $status, 0, 3 ) ? substr( $status, 3 ) : $status;
|
248 |
+
$row[$field] = isset( WC_Order_Export_Data_Extractor::$statuses[ 'wc-' . $status ] ) ? WC_Order_Export_Data_Extractor::$statuses[ 'wc-' . $status ] : $status;
|
249 |
+
} elseif ( $field == 'user_login' OR $field == 'user_email' OR $field == 'user_url' ) {
|
250 |
+
$row[$field] = $this->user ? $this->user->$field : "";
|
251 |
+
} elseif ( $field == 'user_role' ) {
|
252 |
+
$roles = $wp_roles->roles;
|
253 |
+
$row[$field] = ( isset( $this->user->roles[0] ) && isset( $roles[ $this->user->roles[0] ] ) ) ? $roles[ $this->user->roles[0] ]['name'] : ""; // take first role Name
|
254 |
+
} elseif ( $field == 'customer_total_orders' ) {
|
255 |
+
$row[$field] = ( isset( $this->user->ID ) ) ? wc_get_customer_order_count( $this->user->ID ) : 0;
|
256 |
+
} elseif ( $field == 'customer_first_order_date' ) {
|
257 |
+
$first_order = WC_Order_Export_Data_Extractor::get_customer_order( $this->user, $this->order_meta, 'first' );
|
258 |
+
$row[$field] = $first_order ? ( $first_order->get_date_created() ? gmdate( 'Y-m-d H:i:s',
|
259 |
+
$first_order->get_date_created()->getOffsetTimestamp() ) : '' ) : '';
|
260 |
+
} elseif ( $field == 'customer_last_order_date' ) {
|
261 |
+
$last_order = WC_Order_Export_Data_Extractor::get_customer_order( $this->user, $this->order_meta, 'last' );
|
262 |
+
$row[$field] = $last_order? ( $last_order->get_date_created() ? gmdate( 'Y-m-d H:i:s',
|
263 |
+
$last_order->get_date_created()->getOffsetTimestamp() ) : '' ) : '';
|
264 |
+
} elseif ( $field == 'billing_address' ) {
|
265 |
+
$row[$field] = join( ", ",
|
266 |
+
array_filter( array( $this->order_meta["_billing_address_1"], $this->order_meta["_billing_address_2"] ) ) );
|
267 |
+
} elseif ( $field == 'shipping_address' ) {
|
268 |
+
$row[$field] = join( ", ",
|
269 |
+
array_filter( array( $this->order_meta["_shipping_address_1"], $this->order_meta["_shipping_address_2"] ) ) );
|
270 |
+
} elseif ( $field == 'billing_full_name' ) {
|
271 |
+
$row[$field] = trim( $this->order_meta["_billing_first_name"] . ' ' . $this->order_meta["_billing_last_name"] );
|
272 |
+
} elseif ( $field == 'shipping_full_name' ) {
|
273 |
+
$row[$field] = trim( $this->order_meta["_shipping_first_name"] . ' ' . $this->order_meta["_shipping_last_name"] );
|
274 |
+
} elseif ( $field == 'billing_country_full' ) {
|
275 |
+
$row[$field] = isset( WC_Order_Export_Data_Extractor::$countries[ $this->billing_country ] ) ? WC_Order_Export_Data_Extractor::$countries[ $this->billing_country ] : $this->billing_country;
|
276 |
+
} elseif ( $field == 'shipping_country_full' ) {
|
277 |
+
$row[$field] = isset( WC_Order_Export_Data_Extractor::$countries[ $this->shipping_country ] ) ? WC_Order_Export_Data_Extractor::$countries[ $this->shipping_country ] : $this->shipping_country;
|
278 |
+
} elseif ( $field == 'billing_state_full' ) {
|
279 |
+
$country_states = WC()->countries->get_states( $this->billing_country );
|
280 |
+
$row[$field] = isset( $country_states[ $this->billing_state ] ) ? html_entity_decode( $country_states[ $this->billing_state ] ) : $this->billing_state;
|
281 |
+
} elseif ( $field == 'shipping_state_full' ) {
|
282 |
+
$country_states = WC()->countries->get_states( $this->shipping_country );
|
283 |
+
$row[$field] = isset( $country_states[ $this->shipping_state ] ) ? html_entity_decode( $country_states[ $this->shipping_state ] ) : $this->shipping_state;
|
284 |
+
} elseif ( $field == 'billing_citystatezip' ) {
|
285 |
+
$row[$field] = WC_Order_Export_Data_Extractor::get_city_state_postcode_field_value( $this->order, 'billing' );
|
286 |
+
} elseif ( $field == 'billing_citystatezip_us' ) {
|
287 |
+
$row[$field] = WC_Order_Export_Data_Extractor::get_city_state_postcode_field_value( $this->order, 'billing', true );
|
288 |
+
} elseif ( $field == 'shipping_citystatezip' ) {
|
289 |
+
$row[$field] = WC_Order_Export_Data_Extractor::get_city_state_postcode_field_value( $this->order, 'shipping' );
|
290 |
+
} elseif ( $field == 'shipping_citystatezip_us' ) {
|
291 |
+
$row[$field] = WC_Order_Export_Data_Extractor::get_city_state_postcode_field_value( $this->order, 'shipping', true );
|
292 |
+
} elseif ( $field == 'products' OR $field == 'coupons' ) {
|
293 |
+
if ( isset( $this->data[ $field ] ) ) {
|
294 |
+
$row[$field] = $this->data[ $field ];
|
295 |
+
}
|
296 |
+
} elseif ( $field == 'shipping_method_title' ) {
|
297 |
+
$row[$field] = $this->order->get_shipping_method();
|
298 |
+
} elseif ( $field == 'shipping_method' OR $field == 'shipping_method_only') {
|
299 |
+
$shipping_methods = $this->order->get_items( 'shipping' );
|
300 |
+
$shipping_method = reset( $shipping_methods ); // take first entry
|
301 |
+
if ( ! empty( $shipping_method ) ) {
|
302 |
+
$row[$field] = $field == 'shipping_method_only' ? $shipping_method['method_id'] : $shipping_method['method_id'] . ':' . $shipping_method['instance_id'];
|
303 |
+
}
|
304 |
+
} elseif ( $field == 'coupons_used' ) {
|
305 |
+
$row[$field] = count( $this->data['coupons'] );
|
306 |
+
} elseif ( $field == 'total_weight_items' ) {
|
307 |
+
$total_weight = 0;
|
308 |
+
foreach ( $this->data['products'] as $product ) {
|
309 |
+
$total_weight += (float) $product['qty'] * (float) $product['weight'];
|
310 |
+
}
|
311 |
+
$row[$field] = $total_weight;
|
312 |
+
} elseif ( $field == 'count_total_items' ) {
|
313 |
+
$row[$field] = $this->order->get_item_count();
|
314 |
+
} elseif ( $field == 'count_exported_items' ) {
|
315 |
+
$count = 0; // count only exported!
|
316 |
+
if ( $this->export['products'] ) {
|
317 |
+
foreach ( $this->data['products'] as $product ) {
|
318 |
+
$count += $product['qty'];
|
319 |
+
}
|
320 |
+
$row[$field] = $count;
|
321 |
+
}
|
322 |
+
} elseif ( $field == 'count_unique_products' ) { // speed! replace with own counter ?
|
323 |
+
$row[$field] = count( $this->data['products'] );
|
324 |
+
} elseif ( $field == 'customer_note' ) {
|
325 |
+
$notes = array( $this->post->post_excerpt );
|
326 |
+
if ( $this->options['export_refund_notes'] ) {
|
327 |
+
$refunds = $this->order->get_refunds();
|
328 |
+
foreach ( $refunds as $refund ) {
|
329 |
+
// added get_reason for WC 3.0
|
330 |
+
$notes[] = method_exists( $refund,
|
331 |
+
'get_reason' ) ? $refund->get_reason() : $refund->get_refund_reason();
|
332 |
+
}
|
333 |
+
}
|
334 |
+
$row[$field] = implode( "\n", array_filter( $notes ) );
|
335 |
+
} elseif ( $field == 'first_refund_date' ) {
|
336 |
+
$value = '';
|
337 |
+
foreach ( $this->order->get_refunds() as $refund ) {
|
338 |
+
$value = ! method_exists( $refund,
|
339 |
+
"get_date_created" ) ? $refund->date : ( $refund->get_date_created() ? gmdate( 'Y-m-d H:i:s',
|
340 |
+
$refund->get_date_created()->getOffsetTimestamp() ) : '' );
|
341 |
+
break;// take only first
|
342 |
+
}
|
343 |
+
$row[$field] = $value;
|
344 |
+
} elseif ( isset( $this->static_vals['order'][ $field ] ) ) {
|
345 |
+
$row[$field] = $this->static_vals['order'][ $field ];
|
346 |
+
} elseif ( $field == 'order_notes' ) {
|
347 |
+
remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10 );
|
348 |
+
$args = array(
|
349 |
+
'post_id' => $this->order_id,
|
350 |
+
'approve' => 'approve',
|
351 |
+
'type' => 'order_note',
|
352 |
+
);
|
353 |
+
$notes = get_comments( $args );
|
354 |
+
add_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
|
355 |
+
$comments = array();
|
356 |
+
if ( $notes ) {
|
357 |
+
foreach ( $notes as $note ) {
|
358 |
+
if ( ! empty( $this->options['export_all_comments'] ) || $note->comment_author !== __( 'WooCommerce',
|
359 |
+
'woocommerce' ) ) { // skip system notes by default
|
360 |
+
$comments[] = apply_filters( 'woe_get_order_notes', $note->comment_content, $note, $this->order );
|
361 |
+
}
|
362 |
+
}
|
363 |
+
}
|
364 |
+
$row[$field] = implode( "\n", $comments );
|
365 |
+
} elseif ( $field == 'embedded_edit_order_link' ) {
|
366 |
+
$row[$field] = sprintf(
|
367 |
+
'<a href="%s" target="_blank">%s</a>',
|
368 |
+
get_edit_post_link($this->order_id),
|
369 |
+
__( 'Edit order', 'woo-order-export-lite' )
|
370 |
+
);
|
371 |
+
} elseif ( isset( $this->order_meta[ $field ] ) ) {
|
372 |
+
$field_data = array();
|
373 |
+
do_action( 'woocommerce_order_export_add_field_data', $field_data, $this->order_meta[ $field ], $field );
|
374 |
+
if ( empty( $field_data ) ) {
|
375 |
+
$field_data[ $field ] = $this->order_meta[ $field ];
|
376 |
+
}
|
377 |
+
$row = array_merge( $row, $field_data );
|
378 |
+
} elseif ( isset( $this->order_meta[ "_" . $field ] ) ) { // or hidden field
|
379 |
+
$row[$field] = $this->order_meta[ "_" . $field ];
|
380 |
+
} else { // order_date...
|
381 |
+
$row[$field] = method_exists( $this->order,
|
382 |
+
'get_' . $field ) ? $this->order->{'get_' . $field}() : get_post_meta( $this->order_id, '_' . $field, true );
|
383 |
+
//print_r($field."=".$label); echo "debug static!\n\n";
|
384 |
+
}
|
385 |
+
return $row;
|
386 |
+
|
387 |
+
}
|
388 |
+
}
|
classes/core/class-wc-order-export-order-product-fields.php
ADDED
@@ -0,0 +1,269 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class WC_Order_Export_Order_Product_Fields {
|
3 |
+
var $item_id;
|
4 |
+
var $item;
|
5 |
+
var $item_meta;
|
6 |
+
var $product;
|
7 |
+
var $product_id;
|
8 |
+
var $product_fields_with_tags;
|
9 |
+
var $order;
|
10 |
+
var $post;
|
11 |
+
var $line_id;
|
12 |
+
var $static_vals;
|
13 |
+
var $options;
|
14 |
+
var $woe_order;
|
15 |
+
|
16 |
+
public function __construct($item, $product,
|
17 |
+
$order, $post, $line_id, $static_vals, $options, $woe_order) {
|
18 |
+
$this->item = $item;
|
19 |
+
$this->product = $product;
|
20 |
+
$this->order = $order;
|
21 |
+
$this->post = $post;
|
22 |
+
$this->line_id = $line_id;
|
23 |
+
$this->static_vals = $static_vals;
|
24 |
+
$this->options = $options;
|
25 |
+
$this->woe_order = $woe_order;
|
26 |
+
$this->item_id = $item->get_id();
|
27 |
+
$this->item_meta = get_metadata( 'order_item', $this->item_id );
|
28 |
+
$this->product_id = $this->item->get_variation_id() ? $this->item->get_variation_id() : $this->item->get_product_id();
|
29 |
+
$this->product_fields_with_tags = array( 'product_variation', 'post_content', 'post_excerpt' );
|
30 |
+
}
|
31 |
+
|
32 |
+
private static function get_product_category_full( $product_id ) {
|
33 |
+
$full_names = array();
|
34 |
+
if ( ! $product_id ) {
|
35 |
+
return '';
|
36 |
+
}
|
37 |
+
$prod_terms = get_the_terms( $product_id, 'product_cat' );
|
38 |
+
if ( ! $prod_terms ) {
|
39 |
+
return '';
|
40 |
+
}
|
41 |
+
|
42 |
+
foreach ( $prod_terms as $prod_term ) {
|
43 |
+
$parts = array( $prod_term->name );
|
44 |
+
$product_parent_categories_all_hierachy = get_ancestors( $prod_term->term_id, 'product_cat' );
|
45 |
+
foreach ( $product_parent_categories_all_hierachy as $id ) {
|
46 |
+
$parent = get_term( $id );
|
47 |
+
$parts[] = $parent->name;
|
48 |
+
}
|
49 |
+
$full_names[] = join( WC_Order_Export_Data_Extractor::$export_subcategories_separator, array_reverse( $parts ) );
|
50 |
+
}
|
51 |
+
|
52 |
+
return join( WC_Order_Export_Data_Extractor::$export_line_categories_separator, $full_names );
|
53 |
+
}
|
54 |
+
|
55 |
+
public function get($field) {
|
56 |
+
if ( strpos( $field, '__' ) !== false && $taxonomies = wc_get_product_terms( $this->item['product_id'],
|
57 |
+
substr( $field, 2 ), array( 'fields' => 'names' ) )
|
58 |
+
) {
|
59 |
+
$field_value = implode( ', ', $taxonomies );
|
60 |
+
} else if ( $field == 'product_shipping_class' ) {
|
61 |
+
$taxonomies = array();
|
62 |
+
if ( ! empty( $this->item['variation_id'] ) )// try get from variation at first!
|
63 |
+
{
|
64 |
+
$taxonomies = wc_get_product_terms( $this->item['variation_id'], $field,
|
65 |
+
array( 'fields' => 'names' ) );
|
66 |
+
}
|
67 |
+
if ( ! $taxonomies ) {
|
68 |
+
$taxonomies = wc_get_product_terms( $this->item['product_id'], $field, array( 'fields' => 'names' ) );
|
69 |
+
}
|
70 |
+
//done
|
71 |
+
$field_value = implode( ', ', $taxonomies );
|
72 |
+
} elseif ( $field == 'line_total_plus_tax' ) {
|
73 |
+
$field_value = $this->item_meta["_line_total"][0] + $this->item_meta["_line_tax"][0];
|
74 |
+
} elseif ( $field == 'line_subtotal_tax' ) {
|
75 |
+
$field_value = $this->item_meta["_line_subtotal_tax"][0];
|
76 |
+
} elseif ( $field == 'name' ) {
|
77 |
+
$field_value = $this->item["name"];
|
78 |
+
} elseif ( $field == 'product_name' ) {
|
79 |
+
$field_value = $this->product ? $this->product->get_name() : '';
|
80 |
+
} elseif ( $field == 'product_name_main' ) {
|
81 |
+
$field_value = $this->product ? $this->product->get_title() : '';
|
82 |
+
} elseif ( $field == 'product_variation' ) {
|
83 |
+
$field_value = WC_Order_Export_Data_Extractor::get_product_variation( $this->item, $this->order, $this->item_id, $this->product );
|
84 |
+
} elseif ( $field == 'seller' ) {
|
85 |
+
$field_value = '';
|
86 |
+
if ( $this->post ) {
|
87 |
+
$user = get_userdata( $this->post->post_author );
|
88 |
+
$field_value = ! empty( $user->display_name ) ? $user->display_name : '';
|
89 |
+
}
|
90 |
+
} elseif ( $field == 'post_content' ) {
|
91 |
+
$field_value = $this->post ? $this->post->post_content : '';
|
92 |
+
} elseif ( $field == 'post_excerpt' ) {
|
93 |
+
$field_value = $this->post ? $this->post->post_excerpt : '';
|
94 |
+
} elseif ( $field == 'embedded_product_image' ) {
|
95 |
+
$field_value = "";
|
96 |
+
|
97 |
+
if ( $this->post && get_post_thumbnail_id( $this->post->ID ) ) {
|
98 |
+
$attachment_id = get_post_thumbnail_id( $this->post->ID );
|
99 |
+
} else {
|
100 |
+
$attachment_id = get_option( 'woocommerce_placeholder_image', 0 );
|
101 |
+
}
|
102 |
+
|
103 |
+
if ( is_array( $imagedata = wp_get_attachment_metadata( $attachment_id ) ) ) {
|
104 |
+
$file = get_attached_file( $attachment_id );
|
105 |
+
if ( ! empty( $imagedata['sizes']['woocommerce_thumbnail']['file'] ) ) {
|
106 |
+
$thumbnail_base_name = $imagedata['sizes']['woocommerce_thumbnail']['file'];
|
107 |
+
|
108 |
+
if ( ( $thumbfile = str_replace( basename( $file ), $thumbnail_base_name, $file ) ) && file_exists( $thumbfile ) ) {
|
109 |
+
$field_value = $thumbfile;
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
113 |
+
} elseif ( $field == 'type' ) {
|
114 |
+
$field_value = '';
|
115 |
+
if ( $this->product ) {
|
116 |
+
$field_value = method_exists( $this->product,
|
117 |
+
'get_type' ) ? $this->product->get_type() : $this->product->product_type;
|
118 |
+
}
|
119 |
+
} elseif ( $field == 'tags' ) {
|
120 |
+
$terms = get_the_terms( $this->product_id, 'product_tag' );
|
121 |
+
$arr = array();
|
122 |
+
if ( $terms ) {
|
123 |
+
foreach ( $terms as $term ) {
|
124 |
+
$arr[] = $term->name;
|
125 |
+
}
|
126 |
+
}
|
127 |
+
$field_value = join( ",", $arr );
|
128 |
+
} elseif ( $field == 'category' ) {
|
129 |
+
$terms = get_the_terms( $this->product_id, 'product_cat' );
|
130 |
+
$arr = array();
|
131 |
+
if ( $terms ) {
|
132 |
+
foreach ( $terms as $term ) {
|
133 |
+
$arr[] = $term->name;
|
134 |
+
}
|
135 |
+
}
|
136 |
+
$field_value = join( ",", $arr );// hierarhy ???
|
137 |
+
} elseif ( $field == 'line_no_tax' ) {
|
138 |
+
$field_value = $this->item_meta["_line_total"][0];
|
139 |
+
//item refund
|
140 |
+
} elseif ( $field == 'line_total_refunded' ) {
|
141 |
+
$field_value = $this->order->get_total_refunded_for_item( $this->item_id );
|
142 |
+
} elseif ( $field == 'line_total_minus_refund' ) {
|
143 |
+
$field_value = $this->item_meta["_line_total"][0] - $this->order->get_total_refunded_for_item( $this->item_id );
|
144 |
+
} elseif ( $field == 'qty_minus_refund' ) {
|
145 |
+
$field_value = $this->item_meta["_qty"][0] + $this->order->get_qty_refunded_for_item( $this->item_id ); // Yes we add negative! qty
|
146 |
+
//tax refund
|
147 |
+
} elseif ( $field == 'line_tax_refunded' ) {
|
148 |
+
$field_value = WC_Order_Export_Data_Extractor::get_order_item_taxes_refund( $this->order, $this->item_id );
|
149 |
+
} elseif ( $field == 'line_tax_minus_refund' ) {
|
150 |
+
$field_value = $this->item_meta["_line_tax"][0] - WC_Order_Export_Data_Extractor::get_order_item_taxes_refund( $this->order, $this->item_id );
|
151 |
+
} elseif ( $field == 'line_id' ) {
|
152 |
+
$field_value = $this->line_id;
|
153 |
+
} elseif ( $field == 'item_id' ) {
|
154 |
+
$field_value = $this->item_id;
|
155 |
+
} elseif ( $field == 'item_price' ) {
|
156 |
+
$field_value = $this->order->get_item_total( $this->item, false, true ); // YES we have to calc item price
|
157 |
+
} elseif ( $field == 'discount_amount' ) {
|
158 |
+
if ( method_exists( $this->item, "get_subtotal" ) ) {
|
159 |
+
$field_value = $this->item->get_subtotal() - $this->item->get_total();
|
160 |
+
} else //2.6
|
161 |
+
{
|
162 |
+
$field_value = $this->item['line_subtotal'] - $this->item['line_total'];
|
163 |
+
}
|
164 |
+
} elseif ( $field == 'tax_rate' ) {
|
165 |
+
if ( method_exists( $this->item, "get_subtotal" ) ) {
|
166 |
+
$subtotal_amount = $this->item->get_subtotal();
|
167 |
+
$subtotal_tax = $this->item->get_subtotal_tax();
|
168 |
+
} else {
|
169 |
+
$subtotal_amount = $this->item['line_subtotal'];
|
170 |
+
$subtotal_tax = $this->item['line_subtotal_tax'];
|
171 |
+
}
|
172 |
+
$field_value = ( $subtotal_amount <> 0 ) ? round( 100 * $subtotal_tax / $subtotal_amount, apply_filters('woe_tax_rate_rounding_precision', 2) ) : 0;
|
173 |
+
} elseif ( $field == 'product_url' ) {
|
174 |
+
$field_value = get_permalink( $this->product_id );
|
175 |
+
} elseif ( $field == 'sku' ) {
|
176 |
+
$field_value = method_exists( $this->product,
|
177 |
+
'get_' . $field ) ? $this->product->{'get_' . $field}() : get_post_meta( $this->product_id, '_' . $field,
|
178 |
+
true );
|
179 |
+
}
|
180 |
+
elseif ( $field == 'sku_parent' ) {
|
181 |
+
$field_value = '';
|
182 |
+
if( $this->product ) {
|
183 |
+
if( $this->product->is_type( 'variation' ) ) {
|
184 |
+
$parent= wc_get_product( $this->product->get_parent_id() );
|
185 |
+
$field_value = $parent->get_sku();
|
186 |
+
}
|
187 |
+
else
|
188 |
+
$field_value = $this->product->get_sku();
|
189 |
+
}
|
190 |
+
} elseif ( $field == 'download_url' ) {
|
191 |
+
$field_value = '';
|
192 |
+
if ( $this->product AND $this->product->is_downloadable() ) {
|
193 |
+
$files = get_post_meta( $this->product->get_id(), '_downloadable_files', true );
|
194 |
+
$links = array();
|
195 |
+
if ( $files ) {
|
196 |
+
foreach ( $files as $file ) {
|
197 |
+
$links[] = $file['file'];
|
198 |
+
}
|
199 |
+
}
|
200 |
+
$field_value = implode( "\n", $links );
|
201 |
+
}
|
202 |
+
} elseif ( $field == 'item_download_url' ) {
|
203 |
+
$field_value = '';
|
204 |
+
if ( $this->product AND $this->product->is_downloadable() ) {
|
205 |
+
$files = $this->item->get_item_downloads();
|
206 |
+
$links = array();
|
207 |
+
if ( $files ) {
|
208 |
+
foreach ( $files as $file ) {
|
209 |
+
$links[] = $file['download_url'];
|
210 |
+
}
|
211 |
+
}
|
212 |
+
$field_value = implode( "\n", $links );
|
213 |
+
}
|
214 |
+
} elseif ( $field == 'image_url' ) {
|
215 |
+
// make full url, wp_get_attachment_image_src can return false
|
216 |
+
$images_src = ( is_object( $this->product ) AND $this->product->get_image_id() ) ? wp_get_attachment_image_src( $this->product->get_image_id(),
|
217 |
+
'full' ) : false;
|
218 |
+
$field_value = is_array( $images_src ) ? current( $images_src ) : '';
|
219 |
+
} elseif ( $field == 'full_category_names' ) {
|
220 |
+
$field_value = self::get_product_category_full( $this->product_id );
|
221 |
+
} elseif ( isset( $this->static_vals[ $field ] ) ) {
|
222 |
+
$field_value = $this->static_vals[ $field ];
|
223 |
+
} elseif ( isset( $this->item_meta[ $field ] ) ) { //meta from order
|
224 |
+
$field_value = join( WC_Order_Export_Data_Extractor::$export_itemmeta_values_separator, $this->item_meta[ $field ] );
|
225 |
+
} elseif ( isset( $this->item_meta[ "_" . $field ] ) ) {// or hidden field
|
226 |
+
$field_value = join( WC_Order_Export_Data_Extractor::$export_itemmeta_values_separator, $this->item_meta[ "_" . $field ] );
|
227 |
+
} elseif ( isset( $this->item['item_meta'][ $field ] ) ) { // meta from item line
|
228 |
+
$field_value = join( WC_Order_Export_Data_Extractor::$export_itemmeta_values_separator, $this->item['item_meta'][ $field ] );
|
229 |
+
} elseif ( isset( $this->item['item_meta'][ "_" . $field ] ) ) { // or hidden field
|
230 |
+
$field_value = join( WC_Order_Export_Data_Extractor::$export_itemmeta_values_separator,
|
231 |
+
$this->item['item_meta'][ "_" . $field ] );
|
232 |
+
}
|
233 |
+
else {
|
234 |
+
$field_value = '';
|
235 |
+
if ( ! empty( $this->item['variation_id'] ) ) {
|
236 |
+
$field_value = get_post_meta( $this->item['variation_id'], $field, true );
|
237 |
+
}
|
238 |
+
if ( $field_value === '' ) // empty value ?
|
239 |
+
{
|
240 |
+
$field_value = method_exists( $this->product,
|
241 |
+
'get_' . $field ) ? $this->product->{'get_' . $field}() : get_post_meta( $this->product_id,
|
242 |
+
'_' . $field, true );
|
243 |
+
}
|
244 |
+
if ( $field_value === '' AND empty( $this->item['variation_id'] ) ) // empty value ? try get attribute for !variaton
|
245 |
+
{
|
246 |
+
$field_value = $this->product ? $this->product->get_attribute( $field ) : '';
|
247 |
+
}
|
248 |
+
if ( $field_value === '' ) // empty value still ? try get custom!
|
249 |
+
{
|
250 |
+
$field_value = get_post_meta( $this->product_id, $field, true );
|
251 |
+
// read order fields finally? TODO: check if it's order field?
|
252 |
+
if($field_value === '' AND isset($this->woe_order)) {
|
253 |
+
$field_value = $this->woe_order->get_one_field($field);
|
254 |
+
}
|
255 |
+
}
|
256 |
+
}
|
257 |
+
|
258 |
+
if ( $this->options['strip_tags_product_fields'] AND in_array( $field, $this->product_fields_with_tags ) ) {
|
259 |
+
$field_value = strip_tags( $field_value );
|
260 |
+
}
|
261 |
+
if ( isset( $field_value ) ) {
|
262 |
+
$field_value = apply_filters( "woe_get_order_product_value_{$field}", $field_value, $this->order,
|
263 |
+
$this->item, $this->product, $this->item_meta );
|
264 |
+
// $row[ $field ] = apply_filters( "woe_get_order_product_{$format}_value_{$field}", $row[ $field ],
|
265 |
+
// $order, $item, $product, $item_meta );
|
266 |
+
}
|
267 |
+
return $field_value;
|
268 |
+
}
|
269 |
+
}
|
classes/formats/abstract-class-woe-formatter-plain-format.php
CHANGED
@@ -42,6 +42,14 @@ abstract class WOE_Formatter_Plain_Format extends WOE_Formatter {
|
|
42 |
|
43 |
$this->encoding = isset( $this->settings['encoding'] ) ? $this->settings['encoding'] : '';
|
44 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
public function output( $rec ) {
|
47 |
//don't output orders in summary mode!
|
@@ -108,7 +116,6 @@ abstract class WOE_Formatter_Plain_Format extends WOE_Formatter {
|
|
108 |
$new_rows = array( $rec );
|
109 |
}
|
110 |
|
111 |
-
|
112 |
foreach ( $new_rows as $index => &$row ) {
|
113 |
if ( isset( $row['products'] ) ) {
|
114 |
unset( $row['products'] );
|
@@ -259,14 +266,15 @@ abstract class WOE_Formatter_Plain_Format extends WOE_Formatter {
|
|
259 |
foreach ( self::get_array_from_array( $row, 'products' ) as $item_id => $item ) {
|
260 |
$product_item = new WC_Order_Item_Product( $item_id );
|
261 |
$product = $product_item->get_product();
|
262 |
-
|
263 |
-
continue;
|
264 |
-
}
|
265 |
if ( ! $order ) {
|
266 |
$order = new WC_Order( $product_item->get_order_id() );
|
267 |
}
|
268 |
-
|
269 |
-
|
|
|
|
|
|
|
270 |
$key = apply_filters( "woe_summary_products_adjust_key", $key, $product, $product_item, $order );
|
271 |
|
272 |
//add new product
|
@@ -448,6 +456,31 @@ abstract class WOE_Formatter_Plain_Format extends WOE_Formatter {
|
|
448 |
if ( isset( $_SESSION['woe_summary_customers'][ $key ]['summary_report_total_count'] ) ) {
|
449 |
$_SESSION['woe_summary_customers'][ $key ]['summary_report_total_count']++;
|
450 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
451 |
|
452 |
if ( isset( $_SESSION['woe_summary_customers'][ $key ]['summary_report_total_amount'] ) ) {
|
453 |
$_SESSION['woe_summary_customers'][ $key ]['summary_report_total_amount'] += wc_round_tax_total( $order->get_total() );
|
@@ -457,6 +490,14 @@ abstract class WOE_Formatter_Plain_Format extends WOE_Formatter {
|
|
457 |
$_SESSION['woe_summary_customers'][ $key ]['summary_report_total_amount_paid'] += $order->is_paid() ? wc_round_tax_total( $order->get_total() ) : 0;
|
458 |
}
|
459 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
460 |
if ( isset( $_SESSION['woe_summary_customers'][ $key ]['summary_report_total_refund_count'] ) ) {
|
461 |
$_SESSION['woe_summary_customers'][ $key ]['summary_report_total_refund_count'] += $order->get_status() == 'wc-refunded' ? 1 : 0;
|
462 |
}
|
42 |
|
43 |
$this->encoding = isset( $this->settings['encoding'] ) ? $this->settings['encoding'] : '';
|
44 |
}
|
45 |
+
|
46 |
+
// calculate max columns based on order items
|
47 |
+
public function adjust_duplicated_fields_settings( $order_ids ){
|
48 |
+
if( $this->duplicate_settings['products']['repeat'] == 'columns' AND $this->duplicate_settings['products']['max_cols'] == 0 )
|
49 |
+
$this->duplicate_settings['products']['max_cols'] = WC_Order_Export_Data_Extractor::get_max_order_items( "line_item", $order_ids );
|
50 |
+
if( $this->duplicate_settings['coupons']['repeat'] == 'columns' AND $this->duplicate_settings['coupons']['max_cols'] == 0 )
|
51 |
+
$this->duplicate_settings['coupons']['max_cols'] = WC_Order_Export_Data_Extractor::get_max_order_items( "coupon", $order_ids );
|
52 |
+
}
|
53 |
|
54 |
public function output( $rec ) {
|
55 |
//don't output orders in summary mode!
|
116 |
$new_rows = array( $rec );
|
117 |
}
|
118 |
|
|
|
119 |
foreach ( $new_rows as $index => &$row ) {
|
120 |
if ( isset( $row['products'] ) ) {
|
121 |
unset( $row['products'] );
|
266 |
foreach ( self::get_array_from_array( $row, 'products' ) as $item_id => $item ) {
|
267 |
$product_item = new WC_Order_Item_Product( $item_id );
|
268 |
$product = $product_item->get_product();
|
269 |
+
$item_meta = get_metadata( 'order_item', $item_id );
|
|
|
|
|
270 |
if ( ! $order ) {
|
271 |
$order = new WC_Order( $product_item->get_order_id() );
|
272 |
}
|
273 |
+
|
274 |
+
if( $product )
|
275 |
+
$key = $product->get_id();
|
276 |
+
else
|
277 |
+
$key = $item_meta['_variation_id'][0] ? $item_meta['_variation_id'][0] : $item_meta['_product_id'][0];
|
278 |
$key = apply_filters( "woe_summary_products_adjust_key", $key, $product, $product_item, $order );
|
279 |
|
280 |
//add new product
|
456 |
if ( isset( $_SESSION['woe_summary_customers'][ $key ]['summary_report_total_count'] ) ) {
|
457 |
$_SESSION['woe_summary_customers'][ $key ]['summary_report_total_count']++;
|
458 |
}
|
459 |
+
|
460 |
+
if ( isset( $_SESSION['woe_summary_customers'][ $key ]['summary_report_total_count_items'] ) ) {
|
461 |
+
$_SESSION['woe_summary_customers'][ $key ]['summary_report_total_count_items'] += $order->get_item_count();
|
462 |
+
}
|
463 |
+
|
464 |
+
if ( isset( $_SESSION['woe_summary_customers'][ $key ]['summary_report_total_count_items_exported'] ) ) {
|
465 |
+
if( empty( WC_Order_Export_Engine::$extractor_options['include_products']) ) {
|
466 |
+
$_SESSION['woe_summary_customers'][ $key ]['summary_report_total_count_items_exported'] += $order->get_item_count(); // can add all items
|
467 |
+
} else {
|
468 |
+
$export_only_products = WC_Order_Export_Engine::$extractor_options['include_products'];
|
469 |
+
$exported_items = 0;
|
470 |
+
foreach ( $order->get_items( 'line_item') as $item ) {
|
471 |
+
if ( $export_only_products AND
|
472 |
+
! in_array( $item['product_id'], $export_only_products ) AND // not product
|
473 |
+
( ! $item['variation_id'] OR ! in_array( $item['variation_id'],
|
474 |
+
$export_only_products ) ) // not variation
|
475 |
+
) {
|
476 |
+
continue;
|
477 |
+
}
|
478 |
+
//OK, item was exported
|
479 |
+
$exported_items += $item->get_quantity();
|
480 |
+
}
|
481 |
+
$_SESSION['woe_summary_customers'][ $key ]['summary_report_total_count_items_exported'] += $exported_items;
|
482 |
+
}
|
483 |
+
}
|
484 |
|
485 |
if ( isset( $_SESSION['woe_summary_customers'][ $key ]['summary_report_total_amount'] ) ) {
|
486 |
$_SESSION['woe_summary_customers'][ $key ]['summary_report_total_amount'] += wc_round_tax_total( $order->get_total() );
|
490 |
$_SESSION['woe_summary_customers'][ $key ]['summary_report_total_amount_paid'] += $order->is_paid() ? wc_round_tax_total( $order->get_total() ) : 0;
|
491 |
}
|
492 |
|
493 |
+
if ( isset( $_SESSION['woe_summary_customers'][ $key ]['summary_report_total_shipping'] ) ) {
|
494 |
+
$_SESSION['woe_summary_customers'][ $key ]['summary_report_total_shipping'] += wc_round_tax_total( $order->get_shipping_total() );
|
495 |
+
}
|
496 |
+
|
497 |
+
if ( isset( $_SESSION['woe_summary_customers'][ $key ]['summary_report_total_discount'] ) ) {
|
498 |
+
$_SESSION['woe_summary_customers'][ $key ]['summary_report_total_discount'] += wc_round_tax_total( $order->get_discount_total() );
|
499 |
+
}
|
500 |
+
|
501 |
if ( isset( $_SESSION['woe_summary_customers'][ $key ]['summary_report_total_refund_count'] ) ) {
|
502 |
$_SESSION['woe_summary_customers'][ $key ]['summary_report_total_refund_count'] += $order->get_status() == 'wc-refunded' ? 1 : 0;
|
503 |
}
|
classes/formats/abstract-class-woe-formatter.php
CHANGED
@@ -211,4 +211,8 @@ abstract class WOE_Formatter {
|
|
211 |
protected static function get_array_from_array( $array, $key ) {
|
212 |
return isset( $array[ $key ] ) && is_array( $array[ $key ] ) ? $array[ $key ] : array();
|
213 |
}
|
|
|
|
|
|
|
|
|
214 |
}
|
211 |
protected static function get_array_from_array( $array, $key ) {
|
212 |
return isset( $array[ $key ] ) && is_array( $array[ $key ] ) ? $array[ $key ] : array();
|
213 |
}
|
214 |
+
|
215 |
+
//for plain formats only
|
216 |
+
public function adjust_duplicated_fields_settings( $order_ids ){
|
217 |
+
}
|
218 |
}
|
classes/formats/class-woe-formatter-html.php
CHANGED
@@ -29,6 +29,11 @@ class WOE_Formatter_Html extends WOE_Formatter_Plain_Format {
|
|
29 |
parent::__construct( $mode, $filename, $settings, $format, $labels, $field_formats, $date_format, $offset );
|
30 |
|
31 |
$this->css = $this->get_prepared_css();
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
|
34 |
public function start( $data = '' ) {
|
@@ -81,6 +86,18 @@ class WOE_Formatter_Html extends WOE_Formatter_Plain_Format {
|
|
81 |
continue;
|
82 |
}
|
83 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
if ( $this->mode == 'preview' ) {
|
86 |
$this->rows[] = $row;
|
29 |
parent::__construct( $mode, $filename, $settings, $format, $labels, $field_formats, $date_format, $offset );
|
30 |
|
31 |
$this->css = $this->get_prepared_css();
|
32 |
+
|
33 |
+
//to support IMAGES
|
34 |
+
$field_formats = $this->field_formats['order']; // overwrite! probably modified by parent
|
35 |
+
$this->image_format_fields = isset( $field_formats['image'] ) ? $field_formats['image'] : array();
|
36 |
+
$this->image_format_fields = apply_filters( "woe_{$format}_image_format_fields", $this->image_format_fields );
|
37 |
}
|
38 |
|
39 |
public function start( $data = '' ) {
|
86 |
continue;
|
87 |
}
|
88 |
}
|
89 |
+
|
90 |
+
//to support IMAGES
|
91 |
+
foreach ( $row as $column => &$cell ) {
|
92 |
+
if ( $this->field_format_is( $column, $this->image_format_fields ) ) {
|
93 |
+
$html = $this->make_img_html_from_path(
|
94 |
+
$cell,
|
95 |
+
$this->settings['row_images_width'],
|
96 |
+
$this->settings['row_images_height']
|
97 |
+
);
|
98 |
+
$cell = $html ? $html : "";
|
99 |
+
}
|
100 |
+
}
|
101 |
|
102 |
if ( $this->mode == 'preview' ) {
|
103 |
$this->rows[] = $row;
|
classes/formats/class-woe-formatter-json.php
CHANGED
@@ -5,6 +5,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
5 |
|
6 |
class WOE_Formatter_Json extends WOE_Formatter {
|
7 |
var $prev_added = false;
|
|
|
8 |
|
9 |
public function __construct(
|
10 |
$mode,
|
@@ -18,6 +19,15 @@ class WOE_Formatter_Json extends WOE_Formatter {
|
|
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 = '' ) {
|
@@ -58,7 +68,8 @@ class WOE_Formatter_Json extends WOE_Formatter {
|
|
58 |
continue;
|
59 |
}
|
60 |
|
61 |
-
|
|
|
62 |
{
|
63 |
continue;
|
64 |
}
|
@@ -82,15 +93,12 @@ class WOE_Formatter_Json extends WOE_Formatter {
|
|
82 |
}
|
83 |
}
|
84 |
|
85 |
-
|
86 |
-
$json = json_encode( $rec_out, JSON_PRETTY_PRINT );
|
87 |
-
} else {
|
88 |
-
$json = json_encode( $rec_out );
|
89 |
-
}
|
90 |
|
91 |
if ( $this->has_output_filter ) {
|
92 |
$json = apply_filters( "woe_json_output_filter", $json, $rec_out, $this );
|
93 |
}
|
|
|
94 |
fwrite( $this->handle, $json );
|
95 |
|
96 |
// first record added!
|
5 |
|
6 |
class WOE_Formatter_Json extends WOE_Formatter {
|
7 |
var $prev_added = false;
|
8 |
+
var $formatting_flags = NULL;
|
9 |
|
10 |
public function __construct(
|
11 |
$mode,
|
19 |
) {
|
20 |
parent::__construct( $mode, $filename, $settings, $format, $labels, $field_formats, $date_format, $offset );
|
21 |
$this->prev_added = ( $offset > 0 );
|
22 |
+
if($this->mode == 'preview') {
|
23 |
+
$this->formatting_flags |= JSON_PRETTY_PRINT;
|
24 |
+
}
|
25 |
+
if($settings['unescaped_slashes']) {
|
26 |
+
$this->formatting_flags |= JSON_UNESCAPED_SLASHES;
|
27 |
+
}
|
28 |
+
if($settings['numeric_check']) {
|
29 |
+
$this->formatting_flags |= JSON_NUMERIC_CHECK;
|
30 |
+
}
|
31 |
}
|
32 |
|
33 |
public function start( $data = '' ) {
|
68 |
continue;
|
69 |
}
|
70 |
|
71 |
+
|
72 |
+
if ( $child_labels->is_not_empty() == false ) // can't export!
|
73 |
{
|
74 |
continue;
|
75 |
}
|
93 |
}
|
94 |
}
|
95 |
|
96 |
+
$json = json_encode($rec_out, $this->formatting_flags);
|
|
|
|
|
|
|
|
|
97 |
|
98 |
if ( $this->has_output_filter ) {
|
99 |
$json = apply_filters( "woe_json_output_filter", $json, $rec_out, $this );
|
100 |
}
|
101 |
+
|
102 |
fwrite( $this->handle, $json );
|
103 |
|
104 |
// first record added!
|
classes/formats/class-woe-formatter-pdf.php
CHANGED
@@ -154,6 +154,7 @@ class WOE_Formatter_PDF extends WOE_Formatter_Csv {
|
|
154 |
'stretch' => ! $this->settings['fit_page_width'],
|
155 |
'column_width' => explode( ",", $this->settings['cols_width'] ),
|
156 |
'solid_width' => $solid_width,
|
|
|
157 |
),
|
158 |
'table_header' => array(
|
159 |
'size' => $this->font_size,
|
@@ -176,7 +177,8 @@ class WOE_Formatter_PDF extends WOE_Formatter_Csv {
|
|
176 |
), $this->settings );
|
177 |
|
178 |
$this->pdf->setProperties( $pdf_props );
|
179 |
-
$this->pdf->
|
|
|
180 |
do_action("woe_pdf_started", $this->pdf, $this);
|
181 |
|
182 |
$this->pdf->AliasNbPages();
|
@@ -206,7 +208,8 @@ class WOE_Formatter_PDF extends WOE_Formatter_Csv {
|
|
206 |
$row_height = null;
|
207 |
}
|
208 |
$row = apply_filters( 'woe_pdf_prepare_row', $row );
|
209 |
-
$
|
|
|
210 |
$row = fgetcsv( $this->handle, 0, $this->delimiter, $this->enclosure );
|
211 |
}
|
212 |
|
154 |
'stretch' => ! $this->settings['fit_page_width'],
|
155 |
'column_width' => explode( ",", $this->settings['cols_width'] ),
|
156 |
'solid_width' => $solid_width,
|
157 |
+
'border_style' => 'DF',
|
158 |
),
|
159 |
'table_header' => array(
|
160 |
'size' => $this->font_size,
|
177 |
), $this->settings );
|
178 |
|
179 |
$this->pdf->setProperties( $pdf_props );
|
180 |
+
$this->pdf->setHorizontalAligns( explode( ",", $this->settings['cols_align'] ) );
|
181 |
+
$this->pdf->setVerticalAlign( $this->settings['cols_vertical_align'] );
|
182 |
do_action("woe_pdf_started", $this->pdf, $this);
|
183 |
|
184 |
$this->pdf->AliasNbPages();
|
208 |
$row_height = null;
|
209 |
}
|
210 |
$row = apply_filters( 'woe_pdf_prepare_row', $row );
|
211 |
+
$row_style = apply_filters("woe_pdf_before_print_row", null, $row, $this->pdf, $this);
|
212 |
+
$this->pdf->addRow( $row, null, $row_height, $row_style );
|
213 |
$row = fgetcsv( $this->handle, 0, $this->delimiter, $this->enclosure );
|
214 |
}
|
215 |
|
classes/formats/class-woe-formatter-xml.php
CHANGED
@@ -72,7 +72,7 @@ class WOE_Formatter_Xml extends WOE_Formatter {
|
|
72 |
$child_labels = apply_filters( 'woe_xml_child_labels_' . $original_key, $child_labels, $field_value,
|
73 |
$rec );
|
74 |
|
75 |
-
if (
|
76 |
{
|
77 |
continue;
|
78 |
}
|
72 |
$child_labels = apply_filters( 'woe_xml_child_labels_' . $original_key, $child_labels, $field_value,
|
73 |
$rec );
|
74 |
|
75 |
+
if ( $child_labels->is_not_empty() == false ) // can't export!
|
76 |
{
|
77 |
continue;
|
78 |
}
|
classes/formats/trait-woe-plain-format.php
CHANGED
@@ -255,6 +255,8 @@ trait WOE_Order_Export_Plain_Format {
|
|
255 |
foreach ( $row[ $type ] as $line ) {
|
256 |
foreach ( $line as $k => $v ) {
|
257 |
$plain_key = "plain_{$type}_{$k}";
|
|
|
|
|
258 |
if ( ! isset( $merged_values[ $plain_key ] ) ) {
|
259 |
$merged_values[ $plain_key ] = true;
|
260 |
$row[ $plain_key ] = $v;
|
255 |
foreach ( $row[ $type ] as $line ) {
|
256 |
foreach ( $line as $k => $v ) {
|
257 |
$plain_key = "plain_{$type}_{$k}";
|
258 |
+
if ( ! isset( $row[ $plain_key ] ) ) // skip child columns if no matched field in order
|
259 |
+
continue;
|
260 |
if ( ! isset( $merged_values[ $plain_key ] ) ) {
|
261 |
$merged_values[ $plain_key ] = true;
|
262 |
$row[ $plain_key ] = $v;
|
i18n/languages/woo-order-export-lite.pot
CHANGED
@@ -3,7 +3,7 @@ msgid ""
|
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Advanced Order Export For WooCommerce\n"
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
-
"POT-Creation-Date: 2019-08
|
7 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
8 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
9 |
"Language-Team: \n"
|
@@ -13,32 +13,32 @@ msgstr ""
|
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
"X-Generator: Loco https://localise.biz/\n"
|
16 |
-
"X-Loco-Version: 2.3.
|
17 |
|
18 |
-
#: classes/class-wc-order-export-admin.php:
|
19 |
#, php-format
|
20 |
msgid "%s order marked."
|
21 |
msgid_plural "%s orders marked."
|
22 |
msgstr[0] ""
|
23 |
msgstr[1] ""
|
24 |
|
25 |
-
#: classes/class-wc-order-export-admin.php:
|
26 |
#, php-format
|
27 |
msgid "%s order unmarked."
|
28 |
msgid_plural "%s orders unmarked."
|
29 |
msgstr[0] ""
|
30 |
msgstr[1] ""
|
31 |
|
32 |
-
#: view/settings-form.php:46 view/settings-form.php:
|
33 |
-
#: view/settings-form.php:
|
34 |
msgid "-"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: view/settings-form.php:
|
38 |
msgid "- don't modify -"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: view/settings-form.php:
|
42 |
msgid "0 - auto scale"
|
43 |
msgstr ""
|
44 |
|
@@ -46,11 +46,11 @@ msgstr ""
|
|
46 |
msgid "1st row only"
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: classes/core/class-wc-order-export-data-extractor.php:
|
50 |
msgid "[Rest of the World]"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: view/settings-form.php:
|
54 |
msgid "Actions"
|
55 |
msgstr ""
|
56 |
|
@@ -63,47 +63,47 @@ msgstr ""
|
|
63 |
msgid "Add %s fields"
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: view/settings-form.php:
|
67 |
msgid "Add fee"
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: view/settings-form.php:
|
71 |
msgid "Add field"
|
72 |
msgstr ""
|
73 |
|
74 |
-
#: view/settings-form.php:
|
75 |
msgid "Add shipping"
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: view/settings-form.php:
|
79 |
msgid "Add static field"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: view/settings-form.php:
|
83 |
msgid "Add tax"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
87 |
msgid "Address 1 (Billing)"
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
91 |
msgid "Address 1 (Shipping)"
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
95 |
msgid "Address 1&2 (Billing)"
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
99 |
msgid "Address 1&2 (Shipping)"
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
103 |
msgid "Address 2 (Billing)"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
107 |
msgid "Address 2 (Shipping)"
|
108 |
msgstr ""
|
109 |
|
@@ -129,7 +129,7 @@ msgstr ""
|
|
129 |
msgid "all rows"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: view/settings-form.php:
|
133 |
msgid "Any coupon used"
|
134 |
msgstr ""
|
135 |
|
@@ -145,7 +145,7 @@ msgstr ""
|
|
145 |
msgid "as"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: view/settings-form.php:
|
149 |
msgid "Ascending"
|
150 |
msgstr ""
|
151 |
|
@@ -153,11 +153,12 @@ msgstr ""
|
|
153 |
msgid "Auto column width"
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
157 |
msgid "Billing Address"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: view/settings-form.php:
|
161 |
msgid "Billing locations"
|
162 |
msgstr ""
|
163 |
|
@@ -180,7 +181,7 @@ msgstr ""
|
|
180 |
msgid "can not open for output"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: classes/admin/tabs/ajax/trait-wc-order-export-admin-tab-abstract-ajax-export.php:
|
184 |
msgid "Can't create temporary file"
|
185 |
msgstr ""
|
186 |
|
@@ -188,71 +189,73 @@ msgstr ""
|
|
188 |
msgid "Can't find exported file"
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: view/settings-form.php:
|
192 |
-
#: view/settings-form.php:
|
193 |
-
#: view/settings-form.php:
|
194 |
-
#: view/settings-form.php:
|
195 |
-
#: view/settings-form.php:
|
|
|
196 |
msgid "Cancel"
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
200 |
msgid "Cart"
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
204 |
msgid "Cart Discount Amount"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
208 |
msgid "Cart Discount Amount Tax"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
212 |
msgid "Category"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: view/settings-form.php:
|
216 |
msgid "Center align"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: view/settings-form.php:
|
220 |
msgid "Change order status to"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: view/settings-form.php:316 view/settings-form.php:
|
224 |
msgid "Character encoding"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
228 |
msgid "City (Billing)"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
232 |
msgid "City (Shipping)"
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
236 |
msgid "City, State Zip (Billing)"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
240 |
msgid "City, State Zip (Shipping)"
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
244 |
msgid "City, State, Zip (Billing)"
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
248 |
msgid "City, State, Zip (Shipping)"
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: view/settings-form.php:
|
252 |
msgid "Cleanup phone (export only digits)"
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: view/settings-form.php:
|
256 |
msgid "Click here to download"
|
257 |
msgstr ""
|
258 |
|
@@ -260,11 +263,12 @@ msgstr ""
|
|
260 |
msgid "code snippets"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: view/settings-form.php:
|
264 |
-
#: view/settings-form.php:
|
265 |
-
#: view/settings-form.php:
|
266 |
-
#: view/settings-form.php:
|
267 |
-
#: view/settings-form.php:
|
|
|
268 |
msgid "Column name"
|
269 |
msgstr ""
|
270 |
|
@@ -272,41 +276,50 @@ msgstr ""
|
|
272 |
msgid "columns"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: view/settings-form.php:
|
276 |
msgid "Columns align"
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: view/settings-form.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
msgid "Columns width"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: view/settings-form.php:
|
284 |
-
#: view/settings-form.php:582
|
285 |
msgid "comma separated list"
|
286 |
msgstr ""
|
287 |
|
288 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
289 |
msgid "Common"
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
293 |
msgid "Company (Billing)"
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
297 |
msgid "Company (Shipping)"
|
298 |
msgstr ""
|
299 |
|
300 |
#: view/settings-form.php:167
|
301 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
302 |
msgid "Completed Date"
|
303 |
msgstr ""
|
304 |
|
305 |
-
#: view/settings-form.php:
|
306 |
-
#: view/settings-form.php:
|
307 |
-
#: view/settings-form.php:
|
308 |
-
#: view/settings-form.php:
|
309 |
-
#: view/settings-form.php:
|
|
|
310 |
msgid "Confirm"
|
311 |
msgstr ""
|
312 |
|
@@ -320,31 +333,31 @@ msgid ""
|
|
320 |
"install."
|
321 |
msgstr ""
|
322 |
|
323 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
324 |
msgid "Country Code (Billing)"
|
325 |
msgstr ""
|
326 |
|
327 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
328 |
msgid "Country Code (Shipping)"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
332 |
msgid "Country Name (Billing)"
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
336 |
msgid "Country Name (Shipping)"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
340 |
msgid "Coupon Amount"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
344 |
msgid "Coupon Code"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
348 |
msgid "Coupon Description"
|
349 |
msgstr ""
|
350 |
|
@@ -352,14 +365,15 @@ msgstr ""
|
|
352 |
msgid "Coupon tag"
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
356 |
msgid "Coupon Type"
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: view/settings-form.php:
|
360 |
-
#: classes/admin/class-wc-order-export-manage.php:
|
361 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
362 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
363 |
msgid "Coupons"
|
364 |
msgstr ""
|
365 |
|
@@ -367,7 +381,7 @@ msgstr ""
|
|
367 |
msgid "coupons"
|
368 |
msgstr ""
|
369 |
|
370 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
371 |
msgid "Coupons Used"
|
372 |
msgstr ""
|
373 |
|
@@ -375,72 +389,72 @@ msgstr ""
|
|
375 |
msgid "CSV options"
|
376 |
msgstr ""
|
377 |
|
378 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
379 |
msgid "Currency"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: view/settings-form.php:
|
383 |
msgid "custom"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: view/settings-form.php:
|
387 |
msgid "Custom css"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: view/settings-form.php:
|
391 |
msgid "Custom fields"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: view/settings-form.php:
|
395 |
msgid "Custom PHP code to modify output"
|
396 |
msgstr ""
|
397 |
|
398 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
399 |
msgid "Customer first order date"
|
400 |
msgstr ""
|
401 |
|
402 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
403 |
msgid "Customer IP address"
|
404 |
msgstr ""
|
405 |
|
406 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
407 |
msgid "Customer last order date"
|
408 |
msgstr ""
|
409 |
|
410 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
411 |
msgid "Customer Note"
|
412 |
msgstr ""
|
413 |
|
414 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
415 |
msgid "Customer Role"
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
419 |
msgid "Customer Total Orders"
|
420 |
msgstr ""
|
421 |
|
422 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
423 |
msgid "Customer User Email"
|
424 |
msgstr ""
|
425 |
|
426 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
427 |
msgid "Customer User ID"
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
431 |
msgid "Customer Username"
|
432 |
msgstr ""
|
433 |
|
434 |
-
#: view/settings-form.php:
|
435 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
436 |
msgid "Date"
|
437 |
msgstr ""
|
438 |
|
439 |
-
#: classes/class-wc-order-export-admin.php:
|
440 |
msgid "Date From is greater than Date To"
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
444 |
msgid "Date of first refund"
|
445 |
msgstr ""
|
446 |
|
@@ -448,23 +462,23 @@ msgstr ""
|
|
448 |
msgid "Date range"
|
449 |
msgstr ""
|
450 |
|
451 |
-
#: view/settings-form.php:
|
452 |
msgid "Descending"
|
453 |
msgstr ""
|
454 |
|
455 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
456 |
msgid "Description"
|
457 |
msgstr ""
|
458 |
|
459 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
460 |
msgid "Discount Amount"
|
461 |
msgstr ""
|
462 |
|
463 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
464 |
msgid "Discount Amount + Tax"
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
468 |
msgid "Discount Amount Tax"
|
469 |
msgstr ""
|
470 |
|
@@ -472,7 +486,11 @@ msgstr ""
|
|
472 |
msgid "Docs"
|
473 |
msgstr ""
|
474 |
|
475 |
-
#: view/settings-form.php:
|
|
|
|
|
|
|
|
|
476 |
msgid "Don't export child orders"
|
477 |
msgstr ""
|
478 |
|
@@ -483,32 +501,32 @@ msgid ""
|
|
483 |
"reduce reply time :)"
|
484 |
msgstr ""
|
485 |
|
486 |
-
#: classes/core/class-wc-order-export-engine.php:
|
487 |
msgid "Don't Panic"
|
488 |
msgstr ""
|
489 |
|
490 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
491 |
msgid "Download URL"
|
492 |
msgstr ""
|
493 |
|
494 |
-
#: view/settings-form.php:
|
495 |
msgid "Drag rows to reorder exported fields"
|
496 |
msgstr ""
|
497 |
|
498 |
-
#: classes/core/class-wc-order-export-
|
499 |
msgid "Edit order"
|
500 |
msgstr ""
|
501 |
|
502 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
503 |
msgid "Email (Billing)"
|
504 |
msgstr ""
|
505 |
|
506 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
507 |
msgid "Embedded Product Image"
|
508 |
msgstr ""
|
509 |
|
510 |
-
#: classes/class-wc-order-export-admin.php:
|
511 |
-
#: classes/core/class-wc-order-export-data-extractor.php:
|
512 |
msgid "empty"
|
513 |
msgstr ""
|
514 |
|
@@ -520,15 +538,15 @@ msgstr ""
|
|
520 |
msgid "empty meta key"
|
521 |
msgstr ""
|
522 |
|
523 |
-
#: classes/class-wc-order-export-admin.php:
|
524 |
msgid "Empty method"
|
525 |
msgstr ""
|
526 |
|
527 |
-
#: classes/class-wc-order-export-admin.php:
|
528 |
msgid "empty value"
|
529 |
msgstr ""
|
530 |
|
531 |
-
#: view/settings-form.php:
|
532 |
msgid "Enable debug output"
|
533 |
msgstr ""
|
534 |
|
@@ -536,31 +554,35 @@ msgstr ""
|
|
536 |
msgid "Enclosure"
|
537 |
msgstr ""
|
538 |
|
|
|
|
|
|
|
|
|
539 |
#: view/settings-form.php:357
|
540 |
msgid "End tag"
|
541 |
msgstr ""
|
542 |
|
543 |
-
#: view/settings-form.php:
|
544 |
msgid "Exclude products"
|
545 |
msgstr ""
|
546 |
|
547 |
-
#: view/settings-form.php:
|
548 |
msgid "Export"
|
549 |
msgstr ""
|
550 |
|
551 |
-
#: view/settings-form.php:
|
552 |
msgid "Export [w/o progressbar]"
|
553 |
msgstr ""
|
554 |
|
555 |
-
#: view/settings-form.php:
|
556 |
msgid "Export all order notes"
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: view/settings-form.php:
|
560 |
msgid "Export all products from the order"
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: classes/class-wc-order-export-admin.php:
|
564 |
#, php-format
|
565 |
msgid "Export as %s"
|
566 |
msgstr ""
|
@@ -589,11 +611,11 @@ msgstr ""
|
|
589 |
msgid "Export orders from WooCommerce with ease (Excel/CSV/XML/JSON supported)"
|
590 |
msgstr ""
|
591 |
|
592 |
-
#: view/settings-form.php:
|
593 |
msgid "Export refund notes as Customer Note"
|
594 |
msgstr ""
|
595 |
|
596 |
-
#: view/settings-form.php:
|
597 |
msgid "Export refunds"
|
598 |
msgstr ""
|
599 |
|
@@ -605,16 +627,16 @@ msgstr ""
|
|
605 |
msgid "Export Status"
|
606 |
msgstr ""
|
607 |
|
608 |
-
#: view/settings-form.php:
|
609 |
#, php-format
|
610 |
msgid "Export total: %s orders"
|
611 |
msgstr ""
|
612 |
|
613 |
-
#: view/settings-form.php:
|
614 |
msgid "Export unmarked orders only"
|
615 |
msgstr ""
|
616 |
|
617 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
618 |
msgid "Exported items"
|
619 |
msgstr ""
|
620 |
|
@@ -622,7 +644,7 @@ msgstr ""
|
|
622 |
msgid "Express export"
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: view/settings-form.php:
|
626 |
msgid "Fee name"
|
627 |
msgstr ""
|
628 |
|
@@ -638,31 +660,31 @@ msgstr ""
|
|
638 |
msgid "Fill order columns for"
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: view/settings-form.php:
|
642 |
msgid "Filter by billing"
|
643 |
msgstr ""
|
644 |
|
645 |
-
#: view/settings-form.php:
|
646 |
msgid "Filter by coupon"
|
647 |
msgstr ""
|
648 |
|
649 |
-
#: view/settings-form.php:
|
650 |
msgid "Filter by customer"
|
651 |
msgstr ""
|
652 |
|
653 |
-
#: view/settings-form.php:
|
654 |
msgid "Filter by item and metadata"
|
655 |
msgstr ""
|
656 |
|
657 |
-
#: view/settings-form.php:
|
658 |
msgid "Filter by order"
|
659 |
msgstr ""
|
660 |
|
661 |
-
#: view/settings-form.php:
|
662 |
msgid "Filter by product"
|
663 |
msgstr ""
|
664 |
|
665 |
-
#: view/settings-form.php:
|
666 |
msgid "Filter by shipping"
|
667 |
msgstr ""
|
668 |
|
@@ -670,27 +692,27 @@ msgstr ""
|
|
670 |
msgid "Filter orders by"
|
671 |
msgstr ""
|
672 |
|
673 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
674 |
msgid "First Name (Billing)"
|
675 |
msgstr ""
|
676 |
|
677 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
678 |
msgid "First Name (Shipping)"
|
679 |
msgstr ""
|
680 |
|
681 |
-
#: view/settings-form.php:
|
682 |
msgid "Fit table to page width"
|
683 |
msgstr ""
|
684 |
|
685 |
-
#: view/settings-form.php:
|
686 |
msgid "Font size"
|
687 |
msgstr ""
|
688 |
|
689 |
-
#: view/settings-form.php:
|
690 |
msgid "Footer text"
|
691 |
msgstr ""
|
692 |
|
693 |
-
#: view/settings-form.php:
|
694 |
msgid "Footer text color"
|
695 |
msgstr ""
|
696 |
|
@@ -702,7 +724,7 @@ msgstr ""
|
|
702 |
msgid "Format"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: view/settings-form.php:
|
706 |
msgid "Format numbers (use WC decimal separator)"
|
707 |
msgstr ""
|
708 |
|
@@ -710,15 +732,15 @@ msgstr ""
|
|
710 |
msgid "Fri"
|
711 |
msgstr ""
|
712 |
|
713 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
714 |
msgid "Full Name (Billing)"
|
715 |
msgstr ""
|
716 |
|
717 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
718 |
msgid "Full Name (Shipping)"
|
719 |
msgstr ""
|
720 |
|
721 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
722 |
msgid "Full names for categories"
|
723 |
msgstr ""
|
724 |
|
@@ -730,15 +752,15 @@ msgstr ""
|
|
730 |
msgid "Grouping by product"
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: view/settings-form.php:
|
734 |
msgid "Header text"
|
735 |
msgstr ""
|
736 |
|
737 |
-
#: view/settings-form.php:
|
738 |
msgid "Header text color"
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
742 |
msgid "Height"
|
743 |
msgstr ""
|
744 |
|
@@ -750,12 +772,13 @@ msgstr ""
|
|
750 |
msgid "helpdesk system"
|
751 |
msgstr ""
|
752 |
|
753 |
-
#: view/settings-form.php:
|
754 |
-
#: view/settings-form.php:
|
|
|
755 |
msgid "Hide unused fields"
|
756 |
msgstr ""
|
757 |
|
758 |
-
#: view/settings-form.php:
|
759 |
msgid "Html options"
|
760 |
msgstr ""
|
761 |
|
@@ -763,7 +786,7 @@ msgstr ""
|
|
763 |
msgid "https://algolplus.com/"
|
764 |
msgstr ""
|
765 |
|
766 |
-
#: view/settings-form.php:
|
767 |
#, php-format
|
768 |
msgid ""
|
769 |
"If you see this message after page load, user interface won't work correctly!"
|
@@ -771,19 +794,21 @@ msgid ""
|
|
771 |
"it). Probably, it's a conflict with another plugin or active theme."
|
772 |
msgstr ""
|
773 |
|
774 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
775 |
msgid "Image"
|
776 |
msgstr ""
|
777 |
|
778 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
779 |
msgid "Image URL"
|
780 |
msgstr ""
|
781 |
|
782 |
-
#: view/settings-form.php:275 view/settings-form.php:
|
|
|
783 |
msgid "Images height"
|
784 |
msgstr ""
|
785 |
|
786 |
-
#: view/settings-form.php:268 view/settings-form.php:
|
|
|
787 |
msgid "Images width"
|
788 |
msgstr ""
|
789 |
|
@@ -795,51 +820,47 @@ msgstr ""
|
|
795 |
msgid "Import settings"
|
796 |
msgstr ""
|
797 |
|
798 |
-
#: view/settings-form.php:
|
799 |
msgid "It might not work for huge datasets!"
|
800 |
msgstr ""
|
801 |
|
802 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
803 |
msgid "Item #"
|
804 |
msgstr ""
|
805 |
|
806 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
807 |
msgid "Item Cost"
|
808 |
msgstr ""
|
809 |
|
810 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
811 |
msgid "Item Discount Amount"
|
812 |
msgstr ""
|
813 |
|
814 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
815 |
msgid "Item download URL"
|
816 |
msgstr ""
|
817 |
|
818 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
819 |
msgid "Item ID"
|
820 |
msgstr ""
|
821 |
|
822 |
-
#: view/settings-form.php:
|
823 |
msgid "Item meta data"
|
824 |
msgstr ""
|
825 |
|
826 |
-
#: view/settings-form.php:
|
827 |
msgid "Item metadata"
|
828 |
msgstr ""
|
829 |
|
830 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
831 |
msgid "Item Name"
|
832 |
msgstr ""
|
833 |
|
834 |
-
#: view/settings-form.php:
|
835 |
msgid "Item names"
|
836 |
msgstr ""
|
837 |
|
838 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
839 |
-
msgid "Item Seller"
|
840 |
-
msgstr ""
|
841 |
-
|
842 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:455
|
843 |
msgid "Item Tax Rate"
|
844 |
msgstr ""
|
845 |
|
@@ -851,43 +872,47 @@ msgstr ""
|
|
851 |
msgid "Just click inside the textarea and copy (Ctrl+C)"
|
852 |
msgstr ""
|
853 |
|
854 |
-
#:
|
|
|
|
|
|
|
|
|
855 |
msgid "Last Name (Billing)"
|
856 |
msgstr ""
|
857 |
|
858 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
859 |
msgid "Last Name (Shipping)"
|
860 |
msgstr ""
|
861 |
|
862 |
-
#: view/settings-form.php:
|
863 |
msgid "Left align"
|
864 |
msgstr ""
|
865 |
|
866 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
867 |
msgid "Length"
|
868 |
msgstr ""
|
869 |
|
870 |
-
#: view/settings-form.php:311 view/settings-form.php:
|
871 |
msgid "Line Break"
|
872 |
msgstr ""
|
873 |
|
874 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
875 |
msgid "Line number"
|
876 |
msgstr ""
|
877 |
|
878 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
879 |
msgid "Link to edit order"
|
880 |
msgstr ""
|
881 |
|
882 |
-
#: view/settings-form.php:
|
883 |
msgid "Logo align"
|
884 |
msgstr ""
|
885 |
|
886 |
-
#: view/settings-form.php:
|
887 |
msgid "Logo height"
|
888 |
msgstr ""
|
889 |
|
890 |
-
#: view/settings-form.php:
|
891 |
msgid "Logo width"
|
892 |
msgstr ""
|
893 |
|
@@ -897,33 +922,33 @@ msgid ""
|
|
897 |
"Look at %s for popular plugins or check %s to study how to extend the plugin."
|
898 |
msgstr ""
|
899 |
|
900 |
-
#: classes/core/class-wc-order-export-engine.php:
|
901 |
msgid "Main SQL queries are listed below"
|
902 |
msgstr ""
|
903 |
|
904 |
-
#: classes/class-wc-order-export-admin.php:
|
905 |
msgid "Mark exported"
|
906 |
msgstr ""
|
907 |
|
908 |
-
#: view/settings-form.php:
|
909 |
msgid "Mark exported orders"
|
910 |
msgstr ""
|
911 |
|
912 |
-
#: view/settings-form.php:
|
913 |
-
#: view/settings-form.php:
|
914 |
msgid "Meta key"
|
915 |
msgstr ""
|
916 |
|
917 |
-
#: view/settings-form.php:
|
918 |
msgid "Might be different from actual export!"
|
919 |
msgstr ""
|
920 |
|
921 |
-
#: view/settings-form.php:
|
922 |
msgid "Misc settings"
|
923 |
msgstr ""
|
924 |
|
925 |
-
#: view/settings-form.php:153 view/settings-form.php:
|
926 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
927 |
msgid "Modification Date"
|
928 |
msgstr ""
|
929 |
|
@@ -931,7 +956,7 @@ msgstr ""
|
|
931 |
msgid "Mon"
|
932 |
msgstr ""
|
933 |
|
934 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
935 |
msgid "Money"
|
936 |
msgstr ""
|
937 |
|
@@ -939,26 +964,26 @@ msgstr ""
|
|
939 |
msgid "Need help? Create ticket in"
|
940 |
msgstr ""
|
941 |
|
942 |
-
#: view/settings-form.php:
|
943 |
msgid "No"
|
944 |
msgstr ""
|
945 |
|
946 |
-
#: view/settings-form.php:
|
947 |
msgid "No page numbers"
|
948 |
msgstr ""
|
949 |
|
950 |
#: classes/formats/abstract-class-woe-formatter-sv.php:102
|
951 |
-
#: classes/formats/class-woe-formatter-html.php:
|
952 |
#: classes/formats/class-woe-formatter-xls.php:241
|
953 |
msgid "No results"
|
954 |
msgstr ""
|
955 |
|
956 |
-
#: classes/class-wc-order-export-admin.php:
|
957 |
-
#: classes/admin/tabs/ajax/trait-wc-order-export-admin-tab-abstract-ajax-export.php:
|
958 |
msgid "Nothing to export. Please, adjust your filters"
|
959 |
msgstr ""
|
960 |
|
961 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
962 |
msgid "Number"
|
963 |
msgstr ""
|
964 |
|
@@ -966,74 +991,75 @@ msgstr ""
|
|
966 |
msgid "one row"
|
967 |
msgstr ""
|
968 |
|
969 |
-
#: view/settings-form.php:
|
970 |
msgid "OR"
|
971 |
msgstr ""
|
972 |
|
973 |
-
#: view/settings-form.php:
|
974 |
-
#: view/settings-form.php:
|
|
|
975 |
msgid "or type meta key here"
|
976 |
msgstr ""
|
977 |
|
978 |
-
#: view/settings-form.php:146 view/settings-form.php:
|
979 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
980 |
msgid "Order Date"
|
981 |
msgstr ""
|
982 |
|
983 |
-
#: view/settings-form.php:
|
984 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
985 |
msgid "Order ID"
|
986 |
msgstr ""
|
987 |
|
988 |
-
#: view/settings-form.php:
|
989 |
msgid "Order item fields"
|
990 |
msgstr ""
|
991 |
|
992 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
993 |
msgid "Order Line (w/o tax)"
|
994 |
msgstr ""
|
995 |
|
996 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
997 |
msgid "Order Line Subtotal"
|
998 |
msgstr ""
|
999 |
|
1000 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1001 |
msgid "Order Line Subtotal Tax"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1005 |
msgid "Order Line Tax"
|
1006 |
msgstr ""
|
1007 |
|
1008 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1009 |
msgid "Order Line Tax (- Refund)"
|
1010 |
msgstr ""
|
1011 |
|
1012 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1013 |
msgid "Order Line Tax Refunded"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1017 |
msgid "Order Line Total"
|
1018 |
msgstr ""
|
1019 |
|
1020 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1021 |
msgid "Order Line Total (- Refund)"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1025 |
msgid "Order Line Total (include tax)"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1029 |
msgid "Order Line Total Refunded"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1033 |
msgid "Order Notes"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1037 |
msgid "Order Number"
|
1038 |
msgstr ""
|
1039 |
|
@@ -1041,47 +1067,47 @@ msgstr ""
|
|
1041 |
msgid "Order Refund"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1045 |
msgid "Order Refund Amount"
|
1046 |
msgstr ""
|
1047 |
|
1048 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1049 |
msgid "Order Shipping + Tax Amount"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1053 |
msgid "Order Shipping Amount"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1057 |
msgid "Order Shipping Amount (- Refund)"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1061 |
msgid "Order Shipping Amount Refunded"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1065 |
msgid "Order Shipping Tax Amount"
|
1066 |
msgstr ""
|
1067 |
|
1068 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1069 |
msgid "Order Shipping Tax Amount (- Refund)"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1073 |
msgid "Order Shipping Tax Refunded"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1077 |
msgid "Order Status"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
-
#: view/settings-form.php:
|
1081 |
msgid "Order status"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
-
#: view/settings-form.php:
|
1085 |
msgid "Order statuses"
|
1086 |
msgstr ""
|
1087 |
|
@@ -1089,19 +1115,19 @@ msgstr ""
|
|
1089 |
msgid "Order Subscription"
|
1090 |
msgstr ""
|
1091 |
|
1092 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1093 |
msgid "Order Subtotal - Cart Discount"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1097 |
msgid "Order Subtotal Amount"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1101 |
msgid "Order Subtotal Amount (- Refund)"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1105 |
msgid "Order Subtotal Amount Refunded"
|
1106 |
msgstr ""
|
1107 |
|
@@ -1109,35 +1135,35 @@ msgstr ""
|
|
1109 |
msgid "Order tag"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1113 |
msgid "Order Tax Amount"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1117 |
msgid "Order Total Amount"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1121 |
msgid "Order Total Amount (- Refund)"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1125 |
msgid "Order Total Amount without Tax"
|
1126 |
msgstr ""
|
1127 |
|
1128 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1129 |
msgid "Order Total Fee"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1133 |
msgid "Order Total Tax Amount"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1137 |
msgid "Order Total Tax Amount (- Refund)"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1141 |
msgid "Order Total Tax Amount Refunded"
|
1142 |
msgstr ""
|
1143 |
|
@@ -1146,58 +1172,65 @@ msgid "Order Type"
|
|
1146 |
msgstr ""
|
1147 |
|
1148 |
#: classes/formats/class-woe-formatter-xls.php:132
|
1149 |
-
#: classes/admin/class-wc-order-export-manage.php:
|
1150 |
msgid "Orders"
|
1151 |
msgstr ""
|
1152 |
|
1153 |
-
#: view/settings-form.php:
|
1154 |
msgid "Orientation"
|
1155 |
msgstr ""
|
1156 |
|
1157 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
1158 |
msgid "Other items"
|
1159 |
msgstr ""
|
1160 |
|
1161 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
1162 |
msgid "Others"
|
1163 |
msgstr ""
|
1164 |
|
1165 |
#: view/settings-form.php:253 view/settings-form.php:294
|
1166 |
-
#: view/settings-form.php:
|
1167 |
-
#: view/settings-form.php:
|
1168 |
msgid "Output column titles as first line"
|
1169 |
msgstr ""
|
1170 |
|
1171 |
-
#: view/settings-form.php:290 view/settings-form.php:
|
1172 |
msgid "Output UTF-8 BOM"
|
1173 |
msgstr ""
|
1174 |
|
1175 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
1176 |
msgid "Page footer text"
|
1177 |
msgstr ""
|
1178 |
|
1179 |
-
#: view/settings-form.php:
|
1180 |
msgid "Page footer text color"
|
1181 |
msgstr ""
|
1182 |
|
1183 |
-
#: view/settings-form.php:
|
1184 |
msgid "Page header text"
|
1185 |
msgstr ""
|
1186 |
|
1187 |
-
#: view/settings-form.php:
|
1188 |
msgid "Page header text color"
|
1189 |
msgstr ""
|
1190 |
|
1191 |
-
#: view/settings-form.php:
|
1192 |
msgid "Page numbers"
|
1193 |
msgstr ""
|
1194 |
|
1195 |
-
#: view/settings-form.php:
|
1196 |
msgid "Page size"
|
1197 |
msgstr ""
|
1198 |
|
1199 |
#: view/settings-form.php:160
|
1200 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1201 |
msgid "Paid Date"
|
1202 |
msgstr ""
|
1203 |
|
@@ -1207,27 +1240,27 @@ msgid ""
|
|
1207 |
"install."
|
1208 |
msgstr ""
|
1209 |
|
1210 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1211 |
msgid "Payment Method"
|
1212 |
msgstr ""
|
1213 |
|
1214 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1215 |
msgid "Payment Method Title"
|
1216 |
msgstr ""
|
1217 |
|
1218 |
-
#: view/settings-form.php:
|
1219 |
msgid "Payment methods"
|
1220 |
msgstr ""
|
1221 |
|
1222 |
-
#: view/settings-form.php:
|
1223 |
msgid "PDF options"
|
1224 |
msgstr ""
|
1225 |
|
1226 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1227 |
msgid "Phone (Billing)"
|
1228 |
msgstr ""
|
1229 |
|
1230 |
-
#: view/settings-form.php:
|
1231 |
msgid ""
|
1232 |
"Please check permissions for your role. You must have capability "
|
1233 |
"“edit_themes” to use this box."
|
@@ -1247,15 +1280,15 @@ msgstr ""
|
|
1247 |
msgid "Please, install/enable PHP XML extension!"
|
1248 |
msgstr ""
|
1249 |
|
1250 |
-
#: classes/class-wc-order-export-admin.php:
|
1251 |
msgid "Please, set up fields to export"
|
1252 |
msgstr ""
|
1253 |
|
1254 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1255 |
msgid "Postcode (Billing)"
|
1256 |
msgstr ""
|
1257 |
|
1258 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1259 |
msgid "Postcode (Shipping)"
|
1260 |
msgstr ""
|
1261 |
|
@@ -1263,15 +1296,15 @@ msgstr ""
|
|
1263 |
msgid "Prepend XML"
|
1264 |
msgstr ""
|
1265 |
|
1266 |
-
#: view/settings-form.php:
|
1267 |
msgid "Press 'Esc' to cancel the export"
|
1268 |
msgstr ""
|
1269 |
|
1270 |
-
#: view/settings-form.php:
|
1271 |
msgid "Preview"
|
1272 |
msgstr ""
|
1273 |
|
1274 |
-
#: view/settings-form.php:
|
1275 |
msgid "Preview size"
|
1276 |
msgstr ""
|
1277 |
|
@@ -1280,31 +1313,35 @@ msgstr ""
|
|
1280 |
msgid "Pro version"
|
1281 |
msgstr ""
|
1282 |
|
1283 |
-
#: view/settings-form.php:
|
1284 |
msgid "Product categories"
|
1285 |
msgstr ""
|
1286 |
|
1287 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1288 |
msgid "Product Current Price"
|
1289 |
msgstr ""
|
1290 |
|
1291 |
-
#: view/settings-form.php:
|
1292 |
msgid "Product custom fields"
|
1293 |
msgstr ""
|
1294 |
|
1295 |
-
#: view/settings-form.php:
|
1296 |
msgid "Product fields"
|
1297 |
msgstr ""
|
1298 |
|
1299 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1300 |
msgid "Product Id"
|
1301 |
msgstr ""
|
1302 |
|
1303 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
|
|
|
|
|
|
1304 |
msgid "Product Name"
|
1305 |
msgstr ""
|
1306 |
|
1307 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1308 |
msgid "Product Name (main)"
|
1309 |
msgstr ""
|
1310 |
|
@@ -1312,30 +1349,44 @@ msgstr ""
|
|
1312 |
msgid "Product rows start with a new line"
|
1313 |
msgstr ""
|
1314 |
|
1315 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
|
|
|
|
|
|
1316 |
msgid "Product Shipping Class"
|
1317 |
msgstr ""
|
1318 |
|
|
|
|
|
|
|
|
|
1319 |
#: view/settings-form.php:337
|
1320 |
msgid "Product tag"
|
1321 |
msgstr ""
|
1322 |
|
1323 |
-
#: view/settings-form.php:
|
1324 |
msgid "Product taxonomies"
|
1325 |
msgstr ""
|
1326 |
|
1327 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
|
|
|
|
|
|
|
|
1328 |
msgid "Product URL"
|
1329 |
msgstr ""
|
1330 |
|
1331 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1332 |
msgid "Product Variation"
|
1333 |
msgstr ""
|
1334 |
|
1335 |
-
#: view/settings-form.php:
|
1336 |
-
#: classes/admin/class-wc-order-export-manage.php:
|
1337 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1338 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
1339 |
msgid "Products"
|
1340 |
msgstr ""
|
1341 |
|
@@ -1351,19 +1402,19 @@ msgstr ""
|
|
1351 |
msgid "Profiles"
|
1352 |
msgstr ""
|
1353 |
|
1354 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1355 |
msgid "Quantity"
|
1356 |
msgstr ""
|
1357 |
|
1358 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1359 |
msgid "Quantity (- Refund)"
|
1360 |
msgstr ""
|
1361 |
|
1362 |
-
#: view/settings-form.php:
|
1363 |
msgid "Read how to fix it"
|
1364 |
msgstr ""
|
1365 |
|
1366 |
-
#: view/settings-form.php:
|
1367 |
msgid "Remove all fields"
|
1368 |
msgstr ""
|
1369 |
|
@@ -1371,23 +1422,23 @@ msgstr ""
|
|
1371 |
msgid "Remove all fields?"
|
1372 |
msgstr ""
|
1373 |
|
1374 |
-
#: view/settings-form.php:
|
1375 |
msgid "Remove logo"
|
1376 |
msgstr ""
|
1377 |
|
1378 |
-
#: view/settings-form.php:
|
1379 |
msgid "repeat at each page"
|
1380 |
msgstr ""
|
1381 |
|
1382 |
-
#: view/settings-form.php:
|
1383 |
msgid "repeat header as last line"
|
1384 |
msgstr ""
|
1385 |
|
1386 |
-
#: view/settings-form.php:
|
1387 |
msgid "Reset settings"
|
1388 |
msgstr ""
|
1389 |
|
1390 |
-
#: view/settings-form.php:
|
1391 |
msgid "Right align"
|
1392 |
msgstr ""
|
1393 |
|
@@ -1407,11 +1458,11 @@ msgstr ""
|
|
1407 |
msgid "Sat"
|
1408 |
msgstr ""
|
1409 |
|
1410 |
-
#: view/settings-form.php:
|
1411 |
msgid "Save & Exit"
|
1412 |
msgstr ""
|
1413 |
|
1414 |
-
#: view/settings-form.php:
|
1415 |
msgid "Save settings"
|
1416 |
msgstr ""
|
1417 |
|
@@ -1419,12 +1470,16 @@ msgstr ""
|
|
1419 |
msgid "Scheduled jobs"
|
1420 |
msgstr ""
|
1421 |
|
1422 |
-
#:
|
|
|
|
|
|
|
|
|
1423 |
msgid "Select logo"
|
1424 |
msgstr ""
|
1425 |
|
1426 |
#: classes/class-wc-order-export-admin.php:291
|
1427 |
-
msgid "select product field or
|
1428 |
msgstr ""
|
1429 |
|
1430 |
#: view/settings-form.php:346
|
@@ -1435,7 +1490,7 @@ msgstr ""
|
|
1435 |
msgid "Set up coupon fields"
|
1436 |
msgstr ""
|
1437 |
|
1438 |
-
#: view/settings-form.php:
|
1439 |
msgid "Set up fields to export"
|
1440 |
msgstr ""
|
1441 |
|
@@ -1455,55 +1510,61 @@ msgstr ""
|
|
1455 |
msgid "Settings saved"
|
1456 |
msgstr ""
|
1457 |
|
1458 |
-
#: view/settings-form.php:
|
1459 |
msgid "Settings were successfully updated!"
|
1460 |
msgstr ""
|
1461 |
|
1462 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
1463 |
msgid "Shipping"
|
1464 |
msgstr ""
|
1465 |
|
1466 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
1467 |
msgid "Shipping Address"
|
1468 |
msgstr ""
|
1469 |
|
1470 |
-
#: view/settings-form.php:
|
1471 |
msgid "Shipping locations"
|
1472 |
msgstr ""
|
1473 |
|
1474 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1475 |
msgid "Shipping Method"
|
1476 |
msgstr ""
|
1477 |
|
1478 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1479 |
msgid "Shipping Method (no id)"
|
1480 |
msgstr ""
|
1481 |
|
1482 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1483 |
msgid "Shipping Method Title"
|
1484 |
msgstr ""
|
1485 |
|
1486 |
-
#: view/settings-form.php:
|
1487 |
msgid "Shipping methods"
|
1488 |
msgstr ""
|
1489 |
|
1490 |
-
#: view/settings-form.php:
|
1491 |
msgid "Shipping name"
|
1492 |
msgstr ""
|
1493 |
|
1494 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1495 |
msgid "Short Description"
|
1496 |
msgstr ""
|
1497 |
|
1498 |
-
#: view/settings-form.php:
|
1499 |
msgid "Skip fully refunded items"
|
1500 |
msgstr ""
|
1501 |
|
1502 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1503 |
msgid "SKU"
|
1504 |
msgstr ""
|
1505 |
|
1506 |
-
#:
|
|
|
|
|
|
|
|
|
1507 |
#, php-format
|
1508 |
msgid "Sort orders by %s in %s order"
|
1509 |
msgstr ""
|
@@ -1516,19 +1577,19 @@ msgstr ""
|
|
1516 |
msgid "Start tag"
|
1517 |
msgstr ""
|
1518 |
|
1519 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1520 |
msgid "State Code (Billing)"
|
1521 |
msgstr ""
|
1522 |
|
1523 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1524 |
msgid "State Code (Shipping)"
|
1525 |
msgstr ""
|
1526 |
|
1527 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1528 |
msgid "State Name (Billing)"
|
1529 |
msgstr ""
|
1530 |
|
1531 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1532 |
msgid "State Name (Shipping)"
|
1533 |
msgstr ""
|
1534 |
|
@@ -1536,11 +1597,11 @@ msgstr ""
|
|
1536 |
msgid "Status change jobs"
|
1537 |
msgstr ""
|
1538 |
|
1539 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1540 |
msgid "String"
|
1541 |
msgstr ""
|
1542 |
|
1543 |
-
#: view/settings-form.php:
|
1544 |
msgid "Strip tags from Product Description/Variation"
|
1545 |
msgstr ""
|
1546 |
|
@@ -1552,37 +1613,50 @@ msgstr ""
|
|
1552 |
msgid "Summary Report By Products"
|
1553 |
msgstr ""
|
1554 |
|
1555 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1556 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1557 |
msgid "Summary Report Total Amount"
|
1558 |
msgstr ""
|
1559 |
|
1560 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1561 |
msgid "Summary Report Total Amount Paid"
|
1562 |
msgstr ""
|
1563 |
|
1564 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
1565 |
msgid "Summary Report Total Discount"
|
1566 |
msgstr ""
|
1567 |
|
1568 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1569 |
msgid "Summary Report Total Orders"
|
1570 |
msgstr ""
|
1571 |
|
1572 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1573 |
msgid "Summary Report Total Quantity"
|
1574 |
msgstr ""
|
1575 |
|
1576 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1577 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1578 |
msgid "Summary Report Total Refund Amount"
|
1579 |
msgstr ""
|
1580 |
|
1581 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1582 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1583 |
msgid "Summary Report Total Refunds"
|
1584 |
msgstr ""
|
1585 |
|
|
|
|
|
|
|
|
|
1586 |
#: classes/admin/class-wc-order-export-manage.php:21
|
1587 |
msgid "Sun"
|
1588 |
msgstr ""
|
@@ -1591,46 +1665,50 @@ msgstr ""
|
|
1591 |
msgid "Support"
|
1592 |
msgstr ""
|
1593 |
|
1594 |
-
#: view/settings-form.php:
|
|
|
|
|
|
|
|
|
1595 |
msgid "Table header background color"
|
1596 |
msgstr ""
|
1597 |
|
1598 |
-
#: view/settings-form.php:
|
1599 |
msgid "Table header text color"
|
1600 |
msgstr ""
|
1601 |
|
1602 |
-
#: view/settings-form.php:
|
1603 |
msgid "Table row background color"
|
1604 |
msgstr ""
|
1605 |
|
1606 |
-
#: view/settings-form.php:
|
1607 |
msgid "Table row text color"
|
1608 |
msgstr ""
|
1609 |
|
1610 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1611 |
msgid "Tags"
|
1612 |
msgstr ""
|
1613 |
|
1614 |
-
#: view/settings-form.php:
|
1615 |
msgid "Tax name"
|
1616 |
msgstr ""
|
1617 |
|
1618 |
-
#: view/settings-form.php:
|
1619 |
msgid "Taxonomy"
|
1620 |
msgstr ""
|
1621 |
|
1622 |
-
#: classes/core/class-wc-order-export-engine.php:
|
1623 |
#, php-format
|
1624 |
msgid "The code you are trying to save produced a fatal error on line %d:"
|
1625 |
msgstr ""
|
1626 |
|
1627 |
-
#: view/settings-form.php:
|
1628 |
msgid ""
|
1629 |
"The filters won't work correctly.<br>Another plugin(or theme) has loaded "
|
1630 |
"outdated Select2.js"
|
1631 |
msgstr ""
|
1632 |
|
1633 |
-
#: view/settings-form.php:
|
1634 |
msgid ""
|
1635 |
"The plugin fetches meta keys from the existing orders. So you should create "
|
1636 |
"fake order if you've added new field just now."
|
@@ -1646,7 +1724,7 @@ msgstr ""
|
|
1646 |
msgid "This date range should not be saved in the scheduled task"
|
1647 |
msgstr ""
|
1648 |
|
1649 |
-
#: view/settings-form.php:
|
1650 |
msgid "This option cancels UI settings(above) and don't applied to Preview"
|
1651 |
msgstr ""
|
1652 |
|
@@ -1664,11 +1742,11 @@ msgstr ""
|
|
1664 |
msgid "Thu"
|
1665 |
msgstr ""
|
1666 |
|
1667 |
-
#: view/settings-form.php:
|
1668 |
msgid "Time"
|
1669 |
msgstr ""
|
1670 |
|
1671 |
-
#: classes/class-wc-order-export-admin.php:
|
1672 |
msgid "title is empty"
|
1673 |
msgstr ""
|
1674 |
|
@@ -1680,27 +1758,28 @@ msgstr ""
|
|
1680 |
msgid "Tools"
|
1681 |
msgstr ""
|
1682 |
|
1683 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1684 |
msgid "Total items"
|
1685 |
msgstr ""
|
1686 |
|
1687 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1688 |
msgid "Total products"
|
1689 |
msgstr ""
|
1690 |
|
1691 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1692 |
msgid "Total weight"
|
1693 |
msgstr ""
|
1694 |
|
1695 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
1696 |
msgid "Totals"
|
1697 |
msgstr ""
|
1698 |
|
1699 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1700 |
msgid "Transaction ID"
|
1701 |
msgstr ""
|
1702 |
|
1703 |
-
#: view/settings-form.php:
|
1704 |
msgid "TSV options"
|
1705 |
msgstr ""
|
1706 |
|
@@ -1708,29 +1787,29 @@ msgstr ""
|
|
1708 |
msgid "Tue"
|
1709 |
msgstr ""
|
1710 |
|
1711 |
-
#: view/settings-form.php:
|
1712 |
msgid "Turn off mode Summary report to export order fields"
|
1713 |
msgstr ""
|
1714 |
|
1715 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1716 |
msgid "Type"
|
1717 |
msgstr ""
|
1718 |
|
1719 |
-
#: classes/class-wc-order-export-admin.php:
|
1720 |
#, php-format
|
1721 |
msgid "Unknown AJAX method %s"
|
1722 |
msgstr ""
|
1723 |
|
1724 |
-
#: classes/class-wc-order-export-admin.php:
|
1725 |
#, php-format
|
1726 |
msgid "Unknown tab method %s"
|
1727 |
msgstr ""
|
1728 |
|
1729 |
-
#: classes/class-wc-order-export-admin.php:
|
1730 |
msgid "Unmark exported"
|
1731 |
msgstr ""
|
1732 |
|
1733 |
-
#: view/settings-form.php:
|
1734 |
msgid "Use only unnamed functions!"
|
1735 |
msgstr ""
|
1736 |
|
@@ -1738,36 +1817,37 @@ msgstr ""
|
|
1738 |
msgid "Use sheet name"
|
1739 |
msgstr ""
|
1740 |
|
1741 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
|
|
1742 |
msgid "User"
|
1743 |
msgstr ""
|
1744 |
|
1745 |
-
#: view/settings-form.php:
|
1746 |
msgid "User roles"
|
1747 |
msgstr ""
|
1748 |
|
1749 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1750 |
msgid "User Website"
|
1751 |
msgstr ""
|
1752 |
|
1753 |
-
#: view/settings-form.php:
|
1754 |
msgid "Usernames"
|
1755 |
msgstr ""
|
1756 |
|
1757 |
-
#: view/settings-form.php:
|
1758 |
-
#: view/settings-form.php:
|
1759 |
msgid "Value"
|
1760 |
msgstr ""
|
1761 |
|
1762 |
-
#: view/settings-form.php:
|
1763 |
msgid "Variable product attributes"
|
1764 |
msgstr ""
|
1765 |
|
1766 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1767 |
msgid "Variation Id"
|
1768 |
msgstr ""
|
1769 |
|
1770 |
-
#: view/settings-form.php:
|
1771 |
msgid "Vendors/creators"
|
1772 |
msgstr ""
|
1773 |
|
@@ -1775,15 +1855,15 @@ msgstr ""
|
|
1775 |
msgid "Wed"
|
1776 |
msgstr ""
|
1777 |
|
1778 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1779 |
msgid "Weight"
|
1780 |
msgstr ""
|
1781 |
|
1782 |
-
#: classes/core/class-wc-order-export-data-extractor-ui.php:
|
1783 |
msgid "Width"
|
1784 |
msgstr ""
|
1785 |
|
1786 |
-
#: classes/class-wc-order-export-admin.php:
|
1787 |
msgid "Wrong nonce"
|
1788 |
msgstr ""
|
1789 |
|
@@ -1795,10 +1875,18 @@ msgstr ""
|
|
1795 |
msgid "XML options"
|
1796 |
msgstr ""
|
1797 |
|
1798 |
-
#: view/settings-form.php:
|
1799 |
msgid "Yes"
|
1800 |
msgstr ""
|
1801 |
|
1802 |
-
#: classes/class-wc-order-export-admin.php:
|
1803 |
msgid "You can not do it"
|
1804 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Advanced Order Export For WooCommerce\n"
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
+
"POT-Creation-Date: 2019-11-08 12:42+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"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
"X-Generator: Loco https://localise.biz/\n"
|
16 |
+
"X-Loco-Version: 2.3.1; wp-5.2.4"
|
17 |
|
18 |
+
#: classes/class-wc-order-export-admin.php:505
|
19 |
#, php-format
|
20 |
msgid "%s order marked."
|
21 |
msgid_plural "%s orders marked."
|
22 |
msgstr[0] ""
|
23 |
msgstr[1] ""
|
24 |
|
25 |
+
#: classes/class-wc-order-export-admin.php:514
|
26 |
#, php-format
|
27 |
msgid "%s order unmarked."
|
28 |
msgid_plural "%s orders unmarked."
|
29 |
msgstr[0] ""
|
30 |
msgstr[1] ""
|
31 |
|
32 |
+
#: view/settings-form.php:46 view/settings-form.php:686
|
33 |
+
#: view/settings-form.php:712
|
34 |
msgid "-"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: view/settings-form.php:771
|
38 |
msgid "- don't modify -"
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: view/settings-form.php:551
|
42 |
msgid "0 - auto scale"
|
43 |
msgstr ""
|
44 |
|
46 |
msgid "1st row only"
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: classes/core/class-wc-order-export-data-extractor.php:1755
|
50 |
msgid "[Rest of the World]"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: view/settings-form.php:1466 view/settings-form.php:1477
|
54 |
msgid "Actions"
|
55 |
msgstr ""
|
56 |
|
63 |
msgid "Add %s fields"
|
64 |
msgstr ""
|
65 |
|
66 |
+
#: view/settings-form.php:1480
|
67 |
msgid "Add fee"
|
68 |
msgstr ""
|
69 |
|
70 |
+
#: view/settings-form.php:1469
|
71 |
msgid "Add field"
|
72 |
msgstr ""
|
73 |
|
74 |
+
#: view/settings-form.php:1483
|
75 |
msgid "Add shipping"
|
76 |
msgstr ""
|
77 |
|
78 |
+
#: view/settings-form.php:1472
|
79 |
msgid "Add static field"
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: view/settings-form.php:1486
|
83 |
msgid "Add tax"
|
84 |
msgstr ""
|
85 |
|
86 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:771
|
87 |
msgid "Address 1 (Billing)"
|
88 |
msgstr ""
|
89 |
|
90 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:861
|
91 |
msgid "Address 1 (Shipping)"
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:766
|
95 |
msgid "Address 1&2 (Billing)"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:856
|
99 |
msgid "Address 1&2 (Shipping)"
|
100 |
msgstr ""
|
101 |
|
102 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:776
|
103 |
msgid "Address 2 (Billing)"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:866
|
107 |
msgid "Address 2 (Shipping)"
|
108 |
msgstr ""
|
109 |
|
129 |
msgid "all rows"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: view/settings-form.php:1226
|
133 |
msgid "Any coupon used"
|
134 |
msgstr ""
|
135 |
|
145 |
msgid "as"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: view/settings-form.php:755
|
149 |
msgid "Ascending"
|
150 |
msgstr ""
|
151 |
|
153 |
msgid "Auto column width"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1248
|
157 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1271
|
158 |
msgid "Billing Address"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: view/settings-form.php:1250
|
162 |
msgid "Billing locations"
|
163 |
msgstr ""
|
164 |
|
181 |
msgid "can not open for output"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: classes/admin/tabs/ajax/trait-wc-order-export-admin-tab-abstract-ajax-export.php:42
|
185 |
msgid "Can't create temporary file"
|
186 |
msgstr ""
|
187 |
|
189 |
msgid "Can't find exported file"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: view/settings-form.php:1523 view/settings-form.php:1544
|
193 |
+
#: view/settings-form.php:1580 view/settings-form.php:1619
|
194 |
+
#: view/settings-form.php:1649 view/settings-form.php:1671
|
195 |
+
#: view/settings-form.php:1697 view/settings-form.php:1720
|
196 |
+
#: view/settings-form.php:1742 view/settings-form.php:1764
|
197 |
+
#: view/settings-form.php:1786
|
198 |
msgid "Cancel"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1254
|
202 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1278
|
203 |
msgid "Cart"
|
204 |
msgstr ""
|
205 |
|
206 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1087
|
207 |
msgid "Cart Discount Amount"
|
208 |
msgstr ""
|
209 |
|
210 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1092
|
211 |
msgid "Cart Discount Amount Tax"
|
212 |
msgstr ""
|
213 |
|
214 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:400
|
215 |
msgid "Category"
|
216 |
msgstr ""
|
217 |
|
218 |
+
#: view/settings-form.php:438
|
219 |
msgid "Center align"
|
220 |
msgstr ""
|
221 |
|
222 |
+
#: view/settings-form.php:766
|
223 |
msgid "Change order status to"
|
224 |
msgstr ""
|
225 |
|
226 |
+
#: view/settings-form.php:316 view/settings-form.php:386
|
227 |
msgid "Character encoding"
|
228 |
msgstr ""
|
229 |
|
230 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:781
|
231 |
msgid "City (Billing)"
|
232 |
msgstr ""
|
233 |
|
234 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:871
|
235 |
msgid "City (Shipping)"
|
236 |
msgstr ""
|
237 |
|
238 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:796
|
239 |
msgid "City, State Zip (Billing)"
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:886
|
243 |
msgid "City, State Zip (Shipping)"
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:791
|
247 |
msgid "City, State, Zip (Billing)"
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:881
|
251 |
msgid "City, State, Zip (Shipping)"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: view/settings-form.php:813
|
255 |
msgid "Cleanup phone (export only digits)"
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: view/settings-form.php:1865
|
259 |
msgid "Click here to download"
|
260 |
msgstr ""
|
261 |
|
263 |
msgid "code snippets"
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: view/settings-form.php:1513 view/settings-form.php:1529
|
267 |
+
#: view/settings-form.php:1570 view/settings-form.php:1611
|
268 |
+
#: view/settings-form.php:1641 view/settings-form.php:1655
|
269 |
+
#: view/settings-form.php:1688 view/settings-form.php:1703
|
270 |
+
#: view/settings-form.php:1732 view/settings-form.php:1754
|
271 |
+
#: view/settings-form.php:1776
|
272 |
msgid "Column name"
|
273 |
msgstr ""
|
274 |
|
276 |
msgid "columns"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: view/settings-form.php:595
|
280 |
msgid "Columns align"
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: view/settings-form.php:467
|
284 |
+
msgid "Columns horizontal align"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: view/settings-form.php:478
|
288 |
+
msgid "Columns vertical align"
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: view/settings-form.php:457
|
292 |
msgid "Columns width"
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: view/settings-form.php:458 view/settings-form.php:596
|
|
|
296 |
msgid "comma separated list"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1246
|
300 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1269
|
301 |
msgid "Common"
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:761
|
305 |
msgid "Company (Billing)"
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:851
|
309 |
msgid "Company (Shipping)"
|
310 |
msgstr ""
|
311 |
|
312 |
#: view/settings-form.php:167
|
313 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:616
|
314 |
msgid "Completed Date"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: view/settings-form.php:1521 view/settings-form.php:1542
|
318 |
+
#: view/settings-form.php:1578 view/settings-form.php:1617
|
319 |
+
#: view/settings-form.php:1647 view/settings-form.php:1669
|
320 |
+
#: view/settings-form.php:1695 view/settings-form.php:1717
|
321 |
+
#: view/settings-form.php:1739 view/settings-form.php:1761
|
322 |
+
#: view/settings-form.php:1783
|
323 |
msgid "Confirm"
|
324 |
msgstr ""
|
325 |
|
333 |
"install."
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:811
|
337 |
msgid "Country Code (Billing)"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:901
|
341 |
msgid "Country Code (Shipping)"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:816
|
345 |
msgid "Country Name (Billing)"
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:906
|
349 |
msgid "Country Name (Shipping)"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:536
|
353 |
msgid "Coupon Amount"
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:507
|
357 |
msgid "Coupon Code"
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:527
|
361 |
msgid "Coupon Description"
|
362 |
msgstr ""
|
363 |
|
365 |
msgid "Coupon tag"
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:531
|
369 |
msgid "Coupon Type"
|
370 |
msgstr ""
|
371 |
|
372 |
+
#: view/settings-form.php:1229
|
373 |
+
#: classes/admin/class-wc-order-export-manage.php:703
|
374 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1061
|
375 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1252
|
376 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1276
|
377 |
msgid "Coupons"
|
378 |
msgstr ""
|
379 |
|
381 |
msgid "coupons"
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1082
|
385 |
msgid "Coupons Used"
|
386 |
msgstr ""
|
387 |
|
389 |
msgid "CSV options"
|
390 |
msgstr ""
|
391 |
|
392 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:611
|
393 |
msgid "Currency"
|
394 |
msgstr ""
|
395 |
|
396 |
+
#: view/settings-form.php:690 view/settings-form.php:716
|
397 |
msgid "custom"
|
398 |
msgstr ""
|
399 |
|
400 |
+
#: view/settings-form.php:661
|
401 |
msgid "Custom css"
|
402 |
msgstr ""
|
403 |
|
404 |
+
#: view/settings-form.php:882 view/settings-form.php:1179
|
405 |
msgid "Custom fields"
|
406 |
msgstr ""
|
407 |
|
408 |
+
#: view/settings-form.php:825
|
409 |
msgid "Custom PHP code to modify output"
|
410 |
msgstr ""
|
411 |
|
412 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:686
|
413 |
msgid "Customer first order date"
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:651
|
417 |
msgid "Customer IP address"
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:691
|
421 |
msgid "Customer last order date"
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:631
|
425 |
msgid "Customer Note"
|
426 |
msgstr ""
|
427 |
|
428 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:676
|
429 |
msgid "Customer Role"
|
430 |
msgstr ""
|
431 |
|
432 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:681
|
433 |
msgid "Customer Total Orders"
|
434 |
msgstr ""
|
435 |
|
436 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:671
|
437 |
msgid "Customer User Email"
|
438 |
msgstr ""
|
439 |
|
440 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:656
|
441 |
msgid "Customer User ID"
|
442 |
msgstr ""
|
443 |
|
444 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:661
|
445 |
msgid "Customer Username"
|
446 |
msgstr ""
|
447 |
|
448 |
+
#: view/settings-form.php:672
|
449 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1290
|
450 |
msgid "Date"
|
451 |
msgstr ""
|
452 |
|
453 |
+
#: classes/class-wc-order-export-admin.php:296
|
454 |
msgid "Date From is greater than Date To"
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:626
|
458 |
msgid "Date of first refund"
|
459 |
msgstr ""
|
460 |
|
462 |
msgid "Date range"
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: view/settings-form.php:753
|
466 |
msgid "Descending"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:450
|
470 |
msgid "Description"
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:512
|
474 |
msgid "Discount Amount"
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:522
|
478 |
msgid "Discount Amount + Tax"
|
479 |
msgstr ""
|
480 |
|
481 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:517
|
482 |
msgid "Discount Amount Tax"
|
483 |
msgstr ""
|
484 |
|
486 |
msgid "Docs"
|
487 |
msgstr ""
|
488 |
|
489 |
+
#: view/settings-form.php:362
|
490 |
+
msgid "Don't escape /"
|
491 |
+
msgstr ""
|
492 |
+
|
493 |
+
#: view/settings-form.php:856
|
494 |
msgid "Don't export child orders"
|
495 |
msgstr ""
|
496 |
|
501 |
"reduce reply time :)"
|
502 |
msgstr ""
|
503 |
|
504 |
+
#: classes/core/class-wc-order-export-engine.php:348
|
505 |
msgid "Don't Panic"
|
506 |
msgstr ""
|
507 |
|
508 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:435
|
509 |
msgid "Download URL"
|
510 |
msgstr ""
|
511 |
|
512 |
+
#: view/settings-form.php:1434
|
513 |
msgid "Drag rows to reorder exported fields"
|
514 |
msgstr ""
|
515 |
|
516 |
+
#: classes/core/class-wc-order-export-order-fields.php:369
|
517 |
msgid "Edit order"
|
518 |
msgstr ""
|
519 |
|
520 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:821
|
521 |
msgid "Email (Billing)"
|
522 |
msgstr ""
|
523 |
|
524 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:475
|
525 |
msgid "Embedded Product Image"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: classes/class-wc-order-export-admin.php:300
|
529 |
+
#: classes/core/class-wc-order-export-data-extractor.php:315
|
530 |
msgid "empty"
|
531 |
msgstr ""
|
532 |
|
538 |
msgid "empty meta key"
|
539 |
msgstr ""
|
540 |
|
541 |
+
#: classes/class-wc-order-export-admin.php:400
|
542 |
msgid "Empty method"
|
543 |
msgstr ""
|
544 |
|
545 |
+
#: classes/class-wc-order-export-admin.php:294
|
546 |
msgid "empty value"
|
547 |
msgstr ""
|
548 |
|
549 |
+
#: view/settings-form.php:819
|
550 |
msgid "Enable debug output"
|
551 |
msgstr ""
|
552 |
|
554 |
msgid "Enclosure"
|
555 |
msgstr ""
|
556 |
|
557 |
+
#: view/settings-form.php:367
|
558 |
+
msgid "Encode numeric strings as numbers"
|
559 |
+
msgstr ""
|
560 |
+
|
561 |
#: view/settings-form.php:357
|
562 |
msgid "End tag"
|
563 |
msgstr ""
|
564 |
|
565 |
+
#: view/settings-form.php:1129
|
566 |
msgid "Exclude products"
|
567 |
msgstr ""
|
568 |
|
569 |
+
#: view/settings-form.php:1834
|
570 |
msgid "Export"
|
571 |
msgstr ""
|
572 |
|
573 |
+
#: view/settings-form.php:1838
|
574 |
msgid "Export [w/o progressbar]"
|
575 |
msgstr ""
|
576 |
|
577 |
+
#: view/settings-form.php:795
|
578 |
msgid "Export all order notes"
|
579 |
msgstr ""
|
580 |
|
581 |
+
#: view/settings-form.php:932
|
582 |
msgid "Export all products from the order"
|
583 |
msgstr ""
|
584 |
|
585 |
+
#: classes/class-wc-order-export-admin.php:450
|
586 |
#, php-format
|
587 |
msgid "Export as %s"
|
588 |
msgstr ""
|
611 |
msgid "Export orders from WooCommerce with ease (Excel/CSV/XML/JSON supported)"
|
612 |
msgstr ""
|
613 |
|
614 |
+
#: view/settings-form.php:801
|
615 |
msgid "Export refund notes as Customer Note"
|
616 |
msgstr ""
|
617 |
|
618 |
+
#: view/settings-form.php:860
|
619 |
msgid "Export refunds"
|
620 |
msgstr ""
|
621 |
|
627 |
msgid "Export Status"
|
628 |
msgstr ""
|
629 |
|
630 |
+
#: view/settings-form.php:1850
|
631 |
#, php-format
|
632 |
msgid "Export total: %s orders"
|
633 |
msgstr ""
|
634 |
|
635 |
+
#: view/settings-form.php:868
|
636 |
msgid "Export unmarked orders only"
|
637 |
msgstr ""
|
638 |
|
639 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1045
|
640 |
msgid "Exported items"
|
641 |
msgstr ""
|
642 |
|
644 |
msgid "Express export"
|
645 |
msgstr ""
|
646 |
|
647 |
+
#: view/settings-form.php:1726
|
648 |
msgid "Fee name"
|
649 |
msgstr ""
|
650 |
|
660 |
msgid "Fill order columns for"
|
661 |
msgstr ""
|
662 |
|
663 |
+
#: view/settings-form.php:1247
|
664 |
msgid "Filter by billing"
|
665 |
msgstr ""
|
666 |
|
667 |
+
#: view/settings-form.php:1220
|
668 |
msgid "Filter by coupon"
|
669 |
msgstr ""
|
670 |
|
671 |
+
#: view/settings-form.php:1150
|
672 |
msgid "Filter by customer"
|
673 |
msgstr ""
|
674 |
|
675 |
+
#: view/settings-form.php:1341
|
676 |
msgid "Filter by item and metadata"
|
677 |
msgstr ""
|
678 |
|
679 |
+
#: view/settings-form.php:851
|
680 |
msgid "Filter by order"
|
681 |
msgstr ""
|
682 |
|
683 |
+
#: view/settings-form.php:927
|
684 |
msgid "Filter by product"
|
685 |
msgstr ""
|
686 |
|
687 |
+
#: view/settings-form.php:1294
|
688 |
msgid "Filter by shipping"
|
689 |
msgstr ""
|
690 |
|
692 |
msgid "Filter orders by"
|
693 |
msgstr ""
|
694 |
|
695 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:746
|
696 |
msgid "First Name (Billing)"
|
697 |
msgstr ""
|
698 |
|
699 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:836
|
700 |
msgid "First Name (Shipping)"
|
701 |
msgstr ""
|
702 |
|
703 |
+
#: view/settings-form.php:472
|
704 |
msgid "Fit table to page width"
|
705 |
msgstr ""
|
706 |
|
707 |
+
#: view/settings-form.php:428 view/settings-form.php:589
|
708 |
msgid "Font size"
|
709 |
msgstr ""
|
710 |
|
711 |
+
#: view/settings-form.php:605
|
712 |
msgid "Footer text"
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: view/settings-form.php:637
|
716 |
msgid "Footer text color"
|
717 |
msgstr ""
|
718 |
|
724 |
msgid "Format"
|
725 |
msgstr ""
|
726 |
|
727 |
+
#: view/settings-form.php:789
|
728 |
msgid "Format numbers (use WC decimal separator)"
|
729 |
msgstr ""
|
730 |
|
732 |
msgid "Fri"
|
733 |
msgstr ""
|
734 |
|
735 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:756
|
736 |
msgid "Full Name (Billing)"
|
737 |
msgstr ""
|
738 |
|
739 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:846
|
740 |
msgid "Full Name (Shipping)"
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:460
|
744 |
msgid "Full names for categories"
|
745 |
msgstr ""
|
746 |
|
752 |
msgid "Grouping by product"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: view/settings-form.php:600
|
756 |
msgid "Header text"
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: view/settings-form.php:632
|
760 |
msgid "Header text color"
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:420
|
764 |
msgid "Height"
|
765 |
msgstr ""
|
766 |
|
772 |
msgid "helpdesk system"
|
773 |
msgstr ""
|
774 |
|
775 |
+
#: view/settings-form.php:1509 view/settings-form.php:1566
|
776 |
+
#: view/settings-form.php:1595 view/settings-form.php:1636
|
777 |
+
#: view/settings-form.php:1679
|
778 |
msgid "Hide unused fields"
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: view/settings-form.php:573
|
782 |
msgid "Html options"
|
783 |
msgstr ""
|
784 |
|
786 |
msgid "https://algolplus.com/"
|
787 |
msgstr ""
|
788 |
|
789 |
+
#: view/settings-form.php:1814
|
790 |
#, php-format
|
791 |
msgid ""
|
792 |
"If you see this message after page load, user interface won't work correctly!"
|
794 |
"it). Probably, it's a conflict with another plugin or active theme."
|
795 |
msgstr ""
|
796 |
|
797 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1291
|
798 |
msgid "Image"
|
799 |
msgstr ""
|
800 |
|
801 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:440
|
802 |
msgid "Image URL"
|
803 |
msgstr ""
|
804 |
|
805 |
+
#: view/settings-form.php:275 view/settings-form.php:565
|
806 |
+
#: view/settings-form.php:650
|
807 |
msgid "Images height"
|
808 |
msgstr ""
|
809 |
|
810 |
+
#: view/settings-form.php:268 view/settings-form.php:558
|
811 |
+
#: view/settings-form.php:643
|
812 |
msgid "Images width"
|
813 |
msgstr ""
|
814 |
|
820 |
msgid "Import settings"
|
821 |
msgstr ""
|
822 |
|
823 |
+
#: view/settings-form.php:1839
|
824 |
msgid "It might not work for huge datasets!"
|
825 |
msgstr ""
|
826 |
|
827 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:933
|
828 |
msgid "Item #"
|
829 |
msgstr ""
|
830 |
|
831 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:953
|
832 |
msgid "Item Cost"
|
833 |
msgstr ""
|
834 |
|
835 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1008
|
836 |
msgid "Item Discount Amount"
|
837 |
msgstr ""
|
838 |
|
839 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1018
|
840 |
msgid "Item download URL"
|
841 |
msgstr ""
|
842 |
|
843 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:928
|
844 |
msgid "Item ID"
|
845 |
msgstr ""
|
846 |
|
847 |
+
#: view/settings-form.php:1094
|
848 |
msgid "Item meta data"
|
849 |
msgstr ""
|
850 |
|
851 |
+
#: view/settings-form.php:1374
|
852 |
msgid "Item metadata"
|
853 |
msgstr ""
|
854 |
|
855 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:938
|
856 |
msgid "Item Name"
|
857 |
msgstr ""
|
858 |
|
859 |
+
#: view/settings-form.php:1344
|
860 |
msgid "Item names"
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1013
|
|
|
|
|
|
|
|
|
864 |
msgid "Item Tax Rate"
|
865 |
msgstr ""
|
866 |
|
872 |
msgid "Just click inside the textarea and copy (Ctrl+C)"
|
873 |
msgstr ""
|
874 |
|
875 |
+
#: view/settings-form.php:468
|
876 |
+
msgid "L,C or R. Comma separated list"
|
877 |
+
msgstr ""
|
878 |
+
|
879 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:751
|
880 |
msgid "Last Name (Billing)"
|
881 |
msgstr ""
|
882 |
|
883 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:841
|
884 |
msgid "Last Name (Shipping)"
|
885 |
msgstr ""
|
886 |
|
887 |
+
#: view/settings-form.php:437
|
888 |
msgid "Left align"
|
889 |
msgstr ""
|
890 |
|
891 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:415
|
892 |
msgid "Length"
|
893 |
msgstr ""
|
894 |
|
895 |
+
#: view/settings-form.php:311 view/settings-form.php:381
|
896 |
msgid "Line Break"
|
897 |
msgstr ""
|
898 |
|
899 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:576
|
900 |
msgid "Line number"
|
901 |
msgstr ""
|
902 |
|
903 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:641
|
904 |
msgid "Link to edit order"
|
905 |
msgstr ""
|
906 |
|
907 |
+
#: view/settings-form.php:536
|
908 |
msgid "Logo align"
|
909 |
msgstr ""
|
910 |
|
911 |
+
#: view/settings-form.php:544
|
912 |
msgid "Logo height"
|
913 |
msgstr ""
|
914 |
|
915 |
+
#: view/settings-form.php:550
|
916 |
msgid "Logo width"
|
917 |
msgstr ""
|
918 |
|
922 |
"Look at %s for popular plugins or check %s to study how to extend the plugin."
|
923 |
msgstr ""
|
924 |
|
925 |
+
#: classes/core/class-wc-order-export-engine.php:480
|
926 |
msgid "Main SQL queries are listed below"
|
927 |
msgstr ""
|
928 |
|
929 |
+
#: classes/class-wc-order-export-admin.php:456
|
930 |
msgid "Mark exported"
|
931 |
msgstr ""
|
932 |
|
933 |
+
#: view/settings-form.php:864
|
934 |
msgid "Mark exported orders"
|
935 |
msgstr ""
|
936 |
|
937 |
+
#: view/settings-form.php:1493 view/settings-form.php:1550
|
938 |
+
#: view/settings-form.php:1676
|
939 |
msgid "Meta key"
|
940 |
msgstr ""
|
941 |
|
942 |
+
#: view/settings-form.php:1821
|
943 |
msgid "Might be different from actual export!"
|
944 |
msgstr ""
|
945 |
|
946 |
+
#: view/settings-form.php:783
|
947 |
msgid "Misc settings"
|
948 |
msgstr ""
|
949 |
|
950 |
+
#: view/settings-form.php:153 view/settings-form.php:731
|
951 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:601
|
952 |
msgid "Modification Date"
|
953 |
msgstr ""
|
954 |
|
956 |
msgid "Mon"
|
957 |
msgstr ""
|
958 |
|
959 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1288
|
960 |
msgid "Money"
|
961 |
msgstr ""
|
962 |
|
964 |
msgid "Need help? Create ticket in"
|
965 |
msgstr ""
|
966 |
|
967 |
+
#: view/settings-form.php:474
|
968 |
msgid "No"
|
969 |
msgstr ""
|
970 |
|
971 |
+
#: view/settings-form.php:444
|
972 |
msgid "No page numbers"
|
973 |
msgstr ""
|
974 |
|
975 |
#: classes/formats/abstract-class-woe-formatter-sv.php:102
|
976 |
+
#: classes/formats/class-woe-formatter-html.php:137
|
977 |
#: classes/formats/class-woe-formatter-xls.php:241
|
978 |
msgid "No results"
|
979 |
msgstr ""
|
980 |
|
981 |
+
#: classes/class-wc-order-export-admin.php:298
|
982 |
+
#: classes/admin/tabs/ajax/trait-wc-order-export-admin-tab-abstract-ajax-export.php:104
|
983 |
msgid "Nothing to export. Please, adjust your filters"
|
984 |
msgstr ""
|
985 |
|
986 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1289
|
987 |
msgid "Number"
|
988 |
msgstr ""
|
989 |
|
991 |
msgid "one row"
|
992 |
msgstr ""
|
993 |
|
994 |
+
#: view/settings-form.php:1598
|
995 |
msgid "OR"
|
996 |
msgstr ""
|
997 |
|
998 |
+
#: view/settings-form.php:1504 view/settings-form.php:1561
|
999 |
+
#: view/settings-form.php:1590 view/settings-form.php:1631
|
1000 |
+
#: view/settings-form.php:1685
|
1001 |
msgid "or type meta key here"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
+
#: view/settings-form.php:146 view/settings-form.php:730
|
1005 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:596
|
1006 |
msgid "Order Date"
|
1007 |
msgstr ""
|
1008 |
|
1009 |
+
#: view/settings-form.php:729
|
1010 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:581
|
1011 |
msgid "Order ID"
|
1012 |
msgstr ""
|
1013 |
|
1014 |
+
#: view/settings-form.php:1626
|
1015 |
msgid "Order item fields"
|
1016 |
msgstr ""
|
1017 |
|
1018 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:958
|
1019 |
msgid "Order Line (w/o tax)"
|
1020 |
msgstr ""
|
1021 |
|
1022 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:978
|
1023 |
msgid "Order Line Subtotal"
|
1024 |
msgstr ""
|
1025 |
|
1026 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:983
|
1027 |
msgid "Order Line Subtotal Tax"
|
1028 |
msgstr ""
|
1029 |
|
1030 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:963
|
1031 |
msgid "Order Line Tax"
|
1032 |
msgstr ""
|
1033 |
|
1034 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:973
|
1035 |
msgid "Order Line Tax (- Refund)"
|
1036 |
msgstr ""
|
1037 |
|
1038 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:968
|
1039 |
msgid "Order Line Tax Refunded"
|
1040 |
msgstr ""
|
1041 |
|
1042 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:988
|
1043 |
msgid "Order Line Total"
|
1044 |
msgstr ""
|
1045 |
|
1046 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1003
|
1047 |
msgid "Order Line Total (- Refund)"
|
1048 |
msgstr ""
|
1049 |
|
1050 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:993
|
1051 |
msgid "Order Line Total (include tax)"
|
1052 |
msgstr ""
|
1053 |
|
1054 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:998
|
1055 |
msgid "Order Line Total Refunded"
|
1056 |
msgstr ""
|
1057 |
|
1058 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:636
|
1059 |
msgid "Order Notes"
|
1060 |
msgstr ""
|
1061 |
|
1062 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:586
|
1063 |
msgid "Order Number"
|
1064 |
msgstr ""
|
1065 |
|
1067 |
msgid "Order Refund"
|
1068 |
msgstr ""
|
1069 |
|
1070 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1187
|
1071 |
msgid "Order Refund Amount"
|
1072 |
msgstr ""
|
1073 |
|
1074 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1147
|
1075 |
msgid "Order Shipping + Tax Amount"
|
1076 |
msgstr ""
|
1077 |
|
1078 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1142
|
1079 |
msgid "Order Shipping Amount"
|
1080 |
msgstr ""
|
1081 |
|
1082 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1157
|
1083 |
msgid "Order Shipping Amount (- Refund)"
|
1084 |
msgstr ""
|
1085 |
|
1086 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1152
|
1087 |
msgid "Order Shipping Amount Refunded"
|
1088 |
msgstr ""
|
1089 |
|
1090 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1162
|
1091 |
msgid "Order Shipping Tax Amount"
|
1092 |
msgstr ""
|
1093 |
|
1094 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1172
|
1095 |
msgid "Order Shipping Tax Amount (- Refund)"
|
1096 |
msgstr ""
|
1097 |
|
1098 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1167
|
1099 |
msgid "Order Shipping Tax Refunded"
|
1100 |
msgstr ""
|
1101 |
|
1102 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:591
|
1103 |
msgid "Order Status"
|
1104 |
msgstr ""
|
1105 |
|
1106 |
+
#: view/settings-form.php:732
|
1107 |
msgid "Order status"
|
1108 |
msgstr ""
|
1109 |
|
1110 |
+
#: view/settings-form.php:870
|
1111 |
msgid "Order statuses"
|
1112 |
msgstr ""
|
1113 |
|
1115 |
msgid "Order Subscription"
|
1116 |
msgstr ""
|
1117 |
|
1118 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1102
|
1119 |
msgid "Order Subtotal - Cart Discount"
|
1120 |
msgstr ""
|
1121 |
|
1122 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1097
|
1123 |
msgid "Order Subtotal Amount"
|
1124 |
msgstr ""
|
1125 |
|
1126 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1112
|
1127 |
msgid "Order Subtotal Amount (- Refund)"
|
1128 |
msgstr ""
|
1129 |
|
1130 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1107
|
1131 |
msgid "Order Subtotal Amount Refunded"
|
1132 |
msgstr ""
|
1133 |
|
1135 |
msgid "Order tag"
|
1136 |
msgstr ""
|
1137 |
|
1138 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1117
|
1139 |
msgid "Order Tax Amount"
|
1140 |
msgstr ""
|
1141 |
|
1142 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1197
|
1143 |
msgid "Order Total Amount"
|
1144 |
msgstr ""
|
1145 |
|
1146 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1192
|
1147 |
msgid "Order Total Amount (- Refund)"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1202
|
1151 |
msgid "Order Total Amount without Tax"
|
1152 |
msgstr ""
|
1153 |
|
1154 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1182
|
1155 |
msgid "Order Total Fee"
|
1156 |
msgstr ""
|
1157 |
|
1158 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1207
|
1159 |
msgid "Order Total Tax Amount"
|
1160 |
msgstr ""
|
1161 |
|
1162 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1217
|
1163 |
msgid "Order Total Tax Amount (- Refund)"
|
1164 |
msgstr ""
|
1165 |
|
1166 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1212
|
1167 |
msgid "Order Total Tax Amount Refunded"
|
1168 |
msgstr ""
|
1169 |
|
1172 |
msgstr ""
|
1173 |
|
1174 |
#: classes/formats/class-woe-formatter-xls.php:132
|
1175 |
+
#: classes/admin/class-wc-order-export-manage.php:239
|
1176 |
msgid "Orders"
|
1177 |
msgstr ""
|
1178 |
|
1179 |
+
#: view/settings-form.php:410
|
1180 |
msgid "Orientation"
|
1181 |
msgstr ""
|
1182 |
|
1183 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1253
|
1184 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1277
|
1185 |
msgid "Other items"
|
1186 |
msgstr ""
|
1187 |
|
1188 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1257
|
1189 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1281
|
1190 |
msgid "Others"
|
1191 |
msgstr ""
|
1192 |
|
1193 |
#: view/settings-form.php:253 view/settings-form.php:294
|
1194 |
+
#: view/settings-form.php:380 view/settings-form.php:399
|
1195 |
+
#: view/settings-form.php:579
|
1196 |
msgid "Output column titles as first line"
|
1197 |
msgstr ""
|
1198 |
|
1199 |
+
#: view/settings-form.php:290 view/settings-form.php:376
|
1200 |
msgid "Output UTF-8 BOM"
|
1201 |
msgstr ""
|
1202 |
|
1203 |
+
#: classes/FPDF/class-woe-pdf-mc-table.php:168
|
1204 |
+
#, php-format
|
1205 |
+
msgid "Page %s / %s"
|
1206 |
+
msgstr ""
|
1207 |
+
|
1208 |
+
#: view/settings-form.php:462
|
1209 |
msgid "Page footer text"
|
1210 |
msgstr ""
|
1211 |
|
1212 |
+
#: view/settings-form.php:512
|
1213 |
msgid "Page footer text color"
|
1214 |
msgstr ""
|
1215 |
|
1216 |
+
#: view/settings-form.php:452
|
1217 |
msgid "Page header text"
|
1218 |
msgstr ""
|
1219 |
|
1220 |
+
#: view/settings-form.php:507
|
1221 |
msgid "Page header text color"
|
1222 |
msgstr ""
|
1223 |
|
1224 |
+
#: view/settings-form.php:434
|
1225 |
msgid "Page numbers"
|
1226 |
msgstr ""
|
1227 |
|
1228 |
+
#: view/settings-form.php:419
|
1229 |
msgid "Page size"
|
1230 |
msgstr ""
|
1231 |
|
1232 |
#: view/settings-form.php:160
|
1233 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:621
|
1234 |
msgid "Paid Date"
|
1235 |
msgstr ""
|
1236 |
|
1240 |
"install."
|
1241 |
msgstr ""
|
1242 |
|
1243 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1077
|
1244 |
msgid "Payment Method"
|
1245 |
msgstr ""
|
1246 |
|
1247 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1072
|
1248 |
msgid "Payment Method Title"
|
1249 |
msgstr ""
|
1250 |
|
1251 |
+
#: view/settings-form.php:1278
|
1252 |
msgid "Payment methods"
|
1253 |
msgstr ""
|
1254 |
|
1255 |
+
#: view/settings-form.php:393
|
1256 |
msgid "PDF options"
|
1257 |
msgstr ""
|
1258 |
|
1259 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:826
|
1260 |
msgid "Phone (Billing)"
|
1261 |
msgstr ""
|
1262 |
|
1263 |
+
#: view/settings-form.php:830
|
1264 |
msgid ""
|
1265 |
"Please check permissions for your role. You must have capability "
|
1266 |
"“edit_themes” to use this box."
|
1280 |
msgid "Please, install/enable PHP XML extension!"
|
1281 |
msgstr ""
|
1282 |
|
1283 |
+
#: classes/class-wc-order-export-admin.php:297
|
1284 |
msgid "Please, set up fields to export"
|
1285 |
msgstr ""
|
1286 |
|
1287 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:806
|
1288 |
msgid "Postcode (Billing)"
|
1289 |
msgstr ""
|
1290 |
|
1291 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:896
|
1292 |
msgid "Postcode (Shipping)"
|
1293 |
msgstr ""
|
1294 |
|
1296 |
msgid "Prepend XML"
|
1297 |
msgstr ""
|
1298 |
|
1299 |
+
#: view/settings-form.php:1864
|
1300 |
msgid "Press 'Esc' to cancel the export"
|
1301 |
msgstr ""
|
1302 |
|
1303 |
+
#: view/settings-form.php:1820
|
1304 |
msgid "Preview"
|
1305 |
msgstr ""
|
1306 |
|
1307 |
+
#: view/settings-form.php:1852
|
1308 |
msgid "Preview size"
|
1309 |
msgstr ""
|
1310 |
|
1313 |
msgid "Pro version"
|
1314 |
msgstr ""
|
1315 |
|
1316 |
+
#: view/settings-form.php:938
|
1317 |
msgid "Product categories"
|
1318 |
msgstr ""
|
1319 |
|
1320 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:390
|
1321 |
msgid "Product Current Price"
|
1322 |
msgstr ""
|
1323 |
|
1324 |
+
#: view/settings-form.php:1024
|
1325 |
msgid "Product custom fields"
|
1326 |
msgstr ""
|
1327 |
|
1328 |
+
#: view/settings-form.php:1585
|
1329 |
msgid "Product fields"
|
1330 |
msgstr ""
|
1331 |
|
1332 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:360
|
1333 |
msgid "Product Id"
|
1334 |
msgstr ""
|
1335 |
|
1336 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1274
|
1337 |
+
msgid "Product items"
|
1338 |
+
msgstr ""
|
1339 |
+
|
1340 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:365
|
1341 |
msgid "Product Name"
|
1342 |
msgstr ""
|
1343 |
|
1344 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:370
|
1345 |
msgid "Product Name (main)"
|
1346 |
msgstr ""
|
1347 |
|
1349 |
msgid "Product rows start with a new line"
|
1350 |
msgstr ""
|
1351 |
|
1352 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:385
|
1353 |
+
msgid "Product Seller"
|
1354 |
+
msgstr ""
|
1355 |
+
|
1356 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:445
|
1357 |
msgid "Product Shipping Class"
|
1358 |
msgstr ""
|
1359 |
|
1360 |
+
#: view/settings-form.php:987
|
1361 |
+
msgid "Product SKU"
|
1362 |
+
msgstr ""
|
1363 |
+
|
1364 |
#: view/settings-form.php:337
|
1365 |
msgid "Product tag"
|
1366 |
msgstr ""
|
1367 |
|
1368 |
+
#: view/settings-form.php:992
|
1369 |
msgid "Product taxonomies"
|
1370 |
msgstr ""
|
1371 |
|
1372 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1251
|
1373 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1275
|
1374 |
+
msgid "Product totals"
|
1375 |
+
msgstr ""
|
1376 |
+
|
1377 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:430
|
1378 |
msgid "Product URL"
|
1379 |
msgstr ""
|
1380 |
|
1381 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:380
|
1382 |
msgid "Product Variation"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
+
#: view/settings-form.php:972
|
1386 |
+
#: classes/admin/class-wc-order-export-manage.php:660
|
1387 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:917
|
1388 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1250
|
1389 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1273
|
1390 |
msgid "Products"
|
1391 |
msgstr ""
|
1392 |
|
1402 |
msgid "Profiles"
|
1403 |
msgstr ""
|
1404 |
|
1405 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:943
|
1406 |
msgid "Quantity"
|
1407 |
msgstr ""
|
1408 |
|
1409 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:948
|
1410 |
msgid "Quantity (- Refund)"
|
1411 |
msgstr ""
|
1412 |
|
1413 |
+
#: view/settings-form.php:835
|
1414 |
msgid "Read how to fix it"
|
1415 |
msgstr ""
|
1416 |
|
1417 |
+
#: view/settings-form.php:1440
|
1418 |
msgid "Remove all fields"
|
1419 |
msgstr ""
|
1420 |
|
1422 |
msgid "Remove all fields?"
|
1423 |
msgstr ""
|
1424 |
|
1425 |
+
#: view/settings-form.php:533
|
1426 |
msgid "Remove logo"
|
1427 |
msgstr ""
|
1428 |
|
1429 |
+
#: view/settings-form.php:406
|
1430 |
msgid "repeat at each page"
|
1431 |
msgstr ""
|
1432 |
|
1433 |
+
#: view/settings-form.php:585
|
1434 |
msgid "repeat header as last line"
|
1435 |
msgstr ""
|
1436 |
|
1437 |
+
#: view/settings-form.php:1846
|
1438 |
msgid "Reset settings"
|
1439 |
msgstr ""
|
1440 |
|
1441 |
+
#: view/settings-form.php:439
|
1442 |
msgid "Right align"
|
1443 |
msgstr ""
|
1444 |
|
1458 |
msgid "Sat"
|
1459 |
msgstr ""
|
1460 |
|
1461 |
+
#: view/settings-form.php:1827
|
1462 |
msgid "Save & Exit"
|
1463 |
msgstr ""
|
1464 |
|
1465 |
+
#: view/settings-form.php:1824 view/settings-form.php:1829
|
1466 |
msgid "Save settings"
|
1467 |
msgstr ""
|
1468 |
|
1470 |
msgid "Scheduled jobs"
|
1471 |
msgstr ""
|
1472 |
|
1473 |
+
#: classes/class-wc-order-export-admin.php:293
|
1474 |
+
msgid "select item field"
|
1475 |
+
msgstr ""
|
1476 |
+
|
1477 |
+
#: view/settings-form.php:521
|
1478 |
msgid "Select logo"
|
1479 |
msgstr ""
|
1480 |
|
1481 |
#: classes/class-wc-order-export-admin.php:291
|
1482 |
+
msgid "select product field or taxonomy"
|
1483 |
msgstr ""
|
1484 |
|
1485 |
#: view/settings-form.php:346
|
1490 |
msgid "Set up coupon fields"
|
1491 |
msgstr ""
|
1492 |
|
1493 |
+
#: view/settings-form.php:1414
|
1494 |
msgid "Set up fields to export"
|
1495 |
msgstr ""
|
1496 |
|
1510 |
msgid "Settings saved"
|
1511 |
msgstr ""
|
1512 |
|
1513 |
+
#: view/settings-form.php:1859 view/tab/tools.php:86
|
1514 |
msgid "Settings were successfully updated!"
|
1515 |
msgstr ""
|
1516 |
|
1517 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1255
|
1518 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1279
|
1519 |
msgid "Shipping"
|
1520 |
msgstr ""
|
1521 |
|
1522 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1249
|
1523 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1272
|
1524 |
msgid "Shipping Address"
|
1525 |
msgstr ""
|
1526 |
|
1527 |
+
#: view/settings-form.php:1297
|
1528 |
msgid "Shipping locations"
|
1529 |
msgstr ""
|
1530 |
|
1531 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1132
|
1532 |
msgid "Shipping Method"
|
1533 |
msgstr ""
|
1534 |
|
1535 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1137
|
1536 |
msgid "Shipping Method (no id)"
|
1537 |
msgstr ""
|
1538 |
|
1539 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1127
|
1540 |
msgid "Shipping Method Title"
|
1541 |
msgstr ""
|
1542 |
|
1543 |
+
#: view/settings-form.php:1325
|
1544 |
msgid "Shipping methods"
|
1545 |
msgstr ""
|
1546 |
|
1547 |
+
#: view/settings-form.php:1748
|
1548 |
msgid "Shipping name"
|
1549 |
msgstr ""
|
1550 |
|
1551 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:455
|
1552 |
msgid "Short Description"
|
1553 |
msgstr ""
|
1554 |
|
1555 |
+
#: view/settings-form.php:936
|
1556 |
msgid "Skip fully refunded items"
|
1557 |
msgstr ""
|
1558 |
|
1559 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:350
|
1560 |
msgid "SKU"
|
1561 |
msgstr ""
|
1562 |
|
1563 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:355
|
1564 |
+
msgid "SKU (parent)"
|
1565 |
+
msgstr ""
|
1566 |
+
|
1567 |
+
#: view/settings-form.php:760
|
1568 |
#, php-format
|
1569 |
msgid "Sort orders by %s in %s order"
|
1570 |
msgstr ""
|
1577 |
msgid "Start tag"
|
1578 |
msgstr ""
|
1579 |
|
1580 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:786
|
1581 |
msgid "State Code (Billing)"
|
1582 |
msgstr ""
|
1583 |
|
1584 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:876
|
1585 |
msgid "State Code (Shipping)"
|
1586 |
msgstr ""
|
1587 |
|
1588 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:801
|
1589 |
msgid "State Name (Billing)"
|
1590 |
msgstr ""
|
1591 |
|
1592 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:891
|
1593 |
msgid "State Name (Shipping)"
|
1594 |
msgstr ""
|
1595 |
|
1597 |
msgid "Status change jobs"
|
1598 |
msgstr ""
|
1599 |
|
1600 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1287
|
1601 |
msgid "String"
|
1602 |
msgstr ""
|
1603 |
|
1604 |
+
#: view/settings-form.php:807
|
1605 |
msgid "Strip tags from Product Description/Variation"
|
1606 |
msgstr ""
|
1607 |
|
1613 |
msgid "Summary Report By Products"
|
1614 |
msgstr ""
|
1615 |
|
1616 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:470
|
1617 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:711
|
1618 |
msgid "Summary Report Total Amount"
|
1619 |
msgstr ""
|
1620 |
|
1621 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:716
|
1622 |
msgid "Summary Report Total Amount Paid"
|
1623 |
msgstr ""
|
1624 |
|
1625 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:480
|
1626 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:726
|
1627 |
msgid "Summary Report Total Discount"
|
1628 |
msgstr ""
|
1629 |
|
1630 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:701
|
1631 |
+
msgid "Summary Report Total Items"
|
1632 |
+
msgstr ""
|
1633 |
+
|
1634 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:706
|
1635 |
+
msgid "Summary Report Total Items (Exported)"
|
1636 |
+
msgstr ""
|
1637 |
+
|
1638 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:696
|
1639 |
msgid "Summary Report Total Orders"
|
1640 |
msgstr ""
|
1641 |
|
1642 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:465
|
1643 |
msgid "Summary Report Total Quantity"
|
1644 |
msgstr ""
|
1645 |
|
1646 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:490
|
1647 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:736
|
1648 |
msgid "Summary Report Total Refund Amount"
|
1649 |
msgstr ""
|
1650 |
|
1651 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:485
|
1652 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:731
|
1653 |
msgid "Summary Report Total Refunds"
|
1654 |
msgstr ""
|
1655 |
|
1656 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:721
|
1657 |
+
msgid "Summary Report Total Shipping"
|
1658 |
+
msgstr ""
|
1659 |
+
|
1660 |
#: classes/admin/class-wc-order-export-manage.php:21
|
1661 |
msgid "Sun"
|
1662 |
msgstr ""
|
1665 |
msgid "Support"
|
1666 |
msgstr ""
|
1667 |
|
1668 |
+
#: view/settings-form.php:479
|
1669 |
+
msgid "T,C or B. Comma separated list"
|
1670 |
+
msgstr ""
|
1671 |
+
|
1672 |
+
#: view/settings-form.php:490 view/settings-form.php:615
|
1673 |
msgid "Table header background color"
|
1674 |
msgstr ""
|
1675 |
|
1676 |
+
#: view/settings-form.php:485 view/settings-form.php:610
|
1677 |
msgid "Table header text color"
|
1678 |
msgstr ""
|
1679 |
|
1680 |
+
#: view/settings-form.php:501 view/settings-form.php:626
|
1681 |
msgid "Table row background color"
|
1682 |
msgstr ""
|
1683 |
|
1684 |
+
#: view/settings-form.php:496 view/settings-form.php:621
|
1685 |
msgid "Table row text color"
|
1686 |
msgstr ""
|
1687 |
|
1688 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:405
|
1689 |
msgid "Tags"
|
1690 |
msgstr ""
|
1691 |
|
1692 |
+
#: view/settings-form.php:1770
|
1693 |
msgid "Tax name"
|
1694 |
msgstr ""
|
1695 |
|
1696 |
+
#: view/settings-form.php:1600
|
1697 |
msgid "Taxonomy"
|
1698 |
msgstr ""
|
1699 |
|
1700 |
+
#: classes/core/class-wc-order-export-engine.php:349
|
1701 |
#, php-format
|
1702 |
msgid "The code you are trying to save produced a fatal error on line %d:"
|
1703 |
msgstr ""
|
1704 |
|
1705 |
+
#: view/settings-form.php:925
|
1706 |
msgid ""
|
1707 |
"The filters won't work correctly.<br>Another plugin(or theme) has loaded "
|
1708 |
"outdated Select2.js"
|
1709 |
msgstr ""
|
1710 |
|
1711 |
+
#: view/settings-form.php:1491 view/settings-form.php:1624
|
1712 |
msgid ""
|
1713 |
"The plugin fetches meta keys from the existing orders. So you should create "
|
1714 |
"fake order if you've added new field just now."
|
1724 |
msgid "This date range should not be saved in the scheduled task"
|
1725 |
msgstr ""
|
1726 |
|
1727 |
+
#: view/settings-form.php:663
|
1728 |
msgid "This option cancels UI settings(above) and don't applied to Preview"
|
1729 |
msgstr ""
|
1730 |
|
1742 |
msgid "Thu"
|
1743 |
msgstr ""
|
1744 |
|
1745 |
+
#: view/settings-form.php:699
|
1746 |
msgid "Time"
|
1747 |
msgstr ""
|
1748 |
|
1749 |
+
#: classes/class-wc-order-export-admin.php:295
|
1750 |
msgid "title is empty"
|
1751 |
msgstr ""
|
1752 |
|
1758 |
msgid "Tools"
|
1759 |
msgstr ""
|
1760 |
|
1761 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1040
|
1762 |
msgid "Total items"
|
1763 |
msgstr ""
|
1764 |
|
1765 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1050
|
1766 |
msgid "Total products"
|
1767 |
msgstr ""
|
1768 |
|
1769 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1035
|
1770 |
msgid "Total weight"
|
1771 |
msgstr ""
|
1772 |
|
1773 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1256
|
1774 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1280
|
1775 |
msgid "Totals"
|
1776 |
msgstr ""
|
1777 |
|
1778 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:606
|
1779 |
msgid "Transaction ID"
|
1780 |
msgstr ""
|
1781 |
|
1782 |
+
#: view/settings-form.php:369
|
1783 |
msgid "TSV options"
|
1784 |
msgstr ""
|
1785 |
|
1787 |
msgid "Tue"
|
1788 |
msgstr ""
|
1789 |
|
1790 |
+
#: view/settings-form.php:1427
|
1791 |
msgid "Turn off mode Summary report to export order fields"
|
1792 |
msgstr ""
|
1793 |
|
1794 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:395
|
1795 |
msgid "Type"
|
1796 |
msgstr ""
|
1797 |
|
1798 |
+
#: classes/class-wc-order-export-admin.php:411
|
1799 |
#, php-format
|
1800 |
msgid "Unknown AJAX method %s"
|
1801 |
msgstr ""
|
1802 |
|
1803 |
+
#: classes/class-wc-order-export-admin.php:419
|
1804 |
#, php-format
|
1805 |
msgid "Unknown tab method %s"
|
1806 |
msgstr ""
|
1807 |
|
1808 |
+
#: classes/class-wc-order-export-admin.php:457
|
1809 |
msgid "Unmark exported"
|
1810 |
msgstr ""
|
1811 |
|
1812 |
+
#: view/settings-form.php:839
|
1813 |
msgid "Use only unnamed functions!"
|
1814 |
msgstr ""
|
1815 |
|
1817 |
msgid "Use sheet name"
|
1818 |
msgstr ""
|
1819 |
|
1820 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1247
|
1821 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:1270
|
1822 |
msgid "User"
|
1823 |
msgstr ""
|
1824 |
|
1825 |
+
#: view/settings-form.php:1168
|
1826 |
msgid "User roles"
|
1827 |
msgstr ""
|
1828 |
|
1829 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:666
|
1830 |
msgid "User Website"
|
1831 |
msgstr ""
|
1832 |
|
1833 |
+
#: view/settings-form.php:1154
|
1834 |
msgid "Usernames"
|
1835 |
msgstr ""
|
1836 |
|
1837 |
+
#: view/settings-form.php:1534 view/settings-form.php:1660
|
1838 |
+
#: view/settings-form.php:1708
|
1839 |
msgid "Value"
|
1840 |
msgstr ""
|
1841 |
|
1842 |
+
#: view/settings-form.php:1062
|
1843 |
msgid "Variable product attributes"
|
1844 |
msgstr ""
|
1845 |
|
1846 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:375
|
1847 |
msgid "Variation Id"
|
1848 |
msgstr ""
|
1849 |
|
1850 |
+
#: view/settings-form.php:956
|
1851 |
msgid "Vendors/creators"
|
1852 |
msgstr ""
|
1853 |
|
1855 |
msgid "Wed"
|
1856 |
msgstr ""
|
1857 |
|
1858 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:425
|
1859 |
msgid "Weight"
|
1860 |
msgstr ""
|
1861 |
|
1862 |
+
#: classes/core/class-wc-order-export-data-extractor-ui.php:410
|
1863 |
msgid "Width"
|
1864 |
msgstr ""
|
1865 |
|
1866 |
+
#: classes/class-wc-order-export-admin.php:423
|
1867 |
msgid "Wrong nonce"
|
1868 |
msgstr ""
|
1869 |
|
1875 |
msgid "XML options"
|
1876 |
msgstr ""
|
1877 |
|
1878 |
+
#: view/settings-form.php:473
|
1879 |
msgid "Yes"
|
1880 |
msgstr ""
|
1881 |
|
1882 |
+
#: classes/class-wc-order-export-admin.php:396
|
1883 |
msgid "You can not do it"
|
1884 |
msgstr ""
|
1885 |
+
|
1886 |
+
#: view/settings-form.php:163
|
1887 |
+
msgid "You will export only completed orders"
|
1888 |
+
msgstr ""
|
1889 |
+
|
1890 |
+
#: view/settings-form.php:156
|
1891 |
+
msgid "You will export only paid orders"
|
1892 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ 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.
|
8 |
-
Stable tag: 3.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -95,6 +95,9 @@ Please, increase "memory_limit" upto 256M or ask hosting support to do it.
|
|
95 |
= When exporting .csv containing european special characters , I want to open this csv in Excel without extra actions =
|
96 |
You should open tab "CSV" and set up ISO-8859-1 as codepage.
|
97 |
|
|
|
|
|
|
|
98 |
= Can I request any new feature ? =
|
99 |
Yes, you can email a request to aprokaev@gmail.com. We intensively develop this plugin.
|
100 |
|
@@ -109,6 +112,21 @@ Yes, you can email a request to aprokaev@gmail.com. We intensively develop this
|
|
109 |
|
110 |
== Changelog ==
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
= 3.0.3 - 2019-08-29 =
|
113 |
* Fixed CRITICAL bug - export wrong data if user added customer field "First Order Date" or "Last Order Date"
|
114 |
* Fixed bug - customer fields "First Order Date" or "Last Order Date" were empty for guests
|
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.3
|
8 |
+
Stable tag: 3.1.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
95 |
= When exporting .csv containing european special characters , I want to open this csv in Excel without extra actions =
|
96 |
You should open tab "CSV" and set up ISO-8859-1 as codepage.
|
97 |
|
98 |
+
= Preview shows wrong values, I use Summary mode =
|
99 |
+
This button processes only first 5 orders by default, so you should run the export to see correct values.
|
100 |
+
|
101 |
= Can I request any new feature ? =
|
102 |
Yes, you can email a request to aprokaev@gmail.com. We intensively develop this plugin.
|
103 |
|
112 |
|
113 |
== Changelog ==
|
114 |
|
115 |
+
= 3.1.0 - 2019-11-11 =
|
116 |
+
* Speeded up page loading and button "Preview"
|
117 |
+
* Added filter "Products SKU" to section "Filter by product"
|
118 |
+
* Added options for JSON format
|
119 |
+
* Added vertical align for cells (PDF format)
|
120 |
+
* New tabs "Product items", "Product totals" in section "Setup fields"
|
121 |
+
* Order fields can be dragged to section "Products" (JSON/XML formats)
|
122 |
+
* Added product field "SKU(parent)"
|
123 |
+
* Added fields "Total Shipping","Total Discount","Total Items" for "Summary by customers" mode
|
124 |
+
* Support "0" as max # of product columns (calculated based on exported orders)
|
125 |
+
* Deleted products are exported by "Summary by products" mode
|
126 |
+
* Fixed UI bugs for summary mode
|
127 |
+
* New hooks for PDF format
|
128 |
+
* Fixed bug - sorting (by order fields) conflicted with filtering by order custom fields
|
129 |
+
|
130 |
= 3.0.3 - 2019-08-29 =
|
131 |
* Fixed CRITICAL bug - export wrong data if user added customer field "First Order Date" or "Last Order Date"
|
132 |
* Fixed bug - customer fields "First Order Date" or "Last Order Date" were empty for guests
|
view/settings-form.php
CHANGED
@@ -87,7 +87,7 @@ function remove_time_from_date( $datetime ) {
|
|
87 |
var order_products_custom_meta_fields = <?php echo json_encode( WC_Order_Export_Data_Extractor_UI::get_product_custom_fields() ) ?>;
|
88 |
var order_order_item_custom_meta_fields = <?php echo json_encode( WC_Order_Export_Data_Extractor_UI::get_product_itemmeta() ) ?>;
|
89 |
var order_coupons_custom_meta_fields = <?php echo json_encode( WC_Order_Export_Data_Extractor_UI::get_all_coupon_custom_meta_fields() ) ?>;
|
90 |
-
var order_segments = <?php echo json_encode( WC_Order_Export_Data_Extractor_UI::
|
91 |
var field_formats = <?php echo json_encode( WC_Order_Export_Data_Extractor_UI::get_format_fields() ) ?>;
|
92 |
var summary_mode_by_products = <?php echo $settings['summary_report_by_products'] ?>;
|
93 |
var summary_mode_by_customers = <?php echo $settings['summary_report_by_customers'] ?>;
|
@@ -153,14 +153,14 @@ function remove_time_from_date( $datetime ) {
|
|
153 |
<?php _e( 'Modification Date', 'woo-order-export-lite' ) ?>
|
154 |
</label>
|
155 |
		
|
156 |
-
<label>
|
157 |
<input type="radio" name="settings[export_rule_field]"
|
158 |
class="width-100" <?php echo ( isset( $settings['export_rule_field'] ) && ( $settings['export_rule_field'] == 'date_paid' ) ) ? 'checked' : '' ?>
|
159 |
value="date_paid">
|
160 |
<?php _e( 'Paid Date', 'woo-order-export-lite' ) ?>
|
161 |
</label>
|
162 |
		
|
163 |
-
<label>
|
164 |
<input type="radio" name="settings[export_rule_field]"
|
165 |
class="width-100" <?php echo ( isset( $settings['export_rule_field'] ) && ( $settings['export_rule_field'] == 'date_completed' ) ) ? 'checked' : '' ?>
|
166 |
value="date_completed">
|
@@ -356,7 +356,15 @@ function remove_time_from_date( $datetime ) {
|
|
356 |
value='<?php echo @$settings['format_json_start_tag'] ?>'><br>
|
357 |
<span class="xml-title"><?php _e( 'End tag', 'woo-order-export-lite' ) ?></span><input type=text
|
358 |
name="settings[format_json_end_tag]"
|
359 |
-
value='<?php echo @$settings['format_json_end_tag'] ?>'>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
360 |
</div>
|
361 |
<div id='TSV_options' style='display:none'><strong><?php _e( 'TSV options',
|
362 |
'woo-order-export-lite' ) ?></strong><br>
|
@@ -456,16 +464,22 @@ function remove_time_from_date( $datetime ) {
|
|
456 |
value='<?php echo $settings['format_pdf_footer_text'] ?>'>
|
457 |
</div>
|
458 |
<div class="pdf_two_col_block">
|
459 |
-
<?php _e( 'Columns align', 'woo-order-export-lite' ) ?>
|
460 |
-
<input title="<?php _e( '
|
461 |
</div>
|
462 |
|
463 |
-
|
464 |
<div class="pdf_two_col_block">
|
465 |
<?php _e( 'Fit table to page width', 'woo-order-export-lite' ) ?><br>
|
466 |
<input type="radio" name="settings[format_pdf_fit_page_width]" value=1 <?php checked( @$settings['format_pdf_fit_page_width'] ); ?> ><?php _e( 'Yes', 'woo-order-export-lite' ); ?>
|
467 |
<input type="radio" name="settings[format_pdf_fit_page_width]" value=0 <?php checked( !@$settings['format_pdf_fit_page_width'] ); ?> ><?php _e( 'No', 'woo-order-export-lite' ); ?>
|
468 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
469 |
<hr>
|
470 |
<div class="pdf_two_col_block">
|
471 |
<?php _e( 'Table header text color', 'woo-order-export-lite' ) ?>
|
@@ -479,7 +493,7 @@ function remove_time_from_date( $datetime ) {
|
|
479 |
</div>
|
480 |
|
481 |
<div class="pdf_two_col_block">
|
482 |
-
<?php _e( 'Table row text color', 'woo-order-export-lite' )
|
483 |
<input type=text class="color_pick" name="settings[format_pdf_table_row_text_color]"
|
484 |
value='<?php echo $settings['format_pdf_table_row_text_color'] ?>'>
|
485 |
</div>
|
@@ -604,7 +618,7 @@ function remove_time_from_date( $datetime ) {
|
|
604 |
</div>
|
605 |
|
606 |
<div class="pdf_two_col_block">
|
607 |
-
<?php _e( 'Table row text color', 'woo-order-export-lite' )
|
608 |
<input type=text class="color_pick" name="settings[format_html_table_row_text_color]"
|
609 |
value='<?php echo $settings['format_html_table_row_text_color'] ?>'>
|
610 |
</div>
|
@@ -615,15 +629,30 @@ function remove_time_from_date( $datetime ) {
|
|
615 |
</div>
|
616 |
|
617 |
<div class="pdf_two_col_block">
|
618 |
-
<?php _e( 'Header text color', 'woo-order-export-lite' )
|
619 |
<input type=text class="color_pick" name="settings[format_html_header_text_color]"
|
620 |
value='<?php echo $settings['format_html_header_text_color'] ?>'>
|
621 |
</div>
|
622 |
<div class="pdf_two_col_block">
|
623 |
-
<?php _e( 'Footer text color', 'woo-order-export-lite' )
|
624 |
<input type=text class="color_pick" name="settings[format_html_footer_text_color]"
|
625 |
value='<?php echo $settings['format_html_footer_text_color'] ?>'>
|
626 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
627 |
<br/>
|
628 |
<div>
|
629 |
|
@@ -954,6 +983,11 @@ function remove_time_from_date( $datetime ) {
|
|
954 |
<?php }
|
955 |
} ?>
|
956 |
</select>
|
|
|
|
|
|
|
|
|
|
|
957 |
|
958 |
<span class="wc-oe-header"><?php _e( 'Product taxonomies', 'woo-order-export-lite' ) ?></span>
|
959 |
<br>
|
@@ -1415,7 +1449,7 @@ function remove_time_from_date( $datetime ) {
|
|
1415 |
<div></div>
|
1416 |
<div id='unselected_fields'>
|
1417 |
<ul class="subsubsub" style="float: none">
|
1418 |
-
<?php $segments = WC_Order_Export_Data_Extractor_UI::
|
1419 |
<?php foreach ( $segments as $id => $segment_title ): ?>
|
1420 |
<li class="block-segment-choice" data-segment="<?php echo $id; ?>">
|
1421 |
<a class="segment_choice"
|
@@ -1461,7 +1495,7 @@ function remove_time_from_date( $datetime ) {
|
|
1461 |
<select id='select_custom_meta_order'>
|
1462 |
<?php
|
1463 |
foreach ( $order_custom_meta_fields['order'] as $meta_id => $meta_name ) {
|
1464 |
-
echo "<option value='$meta_name' >$meta_name</option>";
|
1465 |
};
|
1466 |
?>
|
1467 |
</select>
|
@@ -1518,7 +1552,7 @@ function remove_time_from_date( $datetime ) {
|
|
1518 |
<select id='select_custom_meta_user'>
|
1519 |
<?php
|
1520 |
foreach ( $order_custom_meta_fields['user'] as $meta_id => $meta_name ) {
|
1521 |
-
echo "<option value='$meta_name' >$meta_name</option>";
|
1522 |
};
|
1523 |
?>
|
1524 |
</select>
|
@@ -1548,14 +1582,9 @@ function remove_time_from_date( $datetime ) {
|
|
1548 |
</div>
|
1549 |
</div>
|
1550 |
<div class='div_meta products-segment segment-form products-add-field'>
|
1551 |
-
<div class='add_form_tip'><?php _e( "The plugin fetches meta keys from the existing orders. So you should create fake order if you've added new field just now.", 'woo-order-export-lite' )?></div>
|
1552 |
<label for="select_custom_meta_products"><?php _e( 'Product fields',
|
1553 |
'woo-order-export-lite' ) ?>:</label><select
|
1554 |
id='select_custom_meta_products'></select>
|
1555 |
-
|
1556 |
-
<label for="select_custom_meta_order_items"><?php _e( 'Order item fields',
|
1557 |
-
'woo-order-export-lite' ) ?>:</label><select
|
1558 |
-
id='select_custom_meta_order_items'></select>
|
1559 |
<label> </label><input style="width: 80%;" type='text'
|
1560 |
id='text_custom_meta_order_items'
|
1561 |
placeholder="<?php _e( 'or type meta key here',
|
@@ -1591,22 +1620,52 @@ function remove_time_from_date( $datetime ) {
|
|
1591 |
'woo-order-export-lite' ) ?></button>
|
1592 |
</div>
|
1593 |
</div>
|
1594 |
-
<div class='
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1595 |
<div>
|
1596 |
-
<label for="
|
1597 |
'woo-order-export-lite' ) ?>:</label>
|
1598 |
-
<input type='text' id='
|
1599 |
</div>
|
1600 |
<div>
|
1601 |
-
<label for="
|
1602 |
'woo-order-export-lite' ) ?>:</label>
|
1603 |
-
<input type='text' id='
|
1604 |
</div>
|
1605 |
<div>
|
1606 |
<?php echo print_formats_field( 'field', 'products' ); ?>
|
1607 |
</div>
|
1608 |
<div style="text-align: right;">
|
1609 |
-
<button id='
|
1610 |
class='button-secondary'><?php _e( 'Confirm',
|
1611 |
'woo-order-export-lite' ) ?></button>
|
1612 |
<button class='button-secondary button-cancel'><?php _e( 'Cancel',
|
@@ -1754,7 +1813,7 @@ function remove_time_from_date( $datetime ) {
|
|
1754 |
<div id=JS_error_onload
|
1755 |
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.",
|
1756 |
'woo-order-export-lite' ),
|
1757 |
-
"https://
|
1758 |
<p class="submit">
|
1759 |
<input type="submit" id='preview-btn' class="button-secondary preview-btn"
|
1760 |
data-limit="<?php echo( $mode === WC_Order_Export_Manage::EXPORT_ORDER_ACTION ? 1 : 5 ); ?>"
|
87 |
var order_products_custom_meta_fields = <?php echo json_encode( WC_Order_Export_Data_Extractor_UI::get_product_custom_fields() ) ?>;
|
88 |
var order_order_item_custom_meta_fields = <?php echo json_encode( WC_Order_Export_Data_Extractor_UI::get_product_itemmeta() ) ?>;
|
89 |
var order_coupons_custom_meta_fields = <?php echo json_encode( WC_Order_Export_Data_Extractor_UI::get_all_coupon_custom_meta_fields() ) ?>;
|
90 |
+
var order_segments = <?php echo json_encode( WC_Order_Export_Data_Extractor_UI::get_unselected_fields_segments() ) ?>;
|
91 |
var field_formats = <?php echo json_encode( WC_Order_Export_Data_Extractor_UI::get_format_fields() ) ?>;
|
92 |
var summary_mode_by_products = <?php echo $settings['summary_report_by_products'] ?>;
|
93 |
var summary_mode_by_customers = <?php echo $settings['summary_report_by_customers'] ?>;
|
153 |
<?php _e( 'Modification Date', 'woo-order-export-lite' ) ?>
|
154 |
</label>
|
155 |
		
|
156 |
+
<label title="<?php _e( 'You will export only paid orders', 'woo-order-export-lite' ) ?>" >
|
157 |
<input type="radio" name="settings[export_rule_field]"
|
158 |
class="width-100" <?php echo ( isset( $settings['export_rule_field'] ) && ( $settings['export_rule_field'] == 'date_paid' ) ) ? 'checked' : '' ?>
|
159 |
value="date_paid">
|
160 |
<?php _e( 'Paid Date', 'woo-order-export-lite' ) ?>
|
161 |
</label>
|
162 |
		
|
163 |
+
<label title="<?php _e( 'You will export only completed orders', 'woo-order-export-lite' ) ?>" >
|
164 |
<input type="radio" name="settings[export_rule_field]"
|
165 |
class="width-100" <?php echo ( isset( $settings['export_rule_field'] ) && ( $settings['export_rule_field'] == 'date_completed' ) ) ? 'checked' : '' ?>
|
166 |
value="date_completed">
|
356 |
value='<?php echo @$settings['format_json_start_tag'] ?>'><br>
|
357 |
<span class="xml-title"><?php _e( 'End tag', 'woo-order-export-lite' ) ?></span><input type=text
|
358 |
name="settings[format_json_end_tag]"
|
359 |
+
value='<?php echo @$settings['format_json_end_tag'] ?>'><br>
|
360 |
+
<label><input type=checkbox name="settings[format_json_unescaped_slashes]" value=1 <?php if(@$settings['format_json_unescaped_slashes']){
|
361 |
+
echo 'checked';
|
362 |
+
}?>><?php _e("Don't escape /",'woo-order-export-lite')?></label><br>
|
363 |
+
<label><input type=checkbox
|
364 |
+
name="settings[format_json_numeric_check]"
|
365 |
+
value='1 <?php if ( @$settings['format_json_numeric_check'] ) {
|
366 |
+
echo 'checked';
|
367 |
+
}?>'><?php _e("Encode numeric strings as numbers",'woo-order-export-lite')?></label>
|
368 |
</div>
|
369 |
<div id='TSV_options' style='display:none'><strong><?php _e( 'TSV options',
|
370 |
'woo-order-export-lite' ) ?></strong><br>
|
464 |
value='<?php echo $settings['format_pdf_footer_text'] ?>'>
|
465 |
</div>
|
466 |
<div class="pdf_two_col_block">
|
467 |
+
<?php _e( 'Columns horizontal align', 'woo-order-export-lite' ) ?>
|
468 |
+
<input title="<?php _e( 'L,C or R. Comma separated list', 'woo-order-export-lite' ) ?>" type=text name="settings[format_pdf_cols_align]" value='<?php echo $settings['format_pdf_cols_align'] ?>'>
|
469 |
</div>
|
470 |
|
|
|
471 |
<div class="pdf_two_col_block">
|
472 |
<?php _e( 'Fit table to page width', 'woo-order-export-lite' ) ?><br>
|
473 |
<input type="radio" name="settings[format_pdf_fit_page_width]" value=1 <?php checked( @$settings['format_pdf_fit_page_width'] ); ?> ><?php _e( 'Yes', 'woo-order-export-lite' ); ?>
|
474 |
<input type="radio" name="settings[format_pdf_fit_page_width]" value=0 <?php checked( !@$settings['format_pdf_fit_page_width'] ); ?> ><?php _e( 'No', 'woo-order-export-lite' ); ?>
|
475 |
</div>
|
476 |
+
|
477 |
+
<div class="pdf_two_col_block">
|
478 |
+
<?php _e( 'Columns vertical align', 'woo-order-export-lite' ) ?>
|
479 |
+
<input title="<?php _e( 'T,C or B. Comma separated list', 'woo-order-export-lite' ) ?>" type=text name="settings[format_pdf_cols_vertical_align]" value='<?php echo $settings['format_pdf_cols_vertical_align'] ?>'>
|
480 |
+
</div>
|
481 |
+
|
482 |
+
|
483 |
<hr>
|
484 |
<div class="pdf_two_col_block">
|
485 |
<?php _e( 'Table header text color', 'woo-order-export-lite' ) ?>
|
493 |
</div>
|
494 |
|
495 |
<div class="pdf_two_col_block">
|
496 |
+
<?php _e( 'Table row text color', 'woo-order-export-lite' ) ?><br>
|
497 |
<input type=text class="color_pick" name="settings[format_pdf_table_row_text_color]"
|
498 |
value='<?php echo $settings['format_pdf_table_row_text_color'] ?>'>
|
499 |
</div>
|
618 |
</div>
|
619 |
|
620 |
<div class="pdf_two_col_block">
|
621 |
+
<?php _e( 'Table row text color', 'woo-order-export-lite' ) ?><br>
|
622 |
<input type=text class="color_pick" name="settings[format_html_table_row_text_color]"
|
623 |
value='<?php echo $settings['format_html_table_row_text_color'] ?>'>
|
624 |
</div>
|
629 |
</div>
|
630 |
|
631 |
<div class="pdf_two_col_block">
|
632 |
+
<?php _e( 'Header text color', 'woo-order-export-lite' ) ?><br>
|
633 |
<input type=text class="color_pick" name="settings[format_html_header_text_color]"
|
634 |
value='<?php echo $settings['format_html_header_text_color'] ?>'>
|
635 |
</div>
|
636 |
<div class="pdf_two_col_block">
|
637 |
+
<?php _e( 'Footer text color', 'woo-order-export-lite' ) ?><br>
|
638 |
<input type=text class="color_pick" name="settings[format_html_footer_text_color]"
|
639 |
value='<?php echo $settings['format_html_footer_text_color'] ?>'>
|
640 |
</div>
|
641 |
+
|
642 |
+
<div class="pdf_two_col_block">
|
643 |
+
<?php _e( 'Images width', 'woo-order-export-lite' ) ?>
|
644 |
+
<br>
|
645 |
+
<input type="number" name="settings[format_html_row_images_width]"
|
646 |
+
value='<?php echo $settings['format_html_row_images_width'] ?>' min="0">
|
647 |
+
</div>
|
648 |
+
|
649 |
+
<div class="pdf_two_col_block">
|
650 |
+
<?php _e( 'Images height', 'woo-order-export-lite' ) ?>
|
651 |
+
<br>
|
652 |
+
<input type="number" name="settings[format_html_row_images_height]"
|
653 |
+
value='<?php echo $settings['format_html_row_images_height'] ?>' min="0">
|
654 |
+
</div>
|
655 |
+
|
656 |
<br/>
|
657 |
<div>
|
658 |
|
983 |
<?php }
|
984 |
} ?>
|
985 |
</select>
|
986 |
+
|
987 |
+
<span class="wc-oe-header"><?php _e( 'Product SKU', 'woo-order-export-lite' ) ?></span>
|
988 |
+
<br>
|
989 |
+
<textarea id="product_sku" name="settings[product_sku]" rows="4" class="width-100" style="resize: none;"></textarea>
|
990 |
+
<br>
|
991 |
|
992 |
<span class="wc-oe-header"><?php _e( 'Product taxonomies', 'woo-order-export-lite' ) ?></span>
|
993 |
<br>
|
1449 |
<div></div>
|
1450 |
<div id='unselected_fields'>
|
1451 |
<ul class="subsubsub" style="float: none">
|
1452 |
+
<?php $segments = WC_Order_Export_Data_Extractor_UI::get_unselected_fields_segments(); ?>
|
1453 |
<?php foreach ( $segments as $id => $segment_title ): ?>
|
1454 |
<li class="block-segment-choice" data-segment="<?php echo $id; ?>">
|
1455 |
<a class="segment_choice"
|
1495 |
<select id='select_custom_meta_order'>
|
1496 |
<?php
|
1497 |
foreach ( $order_custom_meta_fields['order'] as $meta_id => $meta_name ) {
|
1498 |
+
echo "<option value='" . esc_html($meta_name) . "' >$meta_name</option>";
|
1499 |
};
|
1500 |
?>
|
1501 |
</select>
|
1552 |
<select id='select_custom_meta_user'>
|
1553 |
<?php
|
1554 |
foreach ( $order_custom_meta_fields['user'] as $meta_id => $meta_name ) {
|
1555 |
+
echo "<option value='" . esc_html($meta_name) . "' >$meta_name</option>";
|
1556 |
};
|
1557 |
?>
|
1558 |
</select>
|
1582 |
</div>
|
1583 |
</div>
|
1584 |
<div class='div_meta products-segment segment-form products-add-field'>
|
|
|
1585 |
<label for="select_custom_meta_products"><?php _e( 'Product fields',
|
1586 |
'woo-order-export-lite' ) ?>:</label><select
|
1587 |
id='select_custom_meta_products'></select>
|
|
|
|
|
|
|
|
|
1588 |
<label> </label><input style="width: 80%;" type='text'
|
1589 |
id='text_custom_meta_order_items'
|
1590 |
placeholder="<?php _e( 'or type meta key here',
|
1620 |
'woo-order-export-lite' ) ?></button>
|
1621 |
</div>
|
1622 |
</div>
|
1623 |
+
<div class='div_meta product_items-segment segment-form products-add-field'>
|
1624 |
+
<div class='add_form_tip'><?php _e( "The plugin fetches meta keys from the existing orders. So you should create fake order if you've added new field just now.", 'woo-order-export-lite' )?></div>
|
1625 |
+
|
1626 |
+
<label for="select_custom_meta_order_items"><?php _e( 'Order item fields',
|
1627 |
+
'woo-order-export-lite' ) ?>:</label><select
|
1628 |
+
id='select_custom_meta_order_items'></select>
|
1629 |
+
<label> </label><input style="width: 80%;" type='text'
|
1630 |
+
id='text_custom_meta_order_items'
|
1631 |
+
placeholder="<?php _e( 'or type meta key here',
|
1632 |
+
'woo-order-export-lite' ) ?>"/>
|
1633 |
+
<div id="custom_meta_product_items_mode">
|
1634 |
+
<label><input id="custom_meta_product_items_mode_used" type="checkbox"
|
1635 |
+
name="custom_meta_product_items_mode"
|
1636 |
+
value="used"> <?php _e( 'Hide unused fields',
|
1637 |
+
'woo-order-export-lite' ) ?></label>
|
1638 |
+
</div>
|
1639 |
+
<hr>
|
1640 |
+
<div style="margin-top: 15px;"></div>
|
1641 |
+
<label><?php _e( 'Column name', 'woo-order-export-lite' ) ?>:</label><input
|
1642 |
+
type='text' id='colname_custom_meta_product_items'/>
|
1643 |
+
<div style="margin-top: 15px;"></div>
|
1644 |
+
<?php echo print_formats_field( 'meta', 'products' ); ?>
|
1645 |
+
<div style="text-align: right;">
|
1646 |
+
<button id='button_custom_meta_product_items'
|
1647 |
+
class='button-secondary'><?php _e( 'Confirm',
|
1648 |
+
'woo-order-export-lite' ) ?></button>
|
1649 |
+
<button class='button-secondary button-cancel'><?php _e( 'Cancel',
|
1650 |
+
'woo-order-export-lite' ) ?></button>
|
1651 |
+
</div>
|
1652 |
+
</div>
|
1653 |
+
<div class='div_custom product_items-segment segment-form products-add-static-field'>
|
1654 |
<div>
|
1655 |
+
<label for="colname_custom_field_product_items"><?php _e( 'Column name',
|
1656 |
'woo-order-export-lite' ) ?>:</label>
|
1657 |
+
<input type='text' id='colname_custom_field_product_items'/>
|
1658 |
</div>
|
1659 |
<div>
|
1660 |
+
<label for="value_custom_field_product_items"><?php _e( 'Value',
|
1661 |
'woo-order-export-lite' ) ?>:</label>
|
1662 |
+
<input type='text' id='value_custom_field_product_items'/>
|
1663 |
</div>
|
1664 |
<div>
|
1665 |
<?php echo print_formats_field( 'field', 'products' ); ?>
|
1666 |
</div>
|
1667 |
<div style="text-align: right;">
|
1668 |
+
<button id='button_custom_field_product_items'
|
1669 |
class='button-secondary'><?php _e( 'Confirm',
|
1670 |
'woo-order-export-lite' ) ?></button>
|
1671 |
<button class='button-secondary button-cancel'><?php _e( 'Cancel',
|
1813 |
<div id=JS_error_onload
|
1814 |
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.",
|
1815 |
'woo-order-export-lite' ),
|
1816 |
+
"https://wordpress.org/support/article/using-your-browser-to-diagnose-javascript-errors/#step-3-diagnosis" ); ?></div>
|
1817 |
<p class="submit">
|
1818 |
<input type="submit" id='preview-btn' class="button-secondary preview-btn"
|
1819 |
data-limit="<?php echo( $mode === WC_Order_Export_Manage::EXPORT_ORDER_ACTION ? 1 : 5 ); ?>"
|
woo-order-export-lite.php
CHANGED
@@ -5,11 +5,11 @@
|
|
5 |
* Description: Export orders from WooCommerce with ease (Excel/CSV/XML/JSON supported)
|
6 |
* Author: AlgolPlus
|
7 |
* Author URI: https://algolplus.com/
|
8 |
-
* Version: 3.0
|
9 |
* Text Domain: woo-order-export-lite
|
10 |
* Domain Path: /i18n/languages/
|
11 |
* WC requires at least: 2.6.0
|
12 |
-
* WC tested up to: 3.
|
13 |
*
|
14 |
* Copyright: (c) 2015 AlgolPlus LLC. (algol.plus@gmail.com)
|
15 |
*
|
@@ -39,7 +39,7 @@ if ( class_exists( 'WC_Order_Export_Admin' ) ) {
|
|
39 |
return;
|
40 |
}
|
41 |
|
42 |
-
define( 'WOE_VERSION', '3.0
|
43 |
define( 'WOE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
44 |
define( 'WOE_PLUGIN_BASEPATH', dirname( __FILE__ ) );
|
45 |
|
5 |
* Description: Export orders from WooCommerce with ease (Excel/CSV/XML/JSON supported)
|
6 |
* Author: AlgolPlus
|
7 |
* Author URI: https://algolplus.com/
|
8 |
+
* Version: 3.1.0
|
9 |
* Text Domain: woo-order-export-lite
|
10 |
* Domain Path: /i18n/languages/
|
11 |
* WC requires at least: 2.6.0
|
12 |
+
* WC tested up to: 3.8
|
13 |
*
|
14 |
* Copyright: (c) 2015 AlgolPlus LLC. (algol.plus@gmail.com)
|
15 |
*
|
39 |
return;
|
40 |
}
|
41 |
|
42 |
+
define( 'WOE_VERSION', '3.1.0' );
|
43 |
define( 'WOE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
44 |
define( 'WOE_PLUGIN_BASEPATH', dirname( __FILE__ ) );
|
45 |
|