{"id":943813,"date":"2015-02-19T16:07:01","date_gmt":"2015-02-20T00:07:01","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/"},"modified":"2015-03-02T08:00:07","modified_gmt":"2015-03-02T16:00:07","slug":"how-to-replace-the-out-of-stock-text-on-my-woocommerce-site","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/","title":{"rendered":"How to replace the &#039;out of stock&#039; text on my woocommerce site?"},"content":{"rendered":"<p>Hi guys,<br \/>\nI have searched and found solutions to my question, however I&#8217;m not getting it to work. So I&#8217;m assuming my issue relates to the fact I&#8217;m using Woo Tickets. <\/p>\n<p>This is the page where I&#8217;d like to replace the &#8220;Out of Stock&#8221; text with &#8220;Class is full&#8221;:<br \/>\nhttps:\/\/valleyfirstaidtraining.ca\/course\/ofa-level-1-langley-20150225\/<\/p>\n<p>And I found this function for what I want:<\/p>\n<p>add_filter( &#8216;woocommerce_get_availability&#8217;, &#8216;custom_get_availability&#8217;, 1, 2);<\/p>\n<p>\/\/ Our hooked in function $availablity is passed via the filter!<br \/>\nfunction custom_get_availability( $availability, $_product ) {<br \/>\nif ( !$_product-&gt;is_in_stock() ) $availability[&#8216;availability&#8217;] = __(&#8216;Class is full&#8217;, &#8216;woocommerce&#8217;);<br \/>\nreturn $availability;<br \/>\n}<br \/>\nFrom here:https:\/\/wordpress.org\/support\/topic\/woocommerce-remove-related-products-and-change-out-of-stock-text<\/p>\n<p>But it&#8217;s not working \u2013 what&#8217;s wrong with the code above?  <\/p>\n<p>Thank you!<br \/>\nCintia<\/p>\n","protected":false},"template":"","class_list":["post-943813","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>How to replace the &#039;out of stock&#039; text on my woocommerce site? -<\/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\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to replace the &#039;out of stock&#039; text on my woocommerce site? -\" \/>\n<meta property=\"og:description\" content=\"Hi guys, I have searched and found solutions to my question, however I&#8217;m not getting it to work. So I&#8217;m assuming my issue relates to the fact I&#8217;m using Woo Tickets. This is the page where I&#8217;d like to replace the &#8220;Out of Stock&#8221; text with &#8220;Class is full&#8221;: https:\/\/valleyfirstaidtraining.ca\/course\/ofa-level-1-langley-20150225\/ And I found this function [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-03-02T16:00:07+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\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/\",\"name\":\"How to replace the &#039;out of stock&#039; text on my woocommerce site? -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-02-20T00:07:01+00:00\",\"dateModified\":\"2015-03-02T16:00:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/#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\":\"How to replace the &#039;out of stock&#039; text on my woocommerce site?\"}]},{\"@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":"How to replace the &#039;out of stock&#039; text on my woocommerce site? -","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\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/","og_locale":"en_US","og_type":"article","og_title":"How to replace the &#039;out of stock&#039; text on my woocommerce site? -","og_description":"Hi guys, I have searched and found solutions to my question, however I&#8217;m not getting it to work. So I&#8217;m assuming my issue relates to the fact I&#8217;m using Woo Tickets. This is the page where I&#8217;d like to replace the &#8220;Out of Stock&#8221; text with &#8220;Class is full&#8221;: https:\/\/valleyfirstaidtraining.ca\/course\/ofa-level-1-langley-20150225\/ And I found this function [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/","article_modified_time":"2015-03-02T16:00:07+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\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/","name":"How to replace the &#039;out of stock&#039; text on my woocommerce site? -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-02-20T00:07:01+00:00","dateModified":"2015-03-02T16:00:07+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/how-to-replace-the-out-of-stock-text-on-my-woocommerce-site\/#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":"How to replace the &#039;out of stock&#039; text on my woocommerce site?"}]},{"@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\/943813","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":3,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/943813\/revisions"}],"predecessor-version":[{"id":943819,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/943813\/revisions\/943819"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=943813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}