Adding Fields from an Array
FooEvents plugin is saving custom meta to a WooCommerce order, as a custom field, with an array as the value.
I have used PHP echo to print_r the get_post_meta for the order custom meta key of WooCommerceEventsOrderTickets
The result is below, to give you an idea of the array.
I am looking to add a column for a handful of the fields within this array. Such as WooCommerceEventsAttendeeName, WooCommerceEventsAttendeeLastName, and fooevents_custom_organization
Can you provide any assistance with this? It would maybe be a great use case for your current Extra (Experimental) Columns plugin, since FooEvents is a pretty popular plugin with WooCommerce. It would be great to be able to tweak that file, to output some of the fields from this array.
For now, I’ve added the array itself to the Column (e.g., https://d.pr/free/i/7SEAmJ), but the data doesn’t get exported with the CSV. :(
Array (  => Array (  => Array ( [WooCommerceEventsProductID] => 454 [WooCommerceEventsOrderID] => 4609 [WooCommerceEventsTicketType] => [WooCommerceEventsStatus] => Unpaid [WooCommerceEventsCustomerID] => 64 [WooCommerceEventsAttendeeName] => AttendeeFirst [WooCommerceEventsAttendeeLastName] => AttendeeLast [WooCommerceEventsAttendeeEmail] => firstname.lastname@example.org [WooCommerceEventsAttendeeTelephone] => 607-123-4567 [WooCommerceEventsAttendeeCompany] => [WooCommerceEventsAttendeeDesignation] => [WooCommerceEventsVariations] => Array ( [attribute_pa_registration-options] => nassgap-member ) [WooCommerceEventsVariationID] => 4078 [WooCommerceEventsPrice] => $675.00 [WooCommerceEventsPurchaserFirstName] => Jon [WooCommerceEventsPurchaserLastName] => Fuller [WooCommerceEventsPurchaserEmail] => email@example.com [WooCommerceEventsCustomAttendeeFields] => Array ( [fooevents_custom_address] => 123 Attendee St [fooevents_custom_city] => Attendee City [fooevents_custom_state/province] => Nevada [fooevents_custom_postal_code] => 13813 [fooevents_custom_organization] => Attendee LLC [fooevents_custom_title] => Attendee Title ) ) ) )
Any assistance would be appreciated!
You must be logged in to reply to this topic.