• Resolved Luke Hutchison

    (@luclearmedia)


    Hi there, I’m looking to concatenate multiple fields into one Column. I have a product addons plugin that adds meta fields. I am able to grab the custom fields and place into separate columns, but I can’t figure out the PHP required to combine them (I did look at your website and have looked through the forums). For instance, the names of the meta fields are “_Full Name_966”, “_Full Name_4416”, “_Full Name_986” etc.

    Using the instructions on the website, $item[“”] and $item_meta[“”] weren’t able to pull this information.

    I purchased the plugin already.

    Please help – thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Luke Hutchison

    (@luclearmedia)

    This is what I have so far:

    add_filter(‘woe_get_order_product_value_combinednames’, function ($value, $order, $item, $product,$item_meta) {
    $value = $product->get_meta(‘_Full Name_966’) . $product->get_meta(‘_Full Name_4416’) . $product->get_meta(‘_Full Name_986’) ;
    return $value;
    },10,3);

    ‘combinednames’ is the name of my calculated field.

    But I’m unsure where I’m going wrong. The output is blank.

    Plugin Author algol.plus

    (@algolplus)

    hi Luke

    it seems addons plugin fills item meta.

    so you should try

    add_filter(‘woe_get_order_product_value_combinednames’, function ($value, $order, $item, $product,$item_meta) {
    $value = $item->get_meta("_Full Name_966") . $item->get_meta("_Full Name_4416") . $item->get_meta("_Full Name_986") ;
    return $value;
    },10,5);

    Thread Starter Luke Hutchison

    (@luclearmedia)

    Hi! Thank you for the response. I tried this code but the output for that column is still empty.

    Here are the fields in the export:
    <a href=”https://snipboard.io/tQ2UnN.jpg “>https://snipboard.io/tQ2UnN.jpg
    Are the meta values incorrect? There is a space in there, and usually meta keys don’t have spaces.

    Plugin Author algol.plus

    (@algolplus)

    hi @luclearmedia

    please, submit your settings as new ticket https://algolplus.freshdesk.com/ use tab Tools to get them.

    but I travel today, so I will reply only tomorrow.

    Thread Starter Luke Hutchison

    (@luclearmedia)

    Thank you – I’ll log a ticket. Safe travels!

    Thread Starter Luke Hutchison

    (@luclearmedia)

    Hey, just an update for anyone reading this. Alex solved my problem!

    I had an issue but Alex solved it quickly. I highly recommend getting a pro license for the solid support.

    Thanks so much Alex!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Combining Custom Fields into one Column’ is closed to new replies.