Title: Add a custom array to automatic export, please!
Last modified: August 31, 2016

---

# Add a custom array to automatic export, please!

 *  Resolved [cfeldens](https://wordpress.org/support/users/cfeldens/)
 * (@cfeldens)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/add-a-custom-array-to-automatic-export-please/)
 * Thanks for your plugin!
 * I am on the pro version by the way
    Is it possible to add a custom array to the
   automatic order export file?
 *  “name_new_array”:[
    {“copy payment title”:”COD”, “copy order total”:”250.10″}]
 * Excuse me. My english is very weak 🙂
 * Thanks
 * [https://wordpress.org/plugins/woo-order-export-lite/](https://wordpress.org/plugins/woo-order-export-lite/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/add-a-custom-array-to-automatic-export-please/#post-7445903)
 * try this code
 * you should use lastest version which I’ve sent just now !
 *     ```
       //1. add fields
       add_filter('woe_get_order_fields', 'woe_func_add_order_fields');
       function woe_func_add_order_fields($fields) {
       	$fields['name_new_array'] = array( 'label' => 'name_new_array', 'colname' => 'name_new_array', 'segment' => 'common', 'checked' => 1 );
       	return $fields;
       }
   
       //2. prepare field for json
       add_filter('woe_get_order_json_value_name_new_array', 'woe_get_value_name_new_array', 10, 2);
       function woe_get_value_name_new_array($value,$obj_order) {
       	return array(
       		"copy payment title"=>$obj_order->payment_method_title,
       		"copy order total"=>$obj_order->get_total(),
       	) ;
       }
       ```
   
 *  Thread Starter [cfeldens](https://wordpress.org/support/users/cfeldens/)
 * (@cfeldens)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/add-a-custom-array-to-automatic-export-please/#post-7446113)
 * Fantastic. Excellent. Perfect.
    The best plugins and support export orders for
   Woocommerce. Success! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Add a custom array to automatic export, please!’ is closed to new replies.

 * ![](https://ps.w.org/woo-order-export-lite/assets/icon-256x256.png?rev=1365554)
 * [Advanced Order Export For WooCommerce](https://wordpress.org/plugins/woo-order-export-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-order-export-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-order-export-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-order-export-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-order-export-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-order-export-lite/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [cfeldens](https://wordpress.org/support/users/cfeldens/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/add-a-custom-array-to-automatic-export-please/#post-7446113)
 * Status: resolved