Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tamarazuk/148b83d3bab8e4b9a089 to your computer and use it in GitHub Desktop.
Save tamarazuk/148b83d3bab8e4b9a089 to your computer and use it in GitHub Desktop.
<?php
// change CSV delimiter to a semi-colon (;)
function wc_csv_export_modify_delimiter() {
return ';';
}
add_filter( 'wc_customer_order_csv_export_delimiter', 'wc_csv_export_modify_delimiter' );
// change CSV enclosure to a pipe (|)
function wc_csv_export_modify_enclosure() {
return '|';
}
add_filter( 'wc_customer_order_csv_export_enclosure', 'wc_csv_export_modify_enclosure' );
// enable the BOM (byte-order mark) for all CSVs
add_filter( 'wc_customer_order_csv_export_enable_bom', '__return_true' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment