Title: Combine Custom Fields
Last modified: October 1, 2021

---

# Combine Custom Fields

 *  Resolved [darren91](https://wordpress.org/support/users/darren91/)
 * (@darren91)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/combine-custom-fields/)
 * Hi there, I’m hoping you can help as I’ve been stuck on this for a solid few 
   hours.
 * I’ve created a few new fields which on export currently on work if they are added
   as separate columns, however, I need them to be in the same column, and combining
   them using this method seems logical – [https://algolplus.freshdesk.com/support/solutions/articles/25000016635-add-calculated-field-for-order-](https://algolplus.freshdesk.com/support/solutions/articles/25000016635-add-calculated-field-for-order-)
 * I’ve tried replacing the values but cannot get it to work.
 * My 3 fields that need combining are ‘potatoextras’, ‘fridayextras’ and ‘sandwichextras’.
 * The field name for the export file can be ‘product-extras’.
 * Can you please help? I’ve already bought the pro version for the schedule features.
 * Thanks

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

 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/combine-custom-fields/#post-14929196)
 * Hello
 * Could you please visit >Setup Fields>Product Order Items and use field “Order
   item metadata” ?
 * Thanks, Alex
 *  Thread Starter [darren91](https://wordpress.org/support/users/darren91/)
 * (@darren91)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/combine-custom-fields/#post-14929207)
 * Hi, thanks for the reply. I’ve got those options in there and they do work, however,
   I need to merge them into one field, not 3 separate fields.
 * Each order will only have one of the fields filled, so there will not be any 
   mixed information.
 * For example order 1 will have information in ‘potatoextras’, order 2 will have
   info filled for ‘fridayextras’ etc.
 * How can I merge them on the output??
 * Thanks
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/combine-custom-fields/#post-14929314)
 * Hello
 * please, use this way [https://docs.algolplus.com/algol_order_export/add-calculated-field-for-product/](https://docs.algolplus.com/algol_order_export/add-calculated-field-for-product/)
 * function should use code like
    `return $item->get_meta("potatoextras") . $item-
   >get_meta("fridayextras") . $item->get_meta("sandwichextras");`
    -  This reply was modified 4 years, 8 months ago by [algol.plus](https://wordpress.org/support/users/algolplus/).
 *  Thread Starter [darren91](https://wordpress.org/support/users/darren91/)
 * (@darren91)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/combine-custom-fields/#post-14934968)
 * Brilliant that works perfectly, thanks very much!
 * One more question. I’ve got a custom field for ‘Collection Date’ which is different
   from the order date. The collection date field shows in the ‘Item Metadata’ section,
   and it shows the exact dates when I select ‘=’, but how can I show all orders
   for ‘today’? Or ‘tomorrow’?
 * I’ve tried {today} but did not work.
 * [https://fxrestaurant.com/wp-content/uploads/2021/10/Screenshot-2021-10-04-at-11.58.06.png](https://fxrestaurant.com/wp-content/uploads/2021/10/Screenshot-2021-10-04-at-11.58.06.png)
 * Cheers
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/combine-custom-fields/#post-14935018)
 * please, type tag {tomorrow} and add PHP code to build correct filter in backend.
 * more
    [https://docs.algolplus.com/algol_order_export/export-orders-based-on-delivery-date/](https://docs.algolplus.com/algol_order_export/export-orders-based-on-delivery-date/)
 *  Thread Starter [darren91](https://wordpress.org/support/users/darren91/)
 * (@darren91)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/combine-custom-fields/#post-14935179)
 * Thanks for the quick reply. I still can’t get it to work – [https://fxrestaurant.com/wp-content/uploads/2021/10/Screenshot-2021-10-04-at-12.43.09.png](https://fxrestaurant.com/wp-content/uploads/2021/10/Screenshot-2021-10-04-at-12.43.09.png)
 * I’m using this plugin if that helps? [https://www.themehigh.com/product/woocommerce-extra-product-options/](https://www.themehigh.com/product/woocommerce-extra-product-options/)
 * I’m able to add the field to the report and export the content correctly, as 
   well as filter by a single date.
 * Thanks
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/combine-custom-fields/#post-14935331)
 * 1. Please, run phpMyAdmin and review records in table wp_order_itemmeta
    Set 
   filter meta_key = collection_date
 * 2. Adjust format in code.
    But dd/mm/yy is wrong mask in any case more [https://www.php.net/manual/en/datetime.format.php](https://www.php.net/manual/en/datetime.format.php)
 *  Thread Starter [darren91](https://wordpress.org/support/users/darren91/)
 * (@darren91)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/combine-custom-fields/#post-14935542)
 * Hi,
 * This is the content of my Misc settings currently:
 *     ```
       add_filter('woe_settings_validate_defaults', function ($settings) {
         $settings = json_encode($settings);
         $tomorrow = date("d/m/y", strtotime("+1 day",  current_time( 'timestamp' ) ));
         $settings = str_replace( '{tomorrow}', $tomorrow, $settings);
         $settings = json_decode($settings, true);
         return $settings;
       } );
       ```
   
 * The key for the collection date is definitely ‘collection_date’, and I’ve changed
   the date format to ‘d/m/y’ which should be correct. This is the PHPmyadmin screenshot
   which shows the matching formats – [https://fxrestaurant.com/wp-content/uploads/2021/10/Screenshot-2021-10-04-at-14.09.29.png](https://fxrestaurant.com/wp-content/uploads/2021/10/Screenshot-2021-10-04-at-14.09.29.png)
 * It just shows as ‘No results’ when I preview it.
 * Any ideas? Thanks very much
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/combine-custom-fields/#post-14935567)
 * Please, use d/m/Y
 *  Thread Starter [darren91](https://wordpress.org/support/users/darren91/)
 * (@darren91)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/combine-custom-fields/#post-14935588)
 * Amazing thank you so much!
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/combine-custom-fields/#post-14935591)
 * You’re welcome

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

The topic ‘Combine Custom Fields’ 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/)

 * 11 replies
 * 2 participants
 * Last reply from: [algol.plus](https://wordpress.org/support/users/algolplus/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/combine-custom-fields/#post-14935591)
 * Status: resolved