Skip to content

Instantly share code, notes, and snippets.

@reigelgallarde
Last active February 17, 2016 10:57
Show Gist options
  • Save reigelgallarde/495299b4228caa2d73f7 to your computer and use it in GitHub Desktop.
Save reigelgallarde/495299b4228caa2d73f7 to your computer and use it in GitHub Desktop.
<?php
add_filter('wc_customer_order_csv_export_order_row','wc_customer_order_csv_export_order_row',10,1);
function wc_customer_order_csv_export_order_row($order_data){
if (!is_array($order_data)) { return $order_data; }
if (!is_numeric($order_data['cart_discount'])) {
$order_data['cart_discount'] = 0.00;
}
if (!is_numeric($order_data['order_discount'])) {
$order_data['order_discount'] = 0.00;
}
return $order_data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment