{"id":1498220,"date":"2018-04-05T19:10:27","date_gmt":"2018-04-06T02:10:27","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/map-tickets-to-events-after-website-migration\/"},"modified":"2018-04-05T19:10:27","modified_gmt":"2018-04-06T02:10:27","slug":"map-tickets-to-events-after-website-migration","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/map-tickets-to-events-after-website-migration\/","title":{"rendered":"Map tickets to events after website migration"},"content":{"rendered":"<p>Hi there,<\/p>\n<p>Recently I&#8217;ve migrated events, tickets, organizers, venues etc from one site to another.<br \/>\nI&#8217;ve migrated these with the WP All Import\/Export suite so each post type is migrated individually.<\/p>\n<p>I&#8217;ve created a custom script which updates the ID in the new site to the same ID in the old site for all the post types.<br \/>\nThis custom mapping is necessary due to the imports being given a new ID on import which results in the different post types not being mapped together.<br \/>\nIn other words, without custom ID mapping, an event would import and show as having no venue, organizer etc.<\/p>\n<p>After the ID mapping, each event shows with a venue and organizer however, tickets are not mapping.<\/p>\n<p>It appears an event post contains meta data for the organizer and venue so making the id in the venue meta table matche the id of the organizer and venue ensures organizers and venues display correctly on each event.<\/p>\n<p>The tickets however, are different.<br \/>\nEvents don&#8217;t contain meta data pointing to a ticket.<br \/>\nInstead, it almost appears as though ticket posts contain meta which points to an event and that that meta data pointing to the event is wrapped up in a serialized array.<\/p>\n<p>My question here is to inquire about exactly how tickets are referenced (or reference) events?<br \/>\nI&#8217;m confused about how exactly they relate to each other in the database.<br \/>\nOnce I know exactly how and why a ticket is able to show up on an event, I can write some functions to update the relevant data to re-map tickets to their respective events.<\/p>\n<p>Any help or references to documentation outlining the internals of how events reference tickets will be appreciated.<\/p>\n<p>Many thanks,<br \/>\nTom<\/p>\n","protected":false},"template":"","class_list":["post-1498220","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>Map tickets to events after website migration -<\/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\/map-tickets-to-events-after-website-migration\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Map tickets to events after website migration -\" \/>\n<meta property=\"og:description\" content=\"Hi there, Recently I&#8217;ve migrated events, tickets, organizers, venues etc from one site to another. I&#8217;ve migrated these with the WP All Import\/Export suite so each post type is migrated individually. I&#8217;ve created a custom script which updates the ID in the new site to the same ID in the old site for all the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/map-tickets-to-events-after-website-migration\/\" \/>\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\/map-tickets-to-events-after-website-migration\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/map-tickets-to-events-after-website-migration\/\",\"name\":\"Map tickets to events after website migration -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2018-04-06T02:10:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/map-tickets-to-events-after-website-migration\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/map-tickets-to-events-after-website-migration\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/map-tickets-to-events-after-website-migration\/#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\":\"Map tickets to events after website migration\"}]},{\"@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":"Map tickets to events after website migration -","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\/map-tickets-to-events-after-website-migration\/","og_locale":"en_US","og_type":"article","og_title":"Map tickets to events after website migration -","og_description":"Hi there, Recently I&#8217;ve migrated events, tickets, organizers, venues etc from one site to another. I&#8217;ve migrated these with the WP All Import\/Export suite so each post type is migrated individually. I&#8217;ve created a custom script which updates the ID in the new site to the same ID in the old site for all the [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/map-tickets-to-events-after-website-migration\/","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\/map-tickets-to-events-after-website-migration\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/map-tickets-to-events-after-website-migration\/","name":"Map tickets to events after website migration -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2018-04-06T02:10:27+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/map-tickets-to-events-after-website-migration\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/map-tickets-to-events-after-website-migration\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/map-tickets-to-events-after-website-migration\/#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":"Map tickets to events after website migration"}]},{"@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\/1498220","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\/1498220\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1498220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}