{"id":1091575,"date":"2016-03-20T12:21:34","date_gmt":"2016-03-20T19:21:34","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-virtual-product\/"},"modified":"2016-04-01T14:28:44","modified_gmt":"2016-04-01T21:28:44","slug":"disable-virtual-product","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-virtual-product\/","title":{"rendered":"Disable Virtual Product"},"content":{"rendered":"<p>I&#8217;m using Events Calendar Pro with Event Tickets Plus and WooCommerce.<\/p>\n<p>My client&#8217;s plan has changed a little and they are now going to be selling physical tickets only. I&#8217;ve disabled the tickets email with:<\/p>\n<pre><code>\n\/\/ Remove ticket emails\nadd_action( &#039;init&#039;, &#039;wootickets_stop_sending_email&#039; );\nfunction wootickets_stop_sending_email() {\n\tif (class_exists(&#039;Tribe__Tickets_Plus__Commerce__WooCommerce__Main&#039;)) {\t\n\t\t$woo = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance();\n\t\tremove_filter( &#039;woocommerce_email_classes&#039;, array( $woo, &#039;add_email_class_to_woocommerce&#039; ) );\n\t\tadd_action( &#039;woocommerce_email_after_order_table&#039;, array( $woo, &#039;add_tickets_msg_to_email&#039; ) );\n\t}\n}\n\n\/\/ Remove the line about tickets in order emails\nadd_filter(&#039;wootickets_email_message&#039;, &#039;woo_tickets_filter_completed_order&#039;, 10 );\nfunction woo_tickets_filter_completed_order($text) {\n\t$text = &quot;&quot;;\n \treturn $text;\n}\n<\/code><\/pre>\n<p>I need to be able to switch off the &#8220;virtual product&#8221; setting when each ticket product is created with something like <code>update_post_meta( $ticket-&gt;ID, &#039;_virtual&#039;, &#039;no&#039; );<\/code> but what I&#8217;ve tried so far isn&#8217;t working. Any ideas?<\/p>\n","protected":false},"template":"","class_list":["post-1091575","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>Disable Virtual Product -<\/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\/disable-virtual-product\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Disable Virtual Product -\" \/>\n<meta property=\"og:description\" content=\"I&#8217;m using Events Calendar Pro with Event Tickets Plus and WooCommerce. My client&#8217;s plan has changed a little and they are now going to be selling physical tickets only. I&#8217;ve disabled the tickets email with: \/\/ Remove ticket emails add_action( &#039;init&#039;, &#039;wootickets_stop_sending_email&#039; ); function wootickets_stop_sending_email() { if (class_exists(&#039;Tribe__Tickets_Plus__Commerce__WooCommerce__Main&#039;)) { $woo = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); remove_filter( &#039;woocommerce_email_classes&#039;, array( [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-virtual-product\/\" \/>\n<meta property=\"article:modified_time\" content=\"2016-04-01T21:28:44+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=\"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\/disable-virtual-product\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-virtual-product\/\",\"name\":\"Disable Virtual Product -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-03-20T19:21:34+00:00\",\"dateModified\":\"2016-04-01T21:28:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-virtual-product\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-virtual-product\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-virtual-product\/#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\":\"Disable Virtual Product\"}]},{\"@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":"Disable Virtual Product -","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\/disable-virtual-product\/","og_locale":"en_US","og_type":"article","og_title":"Disable Virtual Product -","og_description":"I&#8217;m using Events Calendar Pro with Event Tickets Plus and WooCommerce. My client&#8217;s plan has changed a little and they are now going to be selling physical tickets only. I&#8217;ve disabled the tickets email with: \/\/ Remove ticket emails add_action( &#039;init&#039;, &#039;wootickets_stop_sending_email&#039; ); function wootickets_stop_sending_email() { if (class_exists(&#039;Tribe__Tickets_Plus__Commerce__WooCommerce__Main&#039;)) { $woo = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); remove_filter( &#039;woocommerce_email_classes&#039;, array( [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-virtual-product\/","article_modified_time":"2016-04-01T21:28:44+00:00","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\/disable-virtual-product\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-virtual-product\/","name":"Disable Virtual Product -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-03-20T19:21:34+00:00","dateModified":"2016-04-01T21:28:44+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-virtual-product\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-virtual-product\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/disable-virtual-product\/#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":"Disable Virtual Product"}]},{"@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\/1091575","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\/1091575\/revisions"}],"predecessor-version":[{"id":1091606,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1091575\/revisions\/1091606"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1091575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}