{"id":1243594,"date":"2017-02-22T00:36:33","date_gmt":"2017-02-22T08:36:33","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/"},"modified":"2017-02-22T00:36:33","modified_gmt":"2017-02-22T08:36:33","slug":"_tribe_tickets_attendee_user_id-meta-is-being-set-to-0","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/","title":{"rendered":"_tribe_tickets_attendee_user_id meta is being set to &quot;0&quot;"},"content":{"rendered":"<p>This bug has been reported earlier on <a href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta_value-being-set-to-0\/\">this thread<\/a>, but it was closed (without being resolved) due to inactivity.<\/p>\n<p>I am attempting to write a query to show a customer the various events they have purchased a ticket for, and I&#8217;m querying all the post_type &#8220;tribe_wootickets&#8221; and looking for a matching user ID in the post_meta. But this particular key (which would be very helpful) is set to &#8220;0&#8221;.<\/p>\n<p>My best guess about why it might not be working is that this is a new customer (who is not logged in while shopping), and I have woocommerce set to create a user account for that customer upon checkout. If it is an existing logged-in user who purchases a ticket, the _tribe_tickets_attendee_user_id meta value is being set properly.<\/p>\n<p>If this is the case, I would strongly suggest you incorporate some method of updating that meta_value after the order has gone through and you are able to retrieve the fresh new user ID that has been associated with the order. Otherwise this meta_key is simply not a reliable source of information.<\/p>\n","protected":false},"template":"","class_list":["post-1243594","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>_tribe_tickets_attendee_user_id meta is being set to &quot;0&quot; -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"_tribe_tickets_attendee_user_id meta is being set to &quot;0&quot; -\" \/>\n<meta property=\"og:description\" content=\"This bug has been reported earlier on this thread, but it was closed (without being resolved) due to inactivity. I am attempting to write a query to show a customer the various events they have purchased a ticket for, and I&#8217;m querying all the post_type &#8220;tribe_wootickets&#8221; and looking for a matching user ID in the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/\",\"name\":\"_tribe_tickets_attendee_user_id meta is being set to &quot;0&quot; -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-02-22T08:36:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ticket Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Event Tickets Plus\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"_tribe_tickets_attendee_user_id meta is being set to &quot;0&quot;\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"_tribe_tickets_attendee_user_id meta is being set to &quot;0&quot; -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/","og_locale":"en_US","og_type":"article","og_title":"_tribe_tickets_attendee_user_id meta is being set to &quot;0&quot; -","og_description":"This bug has been reported earlier on this thread, but it was closed (without being resolved) due to inactivity. I am attempting to write a query to show a customer the various events they have purchased a ticket for, and I&#8217;m querying all the post_type &#8220;tribe_wootickets&#8221; and looking for a matching user ID in the [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/","name":"_tribe_tickets_attendee_user_id meta is being set to &quot;0&quot; -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-02-22T08:36:33+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/_tribe_tickets_attendee_user_id-meta-is-being-set-to-0\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Ticket Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/"},{"@type":"ListItem","position":4,"name":"Event Tickets Plus","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/"},{"@type":"ListItem","position":5,"name":"_tribe_tickets_attendee_user_id meta is being set to &quot;0&quot;"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1243594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1243594\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1243594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}