From 0c9ef051034a37f5f5ba1ef1bcc48ec7d0ca490e Mon Sep 17 00:00:00 2001 From: Jeff Stieler Date: Fri, 21 Jun 2019 10:36:18 -0600 Subject: [PATCH] Include export type with column value callback. --- .../includes/export/class-wc-admin-report-csv-exporter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/woocommerce-admin/includes/export/class-wc-admin-report-csv-exporter.php b/plugins/woocommerce-admin/includes/export/class-wc-admin-report-csv-exporter.php index 0535153c0e6..41d77188687 100644 --- a/plugins/woocommerce-admin/includes/export/class-wc-admin-report-csv-exporter.php +++ b/plugins/woocommerce-admin/includes/export/class-wc-admin-report-csv-exporter.php @@ -187,11 +187,11 @@ class WC_Admin_Report_CSV_Exporter extends WC_CSV_Batch_Exporter { if ( has_filter( "woocommerce_export_{$this->export_type}_column_{$column_name}" ) ) { // Filter for 3rd parties. - $value = apply_filters( "woocommerce_export_{$this->export_type}_column_{$column_name}", '', $item, $column_name ); + $value = apply_filters( "woocommerce_export_{$this->export_type}_column_{$column_name}", '', $item ); } elseif ( is_callable( array( $this, "get_column_value_{$column_name}" ) ) ) { // Handle special columns which don't map 1:1 to item data. - $value = $this->{"get_column_value_{$column_name}"}( $item ); + $value = $this->{"get_column_value_{$column_name}"}( $item, $this->export_type ); } $row[ $column_id ] = $value;