Skip to content

Commit a5219be

Browse files
Create change-mark-as-exported-default-to-false.php
1 parent 172bbdb commit a5219be

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php //only copy this line if needed
2+
3+
/**
4+
* Set "Mark as exported" option on the Manual Export page to false (unchecked) by default
5+
*
6+
* @param array $options the array of options for the export tab
7+
*/
8+
add_filter( 'wc_customer_order_export_options', function( $options ){
9+
10+
foreach ( [ \WC_Customer_Order_CSV_Export::EXPORT_TYPE_ORDERS, \WC_Customer_Order_CSV_Export::EXPORT_TYPE_CUSTOMERS ] as $export_type ) {
11+
12+
$options[ "${export_type}_mark_as_exported" ]['default'] = 'no';
13+
}
14+
15+
return $options;
16+
} );

0 commit comments

Comments
 (0)