Woocommerce - Customer Order CSV Export - Trying to Export Add a "Tag" Field [on hold]

Our company has purchased the plugin WooCommerce - Customer Order CSV Export from WooThemes. We wish to have the ability to add a column in which the tags displayed on the Woocommerce product are visible. I have looked over the documentation Here and have made very little progress. If someone could provide some insight I would greatly appreciate it.

Here is the code I have on my child themes function file. The column appears with the heading 'BIN' however no content is displayed:

// add custom column headers function wc_csv_export_modify_column_headers( $column_headers ) {       $new_headers = array(         'column_1' => 'BIN',         // add other column headers here in the format column_key => Column Name     );      return array_merge( $column_headers, $new_headers ); } add_filter( 'wc_customer_order_csv_export_order_headers', 'wc_csv_export_modify_column_headers' ); // set the data for each for custom columns function wc_csv_export_modify_row_data( $order_data, $post, $csv_generator ) {      $custom_data = array(         'column_1' => get_post_meta( $post->id, 'product_tag', true ),         // add other row data here in the format column_key => data     );      $new_order_data = array();     if ( isset( $csv_generator->order_format ) && ( 'default_one_row_per_item' == $csv_generator->order_format || 'legacy_one_row_per_item' == $csv_generator->order_format ) ) {         foreach ( $order_data as $data ) {             $new_order_data[] = array_merge( (array) $data, $custom_data );         }     } else {         $new_order_data = array_merge( $order_data, $custom_data );     }     return $new_order_data; } add_filter( 'wc_customer_order_csv_export_order_row', 'wc_csv_export_modify_row_data', 10, 3 ); 


Category: plugins Time: 2016-07-28 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.132 (s). 12 q(s)