Forked from maxrice/wc-customer-order-csv-export-modify-csv-format.php
Created
November 7, 2015 11:51
-
-
Save clement-menard/80b08cbd091bd7b13371 to your computer and use it in GitHub Desktop.
WooCommerce Customer/Order CSV Export - Modify the CSV delimiter, enclosure and BOM character
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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