{"id":1145416,"date":"2016-07-28T19:41:29","date_gmt":"2016-07-29T02:41:29","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-datetime-and-venue-to-cart-order\/"},"modified":"2016-07-28T19:41:29","modified_gmt":"2016-07-29T02:41:29","slug":"add-event-datetime-and-venue-to-cart-order","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-datetime-and-venue-to-cart-order\/","title":{"rendered":"Add event date\/time and venue to cart order"},"content":{"rendered":"<p>Hi TEC team<\/p>\n<p>I am using the snippet below from another forum post and I&#8217;d like to add the event date, time and venue in the cart view as well. Each of my tickets are General Admission but I have hundreds of events at various locations so its important it is clear throughout the booking process&#8230;.what am I doing wrong?<\/p>\n<p>\/**<br \/>\n * Example for adding event data to WooCommerce checkout for Events Calendar tickets.<br \/>\n * @link http:\/\/theeventscalendar.com\/support\/forums\/topic\/event-title-and-date-in-cart\/<br \/>\n *\/<br \/>\nadd_filter( &#8216;woocommerce_cart_item_name&#8217;, &#8216;woocommerce_cart_item_name_event_title&#8217;, 10, 3 );<\/p>\n<p>function woocommerce_cart_item_name_event_title( $title, $values, $cart_item_key ) {<br \/>\n\t$ticket_meta = get_post_meta( $values[&#8216;product_id&#8217;] );<br \/>\n\t$event_id = absint( $ticket_meta[&#8216;_tribe_wooticket_for_event&#8217;][0] );<br \/>\n\t$event_date = tribe_get_start_date($event_id,true,&#8221;&#8221;,null);<br \/>\n\tif ( $event_id ) {<\/p>\n<p>\t\t$title = sprintf( &#8216;%s for <a href=\"%s\" target=\"_blank\"><strong>%s<\/strong><\/a>&#8216;, $title, get_permalink( $event_id ), get_the_title( $event_id ) );<br \/>\n\t}<br \/>\n\treturn $title;<br \/>\n}<\/p>\n<p>Thanks! <\/p>\n","protected":false},"template":"","class_list":["post-1145416","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>Add event date\/time and venue to cart order -<\/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\/add-event-datetime-and-venue-to-cart-order\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Add event date\/time and venue to cart order -\" \/>\n<meta property=\"og:description\" content=\"Hi TEC team I am using the snippet below from another forum post and I&#8217;d like to add the event date, time and venue in the cart view as well. Each of my tickets are General Admission but I have hundreds of events at various locations so its important it is clear throughout the booking [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-datetime-and-venue-to-cart-order\/\" \/>\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\/add-event-datetime-and-venue-to-cart-order\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-datetime-and-venue-to-cart-order\/\",\"name\":\"Add event date\/time and venue to cart order -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-07-29T02:41:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-datetime-and-venue-to-cart-order\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-datetime-and-venue-to-cart-order\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-datetime-and-venue-to-cart-order\/#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\":\"Add event date\/time and venue to cart order\"}]},{\"@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":"Add event date\/time and venue to cart order -","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\/add-event-datetime-and-venue-to-cart-order\/","og_locale":"en_US","og_type":"article","og_title":"Add event date\/time and venue to cart order -","og_description":"Hi TEC team I am using the snippet below from another forum post and I&#8217;d like to add the event date, time and venue in the cart view as well. Each of my tickets are General Admission but I have hundreds of events at various locations so its important it is clear throughout the booking [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-datetime-and-venue-to-cart-order\/","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\/add-event-datetime-and-venue-to-cart-order\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-datetime-and-venue-to-cart-order\/","name":"Add event date\/time and venue to cart order -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-07-29T02:41:29+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-datetime-and-venue-to-cart-order\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-datetime-and-venue-to-cart-order\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-event-datetime-and-venue-to-cart-order\/#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":"Add event date\/time and venue to cart order"}]},{"@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\/1145416","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\/1145416\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1145416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}