{"id":1155720,"date":"2016-08-25T04:08:29","date_gmt":"2016-08-25T11:08:29","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/"},"modified":"2016-08-25T04:08:29","modified_gmt":"2016-08-25T11:08:29","slug":"tickets-created-from-event-are-not-properly-counted-in-product-category-widget","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/","title":{"rendered":"Tickets created from Event are not properly counted in product category widget"},"content":{"rendered":"<p>Hi,<br \/>\nI&#8217;m using woocommerce plugin and i placed the product categories widget on the right sidebar.<br \/>\nThe widget displayes the number of items for each product category, but it seems it doesn&#8217;t work properly for tickets created by &#8220;The Event Tickets&#8221; plugin.<\/p>\n<p>I created 4 &#8220;Event&#8221; (category) from woocommerce management and they are counted properly .<br \/>\nThe 2 &#8220;Event&#8221; created with &#8220;The Event Tickets&#8221; plugin are not properly counted (see attached images).<\/p>\n<p>Indeed, in class_wc_widget_product_categories.php the query is correct (see the attached query-result image), but the selection for the widget is from &#8220;wp_options&#8221; table and the insert is not correct:<\/p>\n<p>INSERT INTO <code>wp_options<\/code> (<code>option_name<\/code>, <code>option_value<\/code>, <code>autoload<\/code>) VALUES (&#8216;_transient_wc_term_counts&#8217;, &#8216;a:6:{i:10;s:1:\\&#8221;3\\&#8221;;i:11;s:1:\\&#8221;4\\&#8221;;i:17;s:1:\\&#8221;0\\&#8221;;i:12;s:1:\\&#8221;1\\&#8221;;i:13;s:1:\\&#8221;5\\&#8221;;i:14;s:0:\\&#8221;\\&#8221;;}&#8217;, &#8216;no&#8217;) ON DUPLICATE KEY UPDATE <code>option_name<\/code> = VALUES(<code>option_name<\/code>), <code>option_value<\/code> = VALUES(<code>option_value<\/code>), <code>autoload<\/code> = VALUES(<code>autoload<\/code>)<\/p>\n<p>Do you have any idea to solve this malfunctioning?<\/p>\n<p>Best regards,<br \/>\nSara<\/p>\n","protected":false},"template":"","class_list":["post-1155720","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>Tickets created from Event are not properly counted in product category widget -<\/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\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tickets created from Event are not properly counted in product category widget -\" \/>\n<meta property=\"og:description\" content=\"Hi, I&#8217;m using woocommerce plugin and i placed the product categories widget on the right sidebar. The widget displayes the number of items for each product category, but it seems it doesn&#8217;t work properly for tickets created by &#8220;The Event Tickets&#8221; plugin. I created 4 &#8220;Event&#8221; (category) from woocommerce management and they are counted properly [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/\" \/>\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\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/\",\"name\":\"Tickets created from Event are not properly counted in product category widget -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-08-25T11:08:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/#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\":\"Tickets created from Event are not properly counted in product category widget\"}]},{\"@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":"Tickets created from Event are not properly counted in product category widget -","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\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/","og_locale":"en_US","og_type":"article","og_title":"Tickets created from Event are not properly counted in product category widget -","og_description":"Hi, I&#8217;m using woocommerce plugin and i placed the product categories widget on the right sidebar. The widget displayes the number of items for each product category, but it seems it doesn&#8217;t work properly for tickets created by &#8220;The Event Tickets&#8221; plugin. I created 4 &#8220;Event&#8221; (category) from woocommerce management and they are counted properly [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/","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\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/","name":"Tickets created from Event are not properly counted in product category widget -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-08-25T11:08:29+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-created-from-event-are-not-properly-counted-in-product-category-widget\/#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":"Tickets created from Event are not properly counted in product category widget"}]},{"@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\/1155720","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\/1155720\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1155720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}