{"id":108218,"date":"2014-02-22T06:04:54","date_gmt":"2014-02-22T14:04:54","guid":{"rendered":"https:\/\/tri.be\/support\/forums\/topic\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/"},"modified":"2014-02-28T17:25:10","modified_gmt":"2014-03-01T01:25:10","slug":"wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/","title":{"rendered":"wootickets not upgraded to be compatible with woocommerce v2.1"},"content":{"rendered":"<p>Hi there,<br \/>\n        I am working on upgrade on my clients website, I did upgrade woocommerce to v2.1, the events calendar to 3.4.1, events calendar pro to 3.4 and wootickets to 3.4 and upgrade went fine no major issues.<\/p>\n<p>But now I am working on testing the features, and I found on event edit screen, when I create \/ delete any tickets (under &#8220;Tickets&#8221; metabox), it doesn&#8217;t do anything on screen, don&#8217;t show new tickets or nor delete existing one, but when I save the event and it reloads ticket added is shown and deleted is removed from the list.<\/p>\n<p>Well, then I digg into the issue, and debugged your plugins and I found out that your plugins ajax response was bad, its showing<\/p>\n<p>it shows response like this for delete \/ add<\/p>\n<p><code><\/code>`<br \/>\n&lt;table class=&#8221;eventtable ticket_list eventForm&#8221;&gt;<br \/>\n\t\t\t\t&lt;td colspan=&#8221;4&#8243; class=&#8221;titlewrap&#8221;&gt;<br \/>\n\t\t\t\t&lt;h4 class=&#8221;tribe_sectionheader&#8221;&gt;WooCommerce\t\t\t\t\t\t{&#8220;success&#8221;:true,&#8221;data&#8221;:&#8221;&lt;div class=\\&#8221;wrap\\&#8221;&gt;&lt;div class=\\&#8221;updated\\&#8221;&gt;&lt;p&gt;Your ticket has been deleted.&lt;\\\/p&gt;&lt;\\\/div&gt;&lt;\\\/div&gt;\\t\\t\\t\\t\\t&lt;small&gt;&nbsp;|&nbsp; and rest of the response.<br \/>\n<code><\/code>`<br \/>\nwhich is abnormal response, so I digg deep into your code and I reached to the culprit file(s).<\/p>\n<p>its <\/p>\n<p>wootickets\/classes\/class-wootickets.php<\/p>\n<p>and this code is throwing error, but it was not being recorded into log file because of buffering.<\/p>\n<p><code><\/code>`<br \/>\n$file = trailingslashit($GLOBALS[&#8216;woocommerce&#8217;]-&gt;plugin_path) . &#8216;admin\/woocommerce-admin-reports.php&#8217;;<br \/>\n        if (file_exists($file))<br \/>\n            include_once $file;<\/p>\n<p>        if (!function_exists(&#8216;woocommerce_get_reports_charts&#8217;))<br \/>\n            return &#8221;;<\/p>\n<p>        $charts = woocommerce_get_reports_charts();<\/p>\n<p>        if (empty($charts[&#8216;sales&#8217;][&#8216;charts&#8217;][&#8216;product_sales&#8217;]))<br \/>\n            return &#8221;;<br \/>\n<code><\/code>`<\/p>\n<p>as of woocommerce 2.1,<\/p>\n<p>global $woocommerce var is not recommended, instead you should utilize WC() function, <\/p>\n<p>and woocommerce reports file no longer exists which you are loading.<br \/>\nand also woocommerce_get_reports_charts() function is no longer applicable, instead they have a class for reports now, which on include loads full reports panel, <\/p>\n<p>my recommendation is you just remove this code, as it doesn&#8217;t make much of an effect whether current event tickets have reports or not, just provide link to report.<\/p>\n<p>And also your report link javscript needs upgrade,<br \/>\ncurrently you are posting that, which I believe will no longer work as for getting product reports, now WC_Report_Sales_By_Product class is used and it only utlizes $GET for product ids, I moded it like this and it worked<br \/>\n<code><\/code>`<br \/>\n&lt;script type=&#8221;text\/javascript&#8221;&gt;<br \/>\n            jQuery(document).ready(function($) {<br \/>\n                $(&#8216;#wootickets_event_reports&#8217;).on(&#8216;click&#8217;, function(e) {<br \/>\n                    var event_report_form = $(&#8216;&lt;form&gt;&#8217;).attr(&#8216;method&#8217;, &#8216;get&#8217;).attr(&#8216;action&#8217;, &#8216;&lt;?php echo admin_url(&#8220;admin.php&#8221;); ?&gt;&#8217;);<br \/>\n         event_report_form.append($(&#8216;&lt;input \/&gt;&#8217;).attr(&#8216;name&#8217;, &#8216;page&#8217;).val(&#8220;wc-reports&#8221;));<br \/>\n         event_report_form.append($(&#8216;&lt;input \/&gt;&#8217;).attr(&#8216;name&#8217;, &#8216;tab&#8217;).val(&#8220;orders&#8221;));<br \/>\n         event_report_form.append($(&#8216;&lt;input \/&gt;&#8217;).attr(&#8216;name&#8217;, &#8216;report&#8217;).val(&#8220;sales_by_product&#8221;));<br \/>\n         &lt;?php foreach ($ticket_ids as $id) { ?&gt;<br \/>\n                        event_report_form.append($(&#8216;&lt;input \/&gt;&#8217;).attr(&#8216;name&#8217;, &#8216;product_ids[]&#8217;).val(&#8220;&lt;?php echo $id; ?&gt;&#8221;));<br \/>\n        &lt;?php } ?&gt;<br \/>\n                    \/\/ .submit doesn&#8217;t work on Firefox if the form is not attached to the DOM<br \/>\n                    event_report_form.hide().appendTo(&#8216;body&#8217;);<br \/>\n                    event_report_form.submit();<br \/>\n                    e.preventDefault();<br \/>\n                });<br \/>\n            });<br \/>\n        &lt;\/script&gt;<br \/>\n<code><\/code>`<\/p>\n<p>I highly recommend you guys to please deeply and thoroughly test your products for woocomerce 2.1 compatibility, if we have to fix such issues ourself, and spend time on third party plugins testing things, then why would we bother purchasing licenses in first place, we code it ourselves.<\/p>\n<p>So be smart and update your code within couple of days, I already have been waiting for woocommerce 2.1 release for more than two or three months almost, and those poor guys have been waiting for companies like you to thoroughly test your code before they can ship the latest version and it sad to see that you havent even bother to test alteast, rather then upgrading :(.<\/p>\n","protected":false},"template":"","class_list":["post-108218","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>wootickets not upgraded to be compatible with woocommerce v2.1 -<\/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\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"wootickets not upgraded to be compatible with woocommerce v2.1 -\" \/>\n<meta property=\"og:description\" content=\"Hi there, I am working on upgrade on my clients website, I did upgrade woocommerce to v2.1, the events calendar to 3.4.1, events calendar pro to 3.4 and wootickets to 3.4 and upgrade went fine no major issues. But now I am working on testing the features, and I found on event edit screen, when [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/\" \/>\n<meta property=\"article:modified_time\" content=\"2014-03-01T01:25:10+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=\"3 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\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/\",\"name\":\"wootickets not upgraded to be compatible with woocommerce v2.1 -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2014-02-22T14:04:54+00:00\",\"dateModified\":\"2014-03-01T01:25:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/#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\":\"wootickets not upgraded to be compatible with woocommerce v2.1\"}]},{\"@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":"wootickets not upgraded to be compatible with woocommerce v2.1 -","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\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/","og_locale":"en_US","og_type":"article","og_title":"wootickets not upgraded to be compatible with woocommerce v2.1 -","og_description":"Hi there, I am working on upgrade on my clients website, I did upgrade woocommerce to v2.1, the events calendar to 3.4.1, events calendar pro to 3.4 and wootickets to 3.4 and upgrade went fine no major issues. But now I am working on testing the features, and I found on event edit screen, when [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/","article_modified_time":"2014-03-01T01:25:10+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/","name":"wootickets not upgraded to be compatible with woocommerce v2.1 -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2014-02-22T14:04:54+00:00","dateModified":"2014-03-01T01:25:10+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/wootickets-not-upgraded-to-be-compatible-with-woocommerce-v2-1\/#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":"wootickets not upgraded to be compatible with woocommerce v2.1"}]},{"@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\/108218","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\/108218\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=108218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}