{"id":996983,"date":"2015-08-18T07:55:25","date_gmt":"2015-08-18T14:55:25","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wooticket-woocomerce-product-addon\/"},"modified":"2015-08-18T15:17:54","modified_gmt":"2015-08-18T22:17:54","slug":"wooticket-woocomerce-product-addon","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wooticket-woocomerce-product-addon\/","title":{"rendered":"Wooticket + Woocomerce product addon"},"content":{"rendered":"<p>In case you need to use Woocommerce product addon with Wooticket, you can modify the file tickets.php this way ;<\/p>\n<pre><code>\n&lt;?php\nglobal $woocommerce;\n\n$is_there_any_product         = false;\n$is_there_any_product_to_sell = false;\n\nob_start();\n\n?&gt;\n\n&lt;?php  ?&gt;\n\n&lt;form action=&quot;&lt;?php echo esc_url( $woocommerce-&gt;cart-&gt;get_cart_url() ) ?&gt;&quot; class=&quot;cart&quot; method=&quot;post&quot; enctype=&#039;multipart\/form-data&#039;&gt;\n\t&lt;h2 class=&quot;tribe-events-tickets-title&quot;&gt;&lt;?php _e( &#039;Tickets&#039;, &#039;tribe-wootickets&#039; ) ?&gt;&lt;\/h2&gt;\n\n\t\n\t\n\n\t\n\t&lt;table width=&quot;100%&quot; class=&quot;tribe-events-tickets&quot;&gt;\n\t\t&lt;?php\n\t\tforeach ( $tickets as $ticket ) {\n\t\t\t\n\n\t\t\tglobal $product;\n\t\t\t\n\t\t\tglobal $wpdb;\n\t\t\t\/\/Modification : get product addon attributes\n\t\t\t\n\t\t\t$results = $wpdb-&gt;get_row(&#039;SELECT meta_value FROM wp_postmeta WHERE post_id = &#039;.$ticket-&gt;ID.&#039; AND  meta_key = &quot;_product_addons&quot;&#039;);\n\t\t\t\n\t\t\t$results = unserialize($results-&gt;meta_value);\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\tif ( class_exists( &#039;WC_Product_Simple&#039; ) ) {\n\t\t\t\t$product = new WC_Product_Simple( $ticket-&gt;ID );\n\t\t\t} else {\n\t\t\t\t$product = new WC_Product( $ticket-&gt;ID );\n\t\t\t}\n\n\t\t\t$gmt_offset = ( get_option( &#039;gmt_offset&#039; ) &gt;= &#039;0&#039; ) ? &#039; +&#039; . get_option( &#039;gmt_offset&#039; ) : &quot; &quot; . get_option( &#039;gmt_offset&#039; );\n\t\t\t$gmt_offset = str_replace( array( &#039;.25&#039;, &#039;.5&#039;, &#039;.75&#039; ), array( &#039;:15&#039;, &#039;:30&#039;, &#039;:45&#039; ), $gmt_offset );\n\n\t\t\t$end_date = null;\n\t\t\tif ( ! empty( $ticket-&gt;end_date ) ){\n\t\t\t\t$end_date = strtotime( $ticket-&gt;end_date . $gmt_offset );\n\t\t\t} else {\n\t\t\t\t$end_date = strtotime( tribe_get_end_date( get_the_ID(), false, &#039;Y-m-d G:i&#039; ) . $gmt_offset );\n\t\t\t}\n\t\t\t\n\t\t\t$start_date = null;\n\t\t\tif ( ! empty( $ticket-&gt;start_date ) ){\n\t\t\t\t$start_date = strtotime( $ticket-&gt;start_date . $gmt_offset );\n\t\t\t}\t\t\t\n\n\t\t\t\n\t\t\t\n\n\t\t\tif ( ! empty( $ticket-&gt;start_date ) ) {\n\t\t\t}\n\n\t\t\tif ( ( empty( $start_date ) || time() &gt; $start_date ) &amp;&amp; ( empty( $end_date ) || time() &lt; $end_date ) ) {\n\n\t\t\t\t$is_there_any_product = true;\n\n\t\t\t\techo sprintf( &quot;&lt;input type=&#039;hidden&#039; name=&#039;product_id[]&#039; value=&#039;%d&#039;&gt;&quot;, $ticket-&gt;ID );\n\n\t\t\t\techo &quot;&lt;tr&gt;&quot;;\n\t\t\t\techo &quot;&lt;td class=&#039;woocommerce&#039;&gt;&quot;;\n\n\t\t\t\tif ( $product-&gt;is_in_stock() ) {\n\t\t\t\t\t\n\t\t\t\t\t\/\/Modificatin : loop over types of attributes\n\n\t\t\t\t\tif($results !== false){\n\t\t\t\t\t\t foreach ( $results  as $j =&gt; $fieldoption ) {\n\t\t\t\t\t\t \t\n\t\t\t\t\t\t\techo wptexturize($fieldoption[&quot;description&quot;]);\n\t\n\t\t\t\t\t\t\tif($fieldoption[&#039;type&#039;] == &quot;checkbox&quot;){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$price = $fieldoption[&#039;price&#039;] &gt; 0 ? &#039;(&#039; . woocommerce_price( get_product_addon_price_for_display( $fieldoption[&#039;price&#039;] ) ) . &#039;)&#039; : &#039;&#039;;\n\t\t\t\n\t\t\t\t\t\t\t\t\t\t$selected = isset( $_POST[ &#039;addon-&#039; . sanitize_title( $addon[&#039;field-name&#039;] ) ] ) ? $_POST[ &#039;addon-&#039; . sanitize_title( $addon[&#039;field-name&#039;] ) ] : array();\n\t\t\t\t\t\t\t\t\t\tif ( ! is_array( $selected ) ) {\n\t\t\t\t\t\t\t\t\t\t\t$selected = array( $selected );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$current_value = ( in_array( sanitize_title( $option[&#039;label&#039;] ), $selected ) ) ? 1 : 0;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\/\/var_dump($fieldoption[&quot;description&quot;]);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t foreach ( $fieldoption[&#039;options&#039;] as $i =&gt; $option ) {\n\t\t\t\t\t\t\t\t\t\t\/\/ var_dump($option);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\/\/$price = $option[&#039;price&#039;] &gt; 0 ? &#039;(&#039; . woocommerce_price( get_product_addon_price_for_display( $option[&#039;price&#039;] ) ) . &#039;)&#039; : &#039;&#039;;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t?&gt;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t&lt;p class=&quot;form-row form-row-wide addon-wrap-&lt;?php echo sanitize_title( $addon[&#039;field-name&#039;] ) . &#039;-&#039; . $i; ?&gt;&quot;&gt;\n\t\t\t\t\t\t\t\t\t\t\t\t&lt;label&gt;&lt;input type=&quot;checkbox&quot; class=&quot;addon addon-checkbox&quot; data-price=&quot;&lt;?php echo get_product_addon_price_for_display( $fieldoption[&#039;price&#039;] ); ?&gt;&quot; name=&quot;addon-&lt;?php echo $ticket-&gt;ID; ?&gt;-&lt;?php echo sanitize_title( $fieldoption[&quot;name&quot;] ); ?&gt;[]&quot; value=&quot;&lt;?php echo sanitize_title( $option[&#039;label&#039;] ); ?&gt;&quot;&gt; &lt;?php echo $option[&quot;label&quot;] ; ?&gt; &lt;\/label&gt;\n\t\t\t\t\t\t\t\t\t\t\t&lt;\/p&gt;\n\t\t\t\t\t\t\t\t\t\t&lt;?php\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif($fieldoption[&#039;type&#039;] == &quot;radiobutton&quot;){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tforeach ( $fieldoption[&#039;options&#039;] as $i =&gt; $option ) {\n\t\t\t\t\t\t\t\t\t?&gt;\n\t\t\t\t\t\t\t\t\t&lt;p class=&quot;form-row form-row-wide addon-wrap-&lt;?php echo sanitize_title( $addon[&#039;field-name&#039;] ) . &#039;-&#039; . $i; ?&gt;&quot;&gt;\n\t\t\t\t\t\t\t\t\t\t&lt;label&gt;&lt;input type=&quot;radio&quot; class=&quot;addon addon-radio&quot; name=&quot;addon-&lt;?php echo $ticket-&gt;ID; ?&gt;-&lt;?php echo sanitize_title( $fieldoption[&quot;name&quot;] ); ?&gt;[]&quot; data-price=&quot;&lt;?php echo get_product_addon_price_for_display( $option[&#039;price&#039;] ); ?&gt;&quot; value=&quot;&lt;?php echo sanitize_title( $option[&#039;label&#039;] ); ?&gt;&quot; &lt;?php checked( $current_value, 1 ); ?&gt; \/&gt; &lt;?php echo wptexturize( $option[&#039;label&#039;] . &#039; &#039; . $price ); ?&gt;&lt;\/label&gt;\n\t\t\t\t\t\t\t\t\t&lt;\/p&gt;\n\t\t\t\t\t\t\t\t\t&lt;?php\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif($fieldoption[&#039;type&#039;] == &quot;custom&quot;){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\/\/var_dump($fieldoption[&quot;options&quot;][0][&quot;label&quot;]);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$addon_fieldname = &quot;addon-&quot;.$ticket-&gt;ID.&quot;-&quot;.sanitize_title( $fieldoption[&#039;name&#039;]);\n\t\t\t\t\t\t\t\t$addon_key     = &#039;addon-&#039; . sanitize_title( $fieldoption[&#039;name&#039;] );\n\t\t\t\t\t\t\t\t$option_key    = empty( $fieldoption[&#039;name&#039;] ) ? $key : sanitize_title( $fieldoption[&quot;options&quot;][0][&quot;label&quot;] );\n\t\t\t\t\t\t\t\t$current_value = isset( $_POST[ $addon_key ] ) &amp;&amp; isset( $_POST[ $addon_key ][ $option_key ] ) ? $_POST[ $addon_key ][ $option_key ] : &#039;&#039;;\n\t\t\t\t\t\t\t\t$price         = $fieldoption[&#039;price&#039;] &gt; 0 ? &#039;(&#039; . woocommerce_price( get_product_addon_price_for_display( $fieldoption[&#039;price&#039;] ) ) . &#039;)&#039; : &#039;&#039;;\n\t\t\t\t\t\t\t\t?&gt;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t&lt;p class=&quot;form-row form-row-wide addon-wrap-&lt;?php echo sanitize_title( $addon_fieldname ); ?&gt;&quot;&gt;\n\t\t\t\t\t\t\t\t\t&lt;?php if ( ! empty( $fieldoption[&#039;name&#039;] ) ) : ?&gt;\n\t\t\t\t\t\t\t\t\t\t&lt;label&gt;&lt;?php \/\/echo wptexturize( $fieldoption[&#039;name&#039;] ) . &#039; &#039; . $price; ?&gt;&lt;\/label&gt;&lt;br&gt;\n\t\t\t\t\t\t\t\t\t&lt;?php endif; ?&gt;\n\t\t\t\t\t\t\t\t\t&lt;input type=&quot;text&quot; class=&quot;input-text addon addon-custom&quot; data-price=&quot;&lt;?php echo get_product_addon_price_for_display( $fieldoption[&#039;price&#039;] ); ?&gt;&quot; name=&quot;&lt;?php echo $addon_fieldname ?&gt;[&lt;?php echo $option_key; ?&gt;]&quot; value=&quot;&quot; &lt;?php if ( ! empty( $fieldoption[&#039;max&#039;] ) ) echo &#039;maxlength=&quot;&#039; . $fieldoption[&#039;max&#039;] .&#039;&quot;&#039;; ?&gt; \/&gt;\n\t\t\t\t\t\t\t\t&lt;\/p&gt;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t&lt;?php\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif($fieldoption[&#039;type&#039;] == &quot;select&quot;){\n\t\t\t\t\t\t\t\t$addon_fieldname = &quot;addon-&quot;.$ticket-&gt;ID.&quot;-&quot;.sanitize_title( $fieldoption[&#039;name&#039;]);\n\t\t\t\t\t\t\t\t\t?&gt;\n\t\t\t\t\t\t\t\t&lt;p class=&quot;form-row form-row-wide addon-wrap-&lt;?php echo sanitize_title( $addon_fieldname ); ?&gt;&quot;&gt;\n\t\t\t\t\t\t\t\t\t&lt;select class=&quot;addon addon-select&quot; name=&quot;&lt;?php echo sanitize_title( $addon_fieldname ); ?&gt;&quot;&gt;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t&lt;?php if ( ! isset( $addon[&#039;required&#039;] ) ) : ?&gt;\n\t\t\t\t\t\t\t\t\t\t\t&lt;option value=&quot;&quot;&gt;&lt;?php _e(&#039;None&#039;, &#039;woocommerce-product-addons&#039;); ?&gt;&lt;\/option&gt;\n\t\t\t\t\t\t\t\t\t\t&lt;?php else : ?&gt;\n\t\t\t\t\t\t\t\t\t\t\t&lt;option value=&quot;&quot;&gt;&lt;?php _e(&#039;Select an option...&#039;, &#039;woocommerce-product-addons&#039;); ?&gt;&lt;\/option&gt;\n\t\t\t\t\t\t\t\t\t\t&lt;?php endif; ?&gt;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t&lt;?php foreach ( $fieldoption[&#039;options&#039;] as $option ) :\n\t\t\t\t\t\t\t\t\t\t\t$loop ++;\n\t\t\t\t\t\t\t\t\t\t\t$price = $option[&#039;price&#039;] &gt; 0 ? &#039; (&#039; . woocommerce_price( get_product_addon_price_for_display( $option[&#039;price&#039;] ) ) . &#039;)&#039; : &#039;&#039;;\n\t\t\t\t\t\t\t\t\t\t\t?&gt;\n\t\t\t\t\t\t\t\t\t\t\t&lt;option data-price=&quot;&lt;?php echo get_product_addon_price_for_display( $option[&#039;price&#039;] ); ?&gt;&quot; value=&quot;&lt;?php echo sanitize_title( $option[&#039;label&#039;] ) . &#039;-&#039; . $loop; ?&gt;&quot; &lt;?php selected( $current_value, sanitize_title( $option[&#039;label&#039;] ) . &#039;-&#039; . $loop ); ?&gt;&gt;&lt;?php echo wptexturize( $option[&#039;label&#039;] ) . $price ?&gt;&lt;\/option&gt;\n\t\t\t\t\t\t\t\t\t\t&lt;?php endforeach; ?&gt;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t&lt;\/select&gt;\n\t\t\t\t\t\t\t\t&lt;\/p&gt;\n\t\t\t\t\t\t\t\t&lt;?php\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }\n\t\t\t\t\t\/\/ Max quantity will be left open if backorders allowed, restricted to 1 if the product is\n\t\t\t\t\t\/\/ constrained to be sold individually or else set to the available stock quantity\n\t\t\t\t\t$max_quantity = $product-&gt;backorders_allowed() ? &#039;&#039; : $product-&gt;get_stock_quantity();\n\t\t\t\t\t$max_quantity = $product-&gt;is_sold_individually() ? 1 : $max_quantity;\n\t\t\t\t\t\n\t\t\t\t\techo  _e( &#039;Quantity&#039;, &#039;tribe-wootickets&#039; ).&quot; :&quot;; \n\n\t\t\t\t\twoocommerce_quantity_input( array( &#039;input_name&#039;  =&gt; &#039;quantity_&#039; . $ticket-&gt;ID,\n\t\t\t\t\t                                   &#039;input_value&#039; =&gt; 0,\n\t\t\t\t\t                                   &#039;min_value&#039;   =&gt; 0,\n\t\t\t\t\t                                   &#039;max_value&#039;   =&gt; $max_quantity\n\t\t\t\t\t) );\n\n\t\t\t\t\t$is_there_any_product_to_sell = true;\n\t\t\t\t} else {\n\t\t\t\t\techo &quot;&lt;span class=&#039;tickets_nostock&#039;&gt;&quot; . esc_html__( &#039;Out of stock!&#039;, &#039;tribe-wootickets&#039; ) . &quot;&lt;\/span&gt;&quot;;\n\t\t\t\t}\n\t\t\t\techo &quot;&lt;\/td&gt;&quot;;\n\n\t\t\t\techo &quot;&lt;td nowrap=&#039;nowrap&#039; class=&#039;tickets_name&#039;&gt;&quot;;\n\t\t\t\techo $ticket-&gt;name;\n\t\t\t\techo &quot;&lt;\/td&gt;&quot;;\n\n\t\t\t\techo &quot;&lt;td class=&#039;tickets_price&#039;&gt;&quot;;\n\t\t\t\techo $this-&gt;get_price_html( $product );\n\t\t\t\techo &quot;&lt;\/td&gt;&quot;;\n\n\t\t\t\techo &quot;&lt;td class=&#039;tickets_description&#039;&gt;&quot;;\n\t\t\t\techo $ticket-&gt;description;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\techo &quot;&lt;\/td&gt;&quot;;\n\n\t\t\t\techo &quot;&lt;\/tr&gt;&quot;;\n\t\t\t}\n\n\t\t}\n\n\t\tif ( $is_there_any_product_to_sell ) : ?&gt;\n\t\t\t&lt;tr&gt;\n\t\t\t\t&lt;td colspan=&quot;4&quot; class=&#039;woocommerce add-to-cart&#039;&gt;\n\n\t\t\t\t\t&lt;button type=&quot;submit&quot; name=&quot;wootickets_process&quot; value=&quot;1&quot;\n\t\t\t\t\t        class=&quot;button alt&quot;&gt;&lt;?php esc_html_e( &#039;Add to cart&#039;, &#039;tribe-wootickets&#039; );?&gt;&lt;\/button&gt;\n\t\t\t\t&lt;\/td&gt;\n\t\t\t&lt;\/tr&gt;\n\t\t&lt;?php endif ?&gt;\n\t\t\n\t&lt;\/table&gt;\n\t\n&lt;\/form&gt;\n\n&lt;?php\n$content = ob_get_clean();\nif ( $is_there_any_product ) {\n\techo $content;\n}\n<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-996983","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>Wooticket + Woocomerce product addon -<\/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\/wooticket-woocomerce-product-addon\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Wooticket + Woocomerce product addon -\" \/>\n<meta property=\"og:description\" content=\"In case you need to use Woocommerce product addon with Wooticket, you can modify the file tickets.php this way ; &lt;?php global $woocommerce; $is_there_any_product = false; $is_there_any_product_to_sell = false; ob_start(); ?&gt; &lt;?php ?&gt; &lt;form action=&quot;&lt;?php echo esc_url( $woocommerce-&gt;cart-&gt;get_cart_url() ) ?&gt;&quot; class=&quot;cart&quot; method=&quot;post&quot; enctype=&#039;multipart\/form-data&#039;&gt; &lt;h2 class=&quot;tribe-events-tickets-title&quot;&gt;&lt;?php _e( &#039;Tickets&#039;, &#039;tribe-wootickets&#039; ) ?&gt;&lt;\/h2&gt; &lt;table width=&quot;100%&quot; class=&quot;tribe-events-tickets&quot;&gt; &lt;?php foreach [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wooticket-woocomerce-product-addon\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-08-18T22:17:54+00:00\" \/>\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=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wooticket-woocomerce-product-addon\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wooticket-woocomerce-product-addon\/\",\"name\":\"Wooticket + Woocomerce product addon -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-08-18T14:55:25+00:00\",\"dateModified\":\"2015-08-18T22:17:54+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wooticket-woocomerce-product-addon\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wooticket-woocomerce-product-addon\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wooticket-woocomerce-product-addon\/#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\":\"Wooticket + Woocomerce product addon\"}]},{\"@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":"Wooticket + Woocomerce product addon -","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\/wooticket-woocomerce-product-addon\/","og_locale":"en_US","og_type":"article","og_title":"Wooticket + Woocomerce product addon -","og_description":"In case you need to use Woocommerce product addon with Wooticket, you can modify the file tickets.php this way ; &lt;?php global $woocommerce; $is_there_any_product = false; $is_there_any_product_to_sell = false; ob_start(); ?&gt; &lt;?php ?&gt; &lt;form action=&quot;&lt;?php echo esc_url( $woocommerce-&gt;cart-&gt;get_cart_url() ) ?&gt;&quot; class=&quot;cart&quot; method=&quot;post&quot; enctype=&#039;multipart\/form-data&#039;&gt; &lt;h2 class=&quot;tribe-events-tickets-title&quot;&gt;&lt;?php _e( &#039;Tickets&#039;, &#039;tribe-wootickets&#039; ) ?&gt;&lt;\/h2&gt; &lt;table width=&quot;100%&quot; class=&quot;tribe-events-tickets&quot;&gt; &lt;?php foreach [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wooticket-woocomerce-product-addon\/","article_modified_time":"2015-08-18T22:17:54+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wooticket-woocomerce-product-addon\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wooticket-woocomerce-product-addon\/","name":"Wooticket + Woocomerce product addon -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-08-18T14:55:25+00:00","dateModified":"2015-08-18T22:17:54+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wooticket-woocomerce-product-addon\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/wooticket-woocomerce-product-addon\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wooticket-woocomerce-product-addon\/#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":"Wooticket + Woocomerce product addon"}]},{"@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\/996983","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":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/996983\/revisions"}],"predecessor-version":[{"id":997094,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/996983\/revisions\/997094"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=996983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}