Skip to content

Instantly share code, notes, and snippets.

@MarkSch521
MarkSch521 / woocommerce-csv-export-separate-item-meta.php
Created November 11, 2015 01:17 — forked from tamarazuk/woocommerce-csv-export-separate-item-meta.php
Customer/Order CSV Export: Separate item meta into multiple columns in the Default – One Row per Item format
<?php
/**
* The use of this snippet requires at least WooCommerce 2.2
*/
/**
* Alter the column headers for the orders CSV to split item_meta into separate columns
*
* Note that this change is only applied to the Default - One Row per Item format
*
@MarkSch521
MarkSch521 / sv_csv_export_multi_column_coupons.php
Created November 3, 2015 02:39 — forked from tamarazuk/sv_csv_export_multi_column_coupons.php
WooCommerce CSV Export: Multi-column Coupons
<?php
/**
* Modify the order export column headers to seperate coupons into multiple columns
*
* @param array $column_headers column headers in column_key => column_name format
* @param \WC_Customer_Order_CSV_Export_Generator the generator instance
* @return array modified column headers
*/
function sv_csv_export_multi_column_coupons_order_headers( $column_headers, $generator ) {