{"id":1057253,"date":"2016-01-16T21:15:37","date_gmt":"2016-01-17T05:15:37","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-are-being-mailed-despite-fact-that-payment-was-cancelled\/"},"modified":"2016-02-18T08:34:56","modified_gmt":"2016-02-18T16:34:56","slug":"tickets-are-being-mailed-despite-fact-that-payment-was-cancelled","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-are-being-mailed-despite-fact-that-payment-was-cancelled\/","title":{"rendered":"Tickets are being mailed despite fact that payment was cancelled"},"content":{"rendered":"<p>Hi guys,<\/p>\n<p>Currently I&#8217;m testing the implementation of WooCommerce and Event Tickets Plus on my site and have run in to the following problem. I am using the Mollie plugin from WooCommerce to fullfill the payments and in testing mode, you have the option to re-enact a cancelled payment. That would equal customers going to their bank&#8217;s gateway to pay but then deciding not to. So, there never was any kind of payment whatsoever.<\/p>\n<p>Choosing this option returns me to the &#8216;invoice&#8217; page from WooCommerce but with a clear &#8216;Cancelled&#8217; order status. So far, everything goes as excpected. I also don&#8217;t get an email from the WooCommerce platform with an invoice, so still as expected.<\/p>\n<p>But&#8230; I do receive the two tickets from the Event Tickets Plus platform, with the QR codes, ticket number etc&#8230;. Definitely not as excpected and not the way it should be!<\/p>\n<p>Typing this, it got me thinking. I have a little piece of code added to automatically accept orders when placed to prevent us from having to approve the order before the customer gets his tickets. I got this piece of code from these forums after browsing that initial problem (of having to approve orders in the first place). So, other people might be having this issue.<\/p>\n<pre><code>\/**\n * Auto Complete all WooCommerce orders.\n *\/\nadd_action( &#039;woocommerce_thankyou&#039;, &#039;custom_woocommerce_auto_complete_order&#039; );\nfunction custom_woocommerce_auto_complete_order( $order_id ) { \n    if ( ! $order_id ) {\n        return;\n    }\n\n    $order = wc_get_order( $order_id );\n    $order-&gt;update_status( &#039;completed&#039; );\n}\n<\/code><\/pre>\n<p>My next step now is to delete this from the theme&#8217;s functions.php to see if this fixes this issue.<br \/>\n&#8230;<br \/>\nYep, this appears to fix this issue. However, I still would like the option to auto approve ticket sales since why the hell would I want to approve them, if I&#8217;ve set a max number of tickets to be sold, I&#8217;d want the customers to receive their tickets as soon as possible.<\/p>\n<p>I have re-enabled the piece of code, but I&#8217;d love to have a look from you guys to see if this is fixable.<\/p>\n<p>THanks,<br \/>\nHans<\/p>\n","protected":false},"template":"","class_list":["post-1057253","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 are being mailed despite fact that payment was cancelled -<\/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-are-being-mailed-despite-fact-that-payment-was-cancelled\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tickets are being mailed despite fact that payment was cancelled -\" \/>\n<meta property=\"og:description\" content=\"Hi guys, Currently I&#8217;m testing the implementation of WooCommerce and Event Tickets Plus on my site and have run in to the following problem. I am using the Mollie plugin from WooCommerce to fullfill the payments and in testing mode, you have the option to re-enact a cancelled payment. That would equal customers going to [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-are-being-mailed-despite-fact-that-payment-was-cancelled\/\" \/>\n<meta property=\"article:modified_time\" content=\"2016-02-18T16:34:56+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=\"2 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\/tickets-are-being-mailed-despite-fact-that-payment-was-cancelled\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-are-being-mailed-despite-fact-that-payment-was-cancelled\/\",\"name\":\"Tickets are being mailed despite fact that payment was cancelled -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-01-17T05:15:37+00:00\",\"dateModified\":\"2016-02-18T16:34:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-are-being-mailed-despite-fact-that-payment-was-cancelled\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-are-being-mailed-despite-fact-that-payment-was-cancelled\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-are-being-mailed-despite-fact-that-payment-was-cancelled\/#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 are being mailed despite fact that payment was cancelled\"}]},{\"@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 are being mailed despite fact that payment was cancelled -","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-are-being-mailed-despite-fact-that-payment-was-cancelled\/","og_locale":"en_US","og_type":"article","og_title":"Tickets are being mailed despite fact that payment was cancelled -","og_description":"Hi guys, Currently I&#8217;m testing the implementation of WooCommerce and Event Tickets Plus on my site and have run in to the following problem. I am using the Mollie plugin from WooCommerce to fullfill the payments and in testing mode, you have the option to re-enact a cancelled payment. That would equal customers going to [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-are-being-mailed-despite-fact-that-payment-was-cancelled\/","article_modified_time":"2016-02-18T16:34:56+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-are-being-mailed-despite-fact-that-payment-was-cancelled\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-are-being-mailed-despite-fact-that-payment-was-cancelled\/","name":"Tickets are being mailed despite fact that payment was cancelled -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-01-17T05:15:37+00:00","dateModified":"2016-02-18T16:34:56+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-are-being-mailed-despite-fact-that-payment-was-cancelled\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-are-being-mailed-despite-fact-that-payment-was-cancelled\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/tickets-are-being-mailed-despite-fact-that-payment-was-cancelled\/#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 are being mailed despite fact that payment was cancelled"}]},{"@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\/1057253","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\/1057253\/revisions"}],"predecessor-version":[{"id":1057938,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1057253\/revisions\/1057938"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1057253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}