Re: splitting attendee name into separate fields.

Home Forums Ticket Products Event Tickets Plus Re: splitting attendee name into separate fields.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1342044
    Critter
    Participant

    As you can see from this post: I previously found a way to split the data into different fields…

    The only problem is… the order_id is not in the same position for every event. Is there a way to find out what index it’s located at… or retrieve the order_id a different way?

    $order = wc_get_order( (int) $attendee_record[6] );

    #1342568
    Critter
    Participant

    Ok… I figured out that I can get the ‘order id’ index by searching the first index of $items ($items[0]) for “Order ID”.

    $order_idx = array_search("Order ID", $items[0]);

    This allows me to pass it into the function later…

    $order = wc_get_order( (int) $attendee_record[$order_idx] );

    #1342612
    Victor
    Member

    Hi Critter!

    Glad to see you figured it out! Thanks for following up to let us know and for posting the solution so others can benefit from it.

    I’ll close this now, but feel free to open a new topic if anything comes up.

    Best,
    Victor

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Re: splitting attendee name into separate fields.’ is closed to new replies.