Title: Custom field export
Last modified: June 27, 2019

---

# Custom field export

 *  Resolved [steveklt](https://wordpress.org/support/users/steveklt/)
 * (@steveklt)
 * [7 years ago](https://wordpress.org/support/topic/custom-field-export/)
 * Hi,
    I want to export three different meta into one field. Specifically I want
   to have (qty x name). Right now i have succesfully managed to export only (qty
   x name) using the following php: add_filter(‘woe_get_order_value_all_products’,
   function ($value, $order,$fieldname) { $lines = array(); foreach($order->get_items()
   as $item) { $lines[] = $item[“qty”]. ” x ” .$item[“name”]; } return join(“, “,
   $lines); },10,3);
 * Can you please tell how can I achieve having the (qty x SKU + customer notes)
   all in one cell of the exported xls file?
    Thank you for the great plugin.

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

 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [7 years ago](https://wordpress.org/support/topic/custom-field-export/#post-11679798)
 * try use
 * `return join(", ", $lines) . $order->get_customer_note();`
    -  This reply was modified 7 years ago by [algol.plus](https://wordpress.org/support/users/algolplus/).
 *  Thread Starter [steveklt](https://wordpress.org/support/users/steveklt/)
 * (@steveklt)
 * [7 years ago](https://wordpress.org/support/topic/custom-field-export/#post-11679821)
 * Thank you, it works, but can you please advise me how to get “sku” instead of“
   name”? Also i want an an empty space before customer note if it is possible.
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [7 years ago](https://wordpress.org/support/topic/custom-field-export/#post-11679853)
 * add inside **foreach**
 * `$product = $order->get_product_from_item( $item );`
    and use $product->get_sku()
   instead of $item[“name”]
 * add space
    `return join(", ", $lines) . " ".$order->get_customer_note();`
 * more functions – [https://algolplus.com/plugins/code-samples/](https://algolplus.com/plugins/code-samples/)
    -  This reply was modified 7 years ago by [algol.plus](https://wordpress.org/support/users/algolplus/).
 *  Thread Starter [steveklt](https://wordpress.org/support/users/steveklt/)
 * (@steveklt)
 * [7 years ago](https://wordpress.org/support/topic/custom-field-export/#post-11679869)
 * You are awesome. Thank you for everything. keep it up!
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [7 years ago](https://wordpress.org/support/topic/custom-field-export/#post-11680708)
 * you’re welcome.
    -  This reply was modified 7 years ago by [algol.plus](https://wordpress.org/support/users/algolplus/).

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

The topic ‘Custom field export’ 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/)

 * 5 replies
 * 2 participants
 * Last reply from: [algol.plus](https://wordpress.org/support/users/algolplus/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/custom-field-export/#post-11680708)
 * Status: resolved