I am using WooCommerce Customer/Order CSV Export plugin and would like to use a code snippet in my themes functions.php to create the required CSV format. The next code snippet fills the new columns with data, but I want to combine some of the WooCommerce checkout fields together in column 4, but how do I do that? The outlined code is not working..
function wc_csv_export_modify_row_data( $order_data, $order, $csv_generator ) {
$custom_data = array(
'column_1' => '2',
'column_2' => '302115',
'column_3' => '[Klant]',
'column_4' => get_post_meta( $order->id, '_shipping_first_name', true ),
/*'column_4' => $order_data['_shipping_first_name'].''.['_shipping_last_name'].'¶'.
$order_data['_shipping_address_1'].'¶'.
$order_data['_shipping_address_2'].'¶'.''.'¶'.
$order_data['_shipping_postcode'].'¶'.
$order_data['_shipping_city'].'¶'.
$order_data['_shipping_country'].'¶'.
$order_data['_billing_email'].'¶'.
$order_data['_shipping_company'],*/
'column_5' => 'SEL'
);