{"id":994666,"date":"2015-08-10T01:11:40","date_gmt":"2015-08-10T08:11:40","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/custom-code-on-events-calendar-3-11-2\/"},"modified":"2015-08-27T07:05:03","modified_gmt":"2015-08-27T14:05:03","slug":"custom-code-on-events-calendar-3-11-2","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/custom-code-on-events-calendar-3-11-2\/","title":{"rendered":"Custom code on Events Calendar 3.11.2"},"content":{"rendered":"<p>Hello,<\/p>\n<p>I have the following custom code in my functions.php file for the Events Calendar as well as Tickets. Will it still work on Events Calendar 3.11.2?:<\/p>\n<pre><code>remove_action( &#039;tribe_events_single_event_after_the_meta&#039;, array( TribeWooTickets::get_instance(), &#039;front_end_tickets_form&#039;), 5 );\nadd_action( &#039;tribe_events_single_event_after_the_content&#039;, array( TribeWooTickets::get_instance(), &#039;front_end_tickets_form&#039;), 5 );\n\n\/\/ This example replaces &quot;Event&quot; with &quot;Course&quot; in all Tribe Plugins text\n \n\/\/ See the codex to learn more about WP text domains:\n\/\/ http:\/\/codex.wordpress.org\/Translating_WordPress#Localization_Technology\n\/\/ Example Tribe domains: &#039;tribe-events-calendar&#039;, &#039;tribe-events-calendar-pro&#039;...\n \nadd_filter(&#039;gettext&#039;, &#039;theme_filter_text&#039;, 10, 3);\n \nfunction theme_filter_text( $translations, $text, $domain ) {\n \/\/ If this text domain starts with &quot;tribe-&quot;\n if(strpos($domain, &#039;tribe-&#039;) === 0) {\n \/\/ Replace upper case, lower case, singular, and plural\n $text = str_replace(\n \/\/ Text to search for\n array(&#039;Event&#039;, &#039;event&#039;, &#039;Events&#039;, &#039;events&#039;),\n \n \/\/ Text to replace it with -- change this for your needs\n array(&#039;Course&#039;, &#039;course&#039;, &#039;Courses&#039;, &#039;courses&#039;),\n $text\n );\n \n }\n \n return $text;\n}\n \nadd_filter(&#039;ngettext&#039;, &#039;theme_filter_ntext&#039;, 10, 5);\n \nfunction theme_filter_ntext( $translation, $single, $plural, $number, $domain ) {\n \/\/ If this text domain starts with &quot;tribe-&quot;\n if(strpos($domain, &#039;tribe-&#039;) === 0) {\n \/\/ Replace upper case, lower case, singular, and plural\n if( $number &gt; 1 ) {\n $plural = str_replace(\n \/\/ Text to search for\n array(&#039;Events&#039;, &#039;events&#039;),\n \n \/\/ Text to replace it with -- change this for your needs\n array(&#039;Courses&#039;, &#039;courses&#039;),\n $plural\n );\n \n return $plural;\n } else {\n $single = str_replace(\n \/\/ Text to search for\n array(&#039;Event&#039;, &#039;event&#039;),\n \n \/\/ Text to replace it with -- change this for your needs\n array(&#039;Course&#039;, &#039;course&#039;),\n $single\n );\n \n return $single;\n }\n }\n}\n\nadd_filter( &#039;wootickets_email_message&#039;, &#039;replace_wootickets_order_msg&#039; );\n \nfunction replace_wootickets_order_msg() {\n    return &#039;&#039;;\n}\n\nadd_action( &#039;init&#039;, &#039;stop_wootickets_ticket_email&#039; );\n \nfunction stop_wootickets_ticket_email() {\n    $callback = array( TribeWooTickets::get_instance(), &#039;add_email_class_to_woocommerce&#039; );\n    remove_filter( &#039;woocommerce_email_classes&#039;, $callback );\n}\n<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-994666","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>Custom code on Events Calendar 3.11.2 -<\/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\/custom-code-on-events-calendar-3-11-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Custom code on Events Calendar 3.11.2 -\" \/>\n<meta property=\"og:description\" content=\"Hello, I have the following custom code in my functions.php file for the Events Calendar as well as Tickets. Will it still work on Events Calendar 3.11.2?: remove_action( &#039;tribe_events_single_event_after_the_meta&#039;, array( TribeWooTickets::get_instance(), &#039;front_end_tickets_form&#039;), 5 ); add_action( &#039;tribe_events_single_event_after_the_content&#039;, array( TribeWooTickets::get_instance(), &#039;front_end_tickets_form&#039;), 5 ); \/\/ This example replaces &quot;Event&quot; with &quot;Course&quot; in all Tribe Plugins text \/\/ See [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/custom-code-on-events-calendar-3-11-2\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-08-27T14:05:03+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\/custom-code-on-events-calendar-3-11-2\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/custom-code-on-events-calendar-3-11-2\/\",\"name\":\"Custom code on Events Calendar 3.11.2 -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-08-10T08:11:40+00:00\",\"dateModified\":\"2015-08-27T14:05:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/custom-code-on-events-calendar-3-11-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/custom-code-on-events-calendar-3-11-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/custom-code-on-events-calendar-3-11-2\/#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\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Custom code on Events Calendar 3.11.2\"}]},{\"@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":"Custom code on Events Calendar 3.11.2 -","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\/custom-code-on-events-calendar-3-11-2\/","og_locale":"en_US","og_type":"article","og_title":"Custom code on Events Calendar 3.11.2 -","og_description":"Hello, I have the following custom code in my functions.php file for the Events Calendar as well as Tickets. Will it still work on Events Calendar 3.11.2?: remove_action( &#039;tribe_events_single_event_after_the_meta&#039;, array( TribeWooTickets::get_instance(), &#039;front_end_tickets_form&#039;), 5 ); add_action( &#039;tribe_events_single_event_after_the_content&#039;, array( TribeWooTickets::get_instance(), &#039;front_end_tickets_form&#039;), 5 ); \/\/ This example replaces &quot;Event&quot; with &quot;Course&quot; in all Tribe Plugins text \/\/ See [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/custom-code-on-events-calendar-3-11-2\/","article_modified_time":"2015-08-27T14:05:03+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\/custom-code-on-events-calendar-3-11-2\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/custom-code-on-events-calendar-3-11-2\/","name":"Custom code on Events Calendar 3.11.2 -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-08-10T08:11:40+00:00","dateModified":"2015-08-27T14:05:03+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/custom-code-on-events-calendar-3-11-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/custom-code-on-events-calendar-3-11-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/custom-code-on-events-calendar-3-11-2\/#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":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Custom code on Events Calendar 3.11.2"}]},{"@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\/994666","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\/994666\/revisions"}],"predecessor-version":[{"id":994737,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/994666\/revisions\/994737"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=994666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}