{"id":1964385,"date":"2025-04-17T15:25:50","date_gmt":"2025-04-17T19:25:50","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/?p=1964385"},"modified":"2026-04-09T14:54:30","modified_gmt":"2026-04-09T18:54:30","slug":"customizing-the-event-attendee-list","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/customizing-the-event-attendee-list\/","title":{"rendered":"Customizing the Event Attendee List"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-export-the-attendee-list-with-registration-fields\"><strong>Export the Attendee List with Registration Fields<\/strong><\/h2>\n\n\n\n<p>If you need to export an attendee list that includes all <strong>registration fields<\/strong>, simply exporting from the <strong>Attendees menu<\/strong> under the <strong>Tickets section<\/strong> may not capture all the data. Instead, follow the steps below to ensure your export includes attendee responses to all custom fields. This method ensures that all <strong>registration field data<\/strong> is included in the export, providing a complete and detailed attendee list with relevant responses. It allows for an easy and structured way to retrieve attendee data while maintaining an accurate record of event registrations.<\/p>\n\n\n\n<p>1. Go to your WordPress dashboard and navigate to <strong>Events > Events<\/strong>. Find the event for which you want to export the attendee data.<\/p>\n\n\n\n<p>   2. Hover over the event and click on <strong>Attendees<\/strong>. This will take you to the list of attendees for that specific event.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"169\" height=\"292\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/03\/Screenshot-2025-03-03-145948.png\" alt=\"\" class=\"wp-image-1964391\"\/><\/figure>\n\n\n\n<p>3. On the <strong>Attendees<\/strong> page, look for the <strong>Export<\/strong> button. Clicking this will generate a CSV file that includes all attendee details along with their responses to any registration fields, such as additional questions added via ticket fieldsets.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"394\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/03\/Attendee-Event-Attendee-list-Google-Chrome-2025-03-03-at-3.01.16-PM-1024x394.jpeg\" alt=\"\" class=\"wp-image-1964392\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/03\/Attendee-Event-Attendee-list-Google-Chrome-2025-03-03-at-3.01.16-PM-1024x394.jpeg 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/03\/Attendee-Event-Attendee-list-Google-Chrome-2025-03-03-at-3.01.16-PM-300x115.jpeg 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/03\/Attendee-Event-Attendee-list-Google-Chrome-2025-03-03-at-3.01.16-PM-768x296.jpeg 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/03\/Attendee-Event-Attendee-list-Google-Chrome-2025-03-03-at-3.01.16-PM-1536x591.jpeg 1536w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/03\/Attendee-Event-Attendee-list-Google-Chrome-2025-03-03-at-3.01.16-PM.jpeg 1881w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-add-columns-for-attendee-registration-information\">Add Columns for Attendee Registration Information<\/h2>\n\n\n\n<p>When we use <strong>additional fields<\/strong> for the Attendee Information Collection using the <strong><a href=\"https:\/\/theeventscalendar.com\/products\/wordpress-event-tickets\/\">Event Tickets Plus<\/a><\/strong> plugin, sometimes we will want to see this information as a new column in the Attendees list for each event.<\/p>\n\n\n\n<p>As an example for this guide, let&#8217;s add a &#8220;Company&#8221; text field to an event ticket:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"824\" height=\"494\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/AttendeeCollection.png\" alt=\"\" class=\"wp-image-1963544\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/AttendeeCollection.png 824w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/AttendeeCollection-300x180.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/AttendeeCollection-768x460.png 768w\" sizes=\"auto, (max-width: 824px) 100vw, 824px\" \/><\/figure><\/div>\n\n\n<p>The Event&#8217;s attendees will see this new field on their registration form and could provide this information:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"220\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CompanyACME-1024x220.png\" alt=\"\" class=\"wp-image-1963545\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CompanyACME-1024x220.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CompanyACME-300x64.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CompanyACME-768x165.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/CompanyACME.png 1043w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>But when we see the <strong><a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/tickets-managing-your-orders-and-attendees\/\" target=\"_blank\" rel=\"noreferrer noopener\">Attendee List<\/a><\/strong>, we don&#8217;t see this information on the table:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"272\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/AttendeesListDefault-1024x272.png\" alt=\"\" class=\"wp-image-1963546\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/AttendeesListDefault-1024x272.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/AttendeesListDefault-300x80.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/AttendeesListDefault-768x204.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/AttendeesListDefault.png 1153w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-the-snippet\">The Snippet<\/h4>\n\n\n\n<p>Carefully insert the following PHP code at the end of the <em>functions.php<\/em> theme file (ensure not to overwrite any existing code there) or by using the <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\">Code Snippets<\/a> plugin:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter ( &#039;tribe_events_tickets_attendees_table_column&#039;, function ( $value, $item, $column ) {\n\tif ($column === &#039;Company&#039;) {\n\t\t $value = $item&#x5B;&#039;company&#039;];\n\t}\n\treturn $value;\n}, 100, 3 );\n\nadd_filter( &#039;manage_tribe_events_page_tickets-attendees_columns&#039;, function ( $column_headers ) { \n    \/\/create a  new set of column headers \n    $new_column_headers = &#x5B;]; \n\tforeach ( $column_headers as $column_key =&gt; $column_name ) { \n\t\t$new_column_headers&#x5B;$column_key] = $column_name; \n\t\t\/\/Add order_date immediately after the ticket column \n\t\tif ( &#039;ticket&#039; == $column_key ) { \n\t\t\t$new_column_headers&#x5B;&#039;company&#039;] = &#039;Company&#039;; \n\t\t} \n\t}\n\treturn $new_column_headers;\n});\n<\/pre><\/div>\n\n\n<p>Don&#8217;t forget to replace the name of the field you are using (&#8216;company&#8217; in this example).<\/p>\n\n\n\n<p>After saving these changes, we should see a new custom column on the Event Attendees list: <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"287\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/AttendeesListCustomized-1024x287.png\" alt=\"\" class=\"wp-image-1963547\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/AttendeesListCustomized-1024x287.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/AttendeesListCustomized-300x84.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/AttendeesListCustomized-768x215.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/11\/AttendeesListCustomized.png 1148w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>We hope you\u2019ve found this helpful, but if you need further assistance, please feel free to reach out to us at our&nbsp;<a href=\"https:\/\/support.theeventscalendar.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">help desk<\/a>&nbsp;\u2013 good luck!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-display-security-code\">Display Security Code<\/h2>\n\n\n\n<p>Carefully insert the following PHP code at the end of the <em>functions.php<\/em> theme file (ensure not to overwrite any existing code there) or by using the <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\">Code Snippets<\/a> plugin:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter ( &#039;tribe_events_tickets_attendees_csv_export_columns&#039;, function( $columns ) {\n\t$columns&#x5B;&#039;security_code&#039;] = &#039;Security Code&#039;;\n\treturn $columns;\n} );\n\nadd_filter ( &#039;tribe_events_tickets_attendees_table_column&#039;, function ( $value, $item, $column ) {\n\tif ($column === &#039;security_code&#039;) {\n\t\t $value = $item&#x5B;&#039;security_code&#039;];\n\t}\n\treturn $value;\n}, 100, 3 );\n\nadd_filter( &#039;manage_tribe_events_page_tickets-attendees_columns&#039;, function ( $column_headers ) { \n    \/\/create a  new set of column headers \n    $new_column_headers = &#x5B;]; \n\tforeach ( $column_headers as $column_key =&gt; $column_name ) { \n\t\t$new_column_headers&#x5B;$column_key] = $column_name; \n\t\t\/\/Add order_date immediately after the ticket column \n\t\tif ( &#039;ticket&#039; == $column_key ) { \n\t\t\t$new_column_headers&#x5B;&#039;security_code&#039;] = &#039;Security Code&#039;; \n\t\t} \n\t}\n\treturn $new_column_headers;\n});\n<\/pre><\/div>\n\n\n<p>After you have inserted the code and saved it:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to the Attendees section under the Event Tickets menu in your admin panel.<\/li>\n\n\n\n<li>Verify that the columns for Security Code and Ticket ID are now present.<\/li>\n\n\n\n<li>Check a few entries to ensure that the columns are populating correctly.<\/li>\n<\/ul>\n\n\n\n<p>Here&#8217;s a screenshot showing how it should appear on your end, taken from one of our tests when using that snippet:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"3710\" height=\"2392\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/04\/attendee-list-security-code-column.png\" alt=\"\" class=\"wp-image-1959867\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/04\/attendee-list-security-code-column.png 3710w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/04\/attendee-list-security-code-column-300x193.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/04\/attendee-list-security-code-column-1024x660.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/04\/attendee-list-security-code-column-768x495.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/04\/attendee-list-security-code-column-1536x990.png 1536w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/04\/attendee-list-security-code-column-2048x1320.png 2048w\" sizes=\"auto, (max-width: 3710px) 100vw, 3710px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-show-registration-and-purchase-details\">Show Registration and Purchase Details<\/h2>\n\n\n\n<p>The following code will show the time of registration \/ purchase of an RSVP \/ ticket on the attendee list of an event. Copy the below code into your (child) theme&#8217;s functions.php file (or wherever you usually put custom code).<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;pre class=&quot;wp-block-syntaxhighlighter-code&quot;&gt;\nadd_action( &#039;event_tickets_attendees_table_ticket_column&#039;, &#039;add_registration_time_to_attendee_details&#039; );\nfunction add_registration_time_to_attendee_details( $item ) {\n\n\tif ( ! isset( $item&amp;#x5B;&#039;order_id&#039;] ) ) {\n\t\treturn;\n\t}\n\n\tif ( $item&amp;#x5B;&#039;provider_slug&#039;] == &#039;woo&#039; ) {\n\t\t$order_id = $item&amp;#x5B;&#039;qr_ticket_id&#039;];\n\t}\n\telse {\n\t\t$order_id = $item&amp;#x5B;&#039;order_id&#039;];\n\t}\n\n\t$registration_time = get_the_date( &#039;F j, Y&#039;, $order_id );\n\n\tif ( empty( $registration_time ) ) {\n\t\treturn;\n\t}\n\n\tprintf( &#039;&amp;amp;lt;div class=&amp;amp;quot;event-tickets-ticket-registration-time&amp;amp;quot;&amp;amp;gt;%1$s:&amp;amp;lt;br\/&amp;amp;gt;%2$s&amp;amp;lt;\/div&amp;amp;gt;&#039;, esc_html__( &#039;Registration Time&#039;, &#039;tribe-extension&#039; ), sanitize_text_field( $registration_time ) );\n}\n&lt;\/pre&gt;\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-add-woocommerce-order-data\">Add WooCommerce Order Data<\/h2>\n\n\n\n<p>If you&#8217;re using <strong>Event Tickets Plus<\/strong> with WooCommerce, you may find it helpful to have WooCommerce order data in your <strong>Attendee list<\/strong>\u2014for example, when processing offline payments and checking in attendees at the venue, you may want to know the Payment Method used by the attendee. By default, the attendee list only includes basic attendee information and does not include billing details.<\/p>\n\n\n\n<p>Using this guide you can add any WooCommerce order data to your attendee export.<\/p>\n\n\n\n<p>The code is designed for easy customization to fit your needs. To choose which fields appear in your attendee export, simply <strong>edit the <code>$fields<\/code> array<\/strong> at the top of the code. This list is what tells the rest of the code what values to pull in and put in the columns. <strong>It is the only part of the code that you need to edit.<\/strong><\/p>\n\n\n\n<p>We&#8217;ve pre-populated this list with the most common WooCommerce fields you might need. This saves you from having to look up each field name. Just <strong>delete any fields you don&#8217;t want<\/strong> from the list, and the code will automatically update the export for you.<\/p>\n\n\n\n<p><strong>NOTE: <\/strong>This is just part of the code used for explaining how it works &#8211; you will need to edit the full code found below for this to work.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$fields = &#x5B;\n    &#039;order_id&#039;       =&gt; &#039;Order ID&#039;,\n    &#039;order_number&#039;   =&gt; &#039;Order Number&#039;,\n    &#039;order_date&#039;     =&gt; &#039;Order Date&#039;,\n    &#039;payment_method&#039; =&gt; &#039;Payment Method&#039;,\n    &#039;transaction_id&#039; =&gt; &#039;Transaction ID&#039;,\n    &#039;order_status&#039;   =&gt; &#039;Order Status&#039;,\n    &#039;billing_name&#039;   =&gt; &#039;Billing Name&#039;,\n    &#039;billing_email&#039;  =&gt; &#039;Billing Email&#039;,\n    &#039;billing_phone&#039;  =&gt; &#039;Billing Phone&#039;,\n    &#039;billing_address&#039;=&gt; &#039;Billing Address&#039;,\n    &#039;shipping_address&#039;=&gt; &#039;Shipping Address&#039;,\n    &#039;order_total&#039;    =&gt; &#039;Order Total&#039;,\n    &#039;coupon_codes&#039;   =&gt; &#039;Coupon Codes&#039;,\n];\n<\/pre><\/div>\n\n\n<p>Using the example at the start, of needing to know the Payment Method that was used, the list would look like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n$fields = &#x5B;\n&#039;payment_method&#039; =&gt; &#039;Payment Method&#039;,\n];\n<\/pre><\/div>\n\n\n<p><\/p>\n\n\n\n<p>And this is how it would look like on the export.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2412\" height=\"397\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/08\/image-2.png\" alt=\"\" class=\"wp-image-1966594\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/08\/image-2.png 2412w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/08\/image-2-300x49.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/08\/image-2-1024x169.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/08\/image-2-768x126.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/08\/image-2-1536x253.png 1536w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/08\/image-2-2048x337.png 2048w\" sizes=\"auto, (max-width: 2412px) 100vw, 2412px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-the-snippet-0\">The Snippet<\/h4>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( &#039;tribe_events_tickets_attendees_csv_export_columns&#039;, function( $columns ) {\n    \/\/ This defines the fields you want to add. Please remove the ones you don&#039;t want in the export.\n    $fields = &#x5B;\n        &#039;order_id&#039;       =&gt; &#039;Order ID&#039;,\n        &#039;order_number&#039;   =&gt; &#039;Order Number&#039;,\n        &#039;order_date&#039;     =&gt; &#039;Order Date&#039;,\n        &#039;payment_method&#039; =&gt; &#039;Payment Method&#039;,\n        &#039;transaction_id&#039; =&gt; &#039;Transaction ID&#039;,\n        &#039;order_status&#039;   =&gt; &#039;Order Status&#039;,\n        &#039;billing_name&#039;   =&gt; &#039;Billing Name&#039;,\n        &#039;billing_email&#039;  =&gt; &#039;Billing Email&#039;,\n        &#039;billing_phone&#039;  =&gt; &#039;Billing Phone&#039;,\n        &#039;billing_address&#039;=&gt; &#039;Billing Address&#039;,\n        &#039;shipping_address&#039;=&gt; &#039;Shipping Address&#039;,\n        &#039;order_total&#039;    =&gt; &#039;Order Total&#039;,\n        &#039;coupon_codes&#039;   =&gt; &#039;Coupon Codes&#039;,\n    ];\n\n    return array_merge( $columns, $fields );\n} );\n\nadd_filter( &#039;tribe_events_tickets_attendees_table_column&#039;, function( $value, $item, $column ) {\n    \/\/ This static variable acts as the cache. It retains its value between function calls.\n    static $order_cache = &#x5B;];\n\n    if ( empty( $item&#x5B;&#039;order_id&#039;] ) ) {\n        return $value;\n    }\n\n    if ( ! isset( $order_cache&#x5B; $item&#x5B;&#039;order_id&#039;] ] ) ) {\n        $order_cache&#x5B; $item&#x5B;&#039;order_id&#039;] ] = wc_get_order( $item&#x5B;&#039;order_id&#039;] );\n    }\n    \n    $order = $order_cache&#x5B; $item&#x5B;&#039;order_id&#039;] ];\n\n   \n    if ( ! $order ) {\n        return $value;\n    }\n    \n    switch ( $column ) {\n        case &#039;order_id&#039;:\n            return $order-&gt;get_id();\n        case &#039;order_number&#039;:\n            return $order-&gt;get_order_number();\n        case &#039;order_date&#039;:\n            return $order-&gt;get_date_created() ? $order-&gt;get_date_created()-&gt;date( &#039;Y-m-d H:i&#039; ) : &#039;&#039;;\n        case &#039;payment_method&#039;:\n            return $order-&gt;get_payment_method_title();\n        case &#039;transaction_id&#039;:\n            return $order-&gt;get_transaction_id();\n        case &#039;order_status&#039;:\n            return $order-&gt;get_status();\n        case &#039;billing_name&#039;:\n            return $order-&gt;get_formatted_billing_full_name();\n        case &#039;billing_email&#039;:\n            return $order-&gt;get_billing_email();\n        case &#039;billing_phone&#039;:\n            return $order-&gt;get_billing_phone();\n        case &#039;billing_address&#039;:\n            return $order-&gt;get_formatted_billing_address();\n        case &#039;shipping_address&#039;:\n            return $order-&gt;get_formatted_shipping_address();\n        case &#039;order_total&#039;:\n            return $order-&gt;get_total();\n        case &#039;coupon_codes&#039;:\n            return implode( &#039;, &#039;, $order-&gt;get_coupon_codes() );\n        default:\n            return $value;\n    }\n\n}, 10, 3 );\n<\/pre><\/div>\n\n\n<p>To learn how to add custom code snippet to your site, you can <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/best-practices-for-implementing-custom-code-snippets\/\">use our guide here<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-finding-other-fields\">Finding Other Fields<\/h4>\n\n\n\n<p>In most cases, the fields listed above will be enough. However, if you need any other order field in the export, you can add your own. <\/p>\n\n\n\n<p>The code uses the <code>WC_Order<\/code> object, which is the official way to access all order data in WooCommerce.<\/p>\n\n\n\n<p><strong>For standard WooCommerce fields:<\/strong> You can find a comprehensive list of all available methods and properties on the official <a href=\"https:\/\/woocommerce.github.io\/code-reference\/classes\/WC-Order.html\"><strong>WooCommerce WC_Order Class Reference<\/strong> <\/a>page. Look for methods that start with <code>get_<\/code> (like <code>get_billing_phone()<\/code>, <code>get_total()<\/code>, etc.). The name after <code>get_<\/code> is what you should use as the key in the <code>$fields<\/code> array.<\/p>\n\n\n\n<p>For example, if you want to have the Billing Country on the column, in the reference linked above, we see that there is a <a href=\"https:\/\/woocommerce.github.io\/code-reference\/classes\/WC-Order.html#method_get_billing_country\">get_billing_country()<\/a> &nbsp;function. Since we need to remove the <code>get_<\/code> &#8211; we end up with only billing_country. To add this to the list, it should be formatted like this:<\/p>\n\n\n\n<p>&#8216;billing_country&#8217; =&gt; &#8216;Billing Country&#8217;,<\/p>\n\n\n\n<p>After this, you will need to add a <code>case<\/code>  in the switch statement in the second part of the code. For billing country, you need to add:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n        case &#039;billing_country&#039;:\n            return $order-&gt;get_billing_country();\n<\/pre><\/div>\n\n\n<p><strong>Just before default statement:<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n    default:\n        return $value;\n}\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"h-using-custom-fields\">Using Custom Fields<\/h4>\n\n\n\n<p><strong>For custom fields:<\/strong> Many plugins and custom code snippets add data to an order using &#8220;meta keys.&#8221; These are often prefixed with an underscore (<code>_<\/code>), but not always.<\/p>\n\n\n\n<p>To find these keys, the best way is to look at the raw order data. You can often find this in the WordPress dashboard: go to <strong>WooCommerce &gt; Orders<\/strong>, select an order, and look for a &#8220;Custom Fields&#8221; section.<\/p>\n\n\n\n<p>Once you know the meta key (e.g., <code>_my_custom_field<\/code>), you can retrieve its value using the <code>$order-&gt;get_meta()<\/code> function. The case for this would look like:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\ncase &#039;my_custom_field&#039;:\n    return $order-&gt;get_meta(&#039;_my_custom_field&#039;);\n<\/pre><\/div>\n\n\n<p>Then add it in the $fields array:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&#039;my_custom_field&#039; =&gt; &#039;My Custom Field Name&#039;,\n<\/pre><\/div>\n\n\n<p><strong>Important:<\/strong> The key you define in the <code>$fields<\/code> array (<code>my_custom_field<\/code> in the example above) must match the <code>case<\/code> statement in the code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Export the Attendee List with Registration Fields If you need to export an attendee list that includes all registration fields, simply exporting from the Attendees menu under the Tickets section may not capture all the data. Instead, follow the steps below to ensure your export includes attendee responses to all custom fields. This method ensures&#8230;<\/p>\n","protected":false},"author":27,"featured_media":1955565,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[88],"tags":[16,36],"stellar-product-taxonomy":[],"class_list":["post-1964385","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tickets","tag-attendee-registration","tag-exporting"],"acf":[],"taxonomy_info":{"category":[{"value":88,"label":"Ticketing"}],"post_tag":[{"value":16,"label":"Attendee Registration"},{"value":36,"label":"Exporting"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Abz","author_link":"https:\/\/theeventscalendar.com\/knowledgebase\/author\/abz\/"},"comment_info":0,"category_info":[{"term_id":88,"name":"Ticketing","slug":"tickets","term_group":0,"term_taxonomy_id":88,"taxonomy":"category","description":"","parent":61,"count":72,"filter":"raw","term_order":"0","cat_ID":88,"category_count":72,"category_description":"","cat_name":"Ticketing","category_nicename":"tickets","category_parent":61}],"tag_info":[{"term_id":16,"name":"Attendee Registration","slug":"attendee-registration","term_group":0,"term_taxonomy_id":16,"taxonomy":"post_tag","description":"","parent":0,"count":9,"filter":"raw","term_order":"0"},{"term_id":36,"name":"Exporting","slug":"exporting","term_group":0,"term_taxonomy_id":36,"taxonomy":"post_tag","description":"","parent":0,"count":8,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1964385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1964385"}],"version-history":[{"count":7,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1964385\/revisions"}],"predecessor-version":[{"id":1968719,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1964385\/revisions\/1968719"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1964385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1964385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1964385"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1964385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}