{"id":1344171,"date":"2017-09-02T14:17:47","date_gmt":"2017-09-02T21:17:47","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-woocommerce-variable-products-with-wootickets\/"},"modified":"2017-09-02T14:17:47","modified_gmt":"2017-09-02T21:17:47","slug":"using-woocommerce-variable-products-with-wootickets","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-woocommerce-variable-products-with-wootickets\/","title":{"rendered":"Using WooCommerce Variable Products with WooTickets"},"content":{"rendered":"<p>I&#8217;m aware there is the request for this to happen, but I can&#8217;t wait for that.<\/p>\n<p>https:\/\/tribe.uservoice.com\/forums\/195723-feature-ideas\/suggestions\/6388546-support-woo-product-variations-within-wootickets<\/p>\n<p>I&#8217;m working on a custom solution for this.<\/p>\n<p>Inside WooTickets the tickets.php file exists which is what displays the tickets attached to an event.<\/p>\n<p><code>if ( class_exists( 'WC_Product_Simple' ) ) {<br \/>\n     $product = new WC_Product_Simple( $ticket-&gt;ID );<br \/>\n}{<\/code><\/p>\n<p>This function takes the variable $ticket and turns it into a Simple Product<\/p>\n<p>I changed this code to create a Variable product instead so I could customize the output and show my variations.<\/p>\n<p><code>if ( class_exists( 'WC_Product_Variable' ) ) {<br \/>\n     $product = new WC_Product_Variable( $ticket-&gt;ID );<br \/>\n}{<\/code><\/p>\n<p>Unfortunately it won&#8217;t even allow me to do that&#8230; Attempting to use any of the WC Variable Product functions results in the following error:<\/p>\n<p>Fatal error: Call to undefined method Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_children() in wp-content\/plugins\/woocommerce\/includes\/class-wc-product-variable.php on line 256<\/p>\n<p>Is there any way I can keep the Ticket Product concept the same, but use a Variable product with custom development?<\/p>\n<p>I&#8217;m afraid you&#8217;re going to tell me I will have to just manually create WooCommerce products, then manually attach them to my Events, THEN manually display them in the tickets.php file of my theme.<\/p>\n<p>Any input?<\/p>\n","protected":false},"template":"","class_list":["post-1344171","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>Using WooCommerce Variable Products with WooTickets -<\/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\/using-woocommerce-variable-products-with-wootickets\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using WooCommerce Variable Products with WooTickets -\" \/>\n<meta property=\"og:description\" content=\"I&#8217;m aware there is the request for this to happen, but I can&#8217;t wait for that. https:\/\/tribe.uservoice.com\/forums\/195723-feature-ideas\/suggestions\/6388546-support-woo-product-variations-within-wootickets I&#8217;m working on a custom solution for this. Inside WooTickets the tickets.php file exists which is what displays the tickets attached to an event. if ( class_exists( &#039;WC_Product_Simple&#039; ) ) { $product = new WC_Product_Simple( $ticket-&gt;ID ); }{ [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-woocommerce-variable-products-with-wootickets\/\" \/>\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\/using-woocommerce-variable-products-with-wootickets\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-woocommerce-variable-products-with-wootickets\/\",\"name\":\"Using WooCommerce Variable Products with WooTickets -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-09-02T21:17:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-woocommerce-variable-products-with-wootickets\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-woocommerce-variable-products-with-wootickets\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-woocommerce-variable-products-with-wootickets\/#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\":\"Using WooCommerce Variable Products with WooTickets\"}]},{\"@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":"Using WooCommerce Variable Products with WooTickets -","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\/using-woocommerce-variable-products-with-wootickets\/","og_locale":"en_US","og_type":"article","og_title":"Using WooCommerce Variable Products with WooTickets -","og_description":"I&#8217;m aware there is the request for this to happen, but I can&#8217;t wait for that. https:\/\/tribe.uservoice.com\/forums\/195723-feature-ideas\/suggestions\/6388546-support-woo-product-variations-within-wootickets I&#8217;m working on a custom solution for this. Inside WooTickets the tickets.php file exists which is what displays the tickets attached to an event. if ( class_exists( 'WC_Product_Simple' ) ) { $product = new WC_Product_Simple( $ticket-&gt;ID ); }{ [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-woocommerce-variable-products-with-wootickets\/","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\/using-woocommerce-variable-products-with-wootickets\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-woocommerce-variable-products-with-wootickets\/","name":"Using WooCommerce Variable Products with WooTickets -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-09-02T21:17:47+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-woocommerce-variable-products-with-wootickets\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-woocommerce-variable-products-with-wootickets\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/using-woocommerce-variable-products-with-wootickets\/#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":"Using WooCommerce Variable Products with WooTickets"}]},{"@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\/1344171","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\/1344171\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1344171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}