{"id":1970144,"date":"2026-04-23T18:23:29","date_gmt":"2026-04-23T22:23:29","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/?p=1970144"},"modified":"2026-04-23T18:24:21","modified_gmt":"2026-04-23T22:24:21","slug":"customize-tickets-app","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/customize-tickets-app\/","title":{"rendered":"Customizing the Event Tickets Plus App"},"content":{"rendered":"\n<p>The Event Tickets Plus App communicates with your WordPress site through the REST API. The snippets on this page let you modify what the app receives.<\/p>\n\n\n\n<p>The customizations in this article are all code snippets. Add them to your child theme&#8217;s <code>functions.php<\/code> file or use the Code Snippets plugin. If code snippets are new to you, start with <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/code-snippets\/\">Using Code Snippets to Customize The Events Calendar<\/a> for a walkthrough.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-hiding-attendee-information-in-the-app\">Hiding Attendee Information in the App<\/h2>\n\n\n\n<p>In some scenarios, it&#8217;s important not to display attendee information on the scan result or within the Events screen of the app \u2014 for privacy reasons, for staff with limited access rights, or to comply with an internal policy. The snippet below filters the REST API responses the app receives, replacing attendee names, emails, and payment details with placeholder values before they reach the app. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&amp;amp;lt;?php \/\/* Do NOT include the opening php tag\n\nadd_filter(\n    &#039;rest_request_after_callbacks&#039;,\n    &#039;tec_tickets_maybe_hide_attendee_information_for_app&#039;,\n    10,\n    3\n);\n\n\/**\n * Maybe hide information for the ET+ APP.\n *\n * @param WP_REST_Response|WP_HTTP_Response|WP_Error|mixed $response Result to send to the client.\n * @param array                                            $handler  Route handler used for the request.\n * @param WP_REST_Request                                  $request  Request used to generate the response.\n *\n * @return WP_REST_Response|WP_HTTP_Response|WP_Error|mixed\n *\/\nfunction tec_tickets_maybe_hide_attendee_information_for_app( $response, array $handler, \\WP_REST_Request $request ) {\n    if ( empty( $request-&amp;amp;gt;get_header( &#039;App-version&#039; ) ) ) {\n        return $response;\n    }\n\n    if ( &#039;\/tribe\/tickets\/v1\/attendees&#039; === $request-&amp;amp;gt;get_route() ) {\n        \/\/ Hide the attendee information from the attendee endpoint.\n        $response = tec_tickets_hide_attendee_information_attendee_endpoint( $response, $handler, $request );\n    }\n\n    if ( &#039;\/tribe\/tickets\/v1\/qr&#039; === $request-&amp;amp;gt;get_route() ) {\n        \/\/ Update QR response, hiding the attendee information.\n        $response = tec_tickets_hide_attendee_information_qr_endpoint( $response, $handler, $request );\n    }\n\n    if ( &#039;\/tribe\/events\/v1\/events&#039; === $request-&amp;amp;gt;get_route() ) {\n        \/\/ If you want to hide Events for the APP, or do something with this endpoint.\n    }\n\n    return $response;\n}\n\n\/**\n * Hide the attendee information from the attendees endpoint.\n *\/\nfunction tec_tickets_hide_attendee_information_attendee_endpoint( $response, array $handler, \\WP_REST_Request $request ) {\n    if ( empty( $response-&amp;amp;gt;data&#x5B;&#039;attendees&#039;] ) ) {\n        return $response;\n    }\n\n    foreach ( $response-&amp;amp;gt;data&#x5B;&#039;attendees&#039;] as &amp;amp;amp;$attendee ) {\n        $attendee&#x5B;&#039;title&#039;]               = &#039;Hidden Name&#039;;\n        $attendee&#x5B;&#039;email&#039;]               = &#039;hidden@example.com&#039;;\n        $attendee&#x5B;&#039;payment&#039;]&#x5B;&#039;currency&#039;] = &#039;&#039;;\n        $attendee&#x5B;&#039;payment&#039;]&#x5B;&#039;date&#039;]     = &#039;&#039;;\n        $attendee&#x5B;&#039;payment&#039;]&#x5B;&#039;price&#039;]    = &#039;Unavailable&#039;;\n        $attendee&#x5B;&#039;information&#039;]         = &#x5B;];\n        $attendee&#x5B;&#039;information&#039;]&#x5B;&#039;Information&#039;] = &#039;The attendee information is private. For more information please contact the site administrator.&#039;;\n    }\n\n    return $response;\n}\n\n\/**\n * Hide the attendee information from the QR endpoint.\n *\/\nfunction tec_tickets_hide_attendee_information_qr_endpoint( $response, array $handler, \\WP_REST_Request $request ) {\n    if ( empty( $response-&amp;amp;gt;data&#x5B;&#039;attendee&#039;] ) ) {\n        return $response;\n    }\n\n    $response-&amp;amp;gt;data&#x5B;&#039;attendee&#039;]&#x5B;&#039;title&#039;]               = &#039;Hidden Name&#039;;\n    $response-&amp;amp;gt;data&#x5B;&#039;attendee&#039;]&#x5B;&#039;email&#039;]               = &#039;hidden@example.com&#039;;\n    $response-&amp;amp;gt;data&#x5B;&#039;attendee&#039;]&#x5B;&#039;payment&#039;]&#x5B;&#039;currency&#039;] = &#039;&#039;;\n    $response-&amp;amp;gt;data&#x5B;&#039;attendee&#039;]&#x5B;&#039;payment&#039;]&#x5B;&#039;date&#039;]     = &#039;&#039;;\n    $response-&amp;amp;gt;data&#x5B;&#039;attendee&#039;]&#x5B;&#039;payment&#039;]&#x5B;&#039;price&#039;]    = &#039;Unavailable&#039;;\n    $response-&amp;amp;gt;data&#x5B;&#039;attendee&#039;]&#x5B;&#039;information&#039;]         = &#x5B;];\n    $response-&amp;amp;gt;data&#x5B;&#039;attendee&#039;]&#x5B;&#039;information&#039;]&#x5B;&#039;Information&#039;] = &#039;The attendee information is private. For more information please contact the site administrator.&#039;;\n\n    return $response;\n}\n\n<\/pre><\/div>\n\n\n<p>This snippet is also available <a href=\"https:\/\/gist.github.com\/juanfra\/6ad04fcf9e1a358c5a2e5cca31516cf6\">on GitHub<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-adding-the-qr-code-to-the-csv-export\">Adding the QR Code to the CSV Export<\/h2>\n\n\n\n<p>If you want to print badges for your attendees that incorporate the QR code for faster check-in, you can do so with tools like <a href=\"https:\/\/www.avery.com\/software\/design-and-print\/\">Avery<\/a>, <a href=\"https:\/\/label.live\/\">Label.live<\/a>, and others. Just make sure you choose an application that can generate QR codes from a CSV file.<\/p>\n\n\n\n<p>The snippet below adds a <strong>QR Data<\/strong> column to your event&#8217;s <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/tickets-managing-your-orders-and-attendees\/\">Attendees List<\/a> and its CSV export. That column contains the URL your badge or label-maker application will use to generate the QR code.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nadd_filter( &#039;tribe_events_tickets_attendees_csv_export_columns&#039;, function( $columns ) {\n    $columns_to_add = &#x5B;\n        &#039;qr_data&#039; =&amp;amp;gt; &#039;QR Data&#039;,\n    ];\n    $columns = array_merge( $columns, $columns_to_add );\n    return $columns;\n}, 100 );\n\nadd_filter( &#039;tribe_events_tickets_attendees_table_column&#039;, function ( $value, $item, $column ) {\n    if ( $column == &#039;qr_data&#039; ) {\n        $path = &#039;?event_qr_code=1&amp;amp;amp;ticket_id=&#039; . $item&#x5B;&#039;qr_ticket_id&#039;] .\n                &#039;&amp;amp;amp;event_id=&#039; . $item&#x5B;&#039;event_id&#039;] .\n                &#039;&amp;amp;amp;security_code=&#039; . $item&#x5B;&#039;security_code&#039;] .\n                &#039;&amp;amp;amp;path=&#039; . urlencode( tribe_tickets_rest_url_prefix() . &#039;\/qr&#039; );\n        $value = get_site_url( null, $path, &#039;https&#039; );\n    }\n    return $value;\n}, 100, 3 );\n\nadd_filter( &#039;manage_tribe_events_page_tickets-attendees_columns&#039;, function ( $column_headers ) {\n    $new_columns_to_add = &#x5B;\n        &#039;qr_data&#039; =&amp;amp;gt; &#039;QR Data&#039;,\n    ];\n\n    \/\/ Add QR Data column immediately after the ticket column.\n    $insert_at = array_search( &#039;ticket&#039;, array_keys( $column_headers ) );\n    $column_headers = array_merge(\n        array_slice( $column_headers, 0, $insert_at, true ),\n        $new_columns_to_add,\n        array_slice( $column_headers, $insert_at, null, true )\n    );\n\n    return $column_headers;\n}, 100 );\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-disabling-the-events-functionality-on-the-app\">Disabling the &#8220;Events&#8221; Functionality on the App<\/h2>\n\n\n\n<p>In some cases, you may want to hide the Events list from the app entirely \u2014 for example, when the app is only used for scanning and you don&#8217;t want check-in staff browsing event details.<\/p>\n\n\n\n<p>The snippet below returns a 404 for the app&#8217;s Events endpoint, causing the Events screen in the app to display as empty:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&amp;amp;lt;?php \/\/* Do NOT include the opening php tag\n\nadd_filter(\n    &#039;rest_request_after_callbacks&#039;,\n    &#039;tec_tickets_maybe_disable_events_for_app&#039;,\n    10,\n    3\n);\n\n\/**\n * Maybe disable events for the ET+ APP.\n *\n * @param WP_REST_Response|WP_HTTP_Response|WP_Error|mixed $response Result to send to the client.\n * @param array                                            $handler  Route handler used for the request.\n * @param WP_REST_Request                                  $request  Request used to generate the response.\n *\n * @return WP_REST_Response|WP_HTTP_Response|WP_Error|mixed\n *\/\nfunction tec_tickets_maybe_disable_events_for_app( $response, array $handler, \\WP_REST_Request $request ) {\n    if ( empty( $request-&amp;amp;gt;get_header( &#039;App-version&#039; ) ) ) {\n        return $response;\n    }\n\n    if ( &#039;\/tribe\/events\/v1\/events&#039; !== $request-&amp;amp;gt;get_route() ) {\n        return $response;\n    }\n\n    $response = new WP_REST_Response(\n        &#x5B;\n            &#039;code&#039;    =&amp;amp;gt; &#039;rest_no_route&#039;,\n            &#039;message&#039; =&amp;amp;gt; &#039;No route was found matching the URL and request method.&#039;,\n        ]\n    );\n\n    $response-&amp;amp;gt;set_status( 404 );\n\n    return $response;\n}\n\n<\/pre><\/div>\n\n\n<p>This snippet is also available <a href=\"https:\/\/gist.github.com\/juanfra\/a11936a15e1da39c291cb8e92994aa9b\">on GitHub<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Event Tickets Plus App communicates with your WordPress site through the REST API. The snippets on this page let you modify what the app receives. Hiding Attendee Information in the App In some scenarios, it&#8217;s important not to display attendee information on the scan result or within the Events screen of the app \u2014&#8230;<\/p>\n","protected":false},"author":5,"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":[24,346,59],"tags":[],"stellar-product-taxonomy":[],"class_list":["post-1970144","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing","category-tickets-app","category-php"],"acf":[],"taxonomy_info":{"category":[{"value":24,"label":"Customizing"},{"value":346,"label":"Event Tickets App"},{"value":59,"label":"PHP"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Leah","author_link":"https:\/\/theeventscalendar.com\/knowledgebase\/author\/leahk\/"},"comment_info":0,"category_info":[{"term_id":24,"name":"Customizing","slug":"customizing","term_group":0,"term_taxonomy_id":24,"taxonomy":"category","description":"","parent":0,"count":67,"filter":"raw","term_order":"0","cat_ID":24,"category_count":67,"category_description":"","cat_name":"Customizing","category_nicename":"customizing","category_parent":0},{"term_id":346,"name":"Event Tickets App","slug":"tickets-app","term_group":0,"term_taxonomy_id":346,"taxonomy":"category","description":"","parent":0,"count":4,"filter":"raw","term_order":"0","cat_ID":346,"category_count":4,"category_description":"","cat_name":"Event Tickets App","category_nicename":"tickets-app","category_parent":0},{"term_id":59,"name":"PHP","slug":"php","term_group":0,"term_taxonomy_id":59,"taxonomy":"category","description":"","parent":24,"count":52,"filter":"raw","term_order":"0","cat_ID":59,"category_count":52,"category_description":"","cat_name":"PHP","category_nicename":"php","category_parent":24}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1970144","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1970144"}],"version-history":[{"count":2,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1970144\/revisions"}],"predecessor-version":[{"id":1970146,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1970144\/revisions\/1970146"}],"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=1970144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1970144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1970144"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1970144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}