title: Changing WooCommerce out of stock badge text
body: <p>We are using the Neighborhood theme on Wordpress and Woo Commerce in order to sell one-off, unique items. Stock management works well in terms of ensuring that products sold cannot be purchased again displaying the item as out of stock instead. This in principle is fine and indeed, the display of "In stock" turning to "Out of stock" under the price on the item description works no problem and we have even found code to change that display if necessary <a href="https://wordpress.stackexchange.com/questions/117317/sell-one-unique-item-with-woocommerce">here</a>. This works fine - adding the following code to the functions.php in the theme:</p>
  
  <pre><code>add_filter('woocommerce_stock_html', 'change_stock_message', 10, 2);
  function change_stock_message($message, $stock_status) {
      if ($stock_status == "Out of stock") {
          $message = '&lt;p class="stock out-of-stock"&gt;Sold&lt;/p&gt;';    
      } else {
          $message = '&lt;p class="stock in-stock"&gt;Available&lt;/p&gt;';           
      }
      return $message;
  }
  </code></pre>
  
  <p>However, what we really want to do is change the text in the out of stock badge that appears across the image e.g. <a href="http://neighborhood.swiftideas.net/product/common-projects-achilles/" rel="nofollow noreferrer">http://neighborhood.swiftideas.net/product/common-projects-achilles/</a>. </p>
  
  <p><a href="https://i.stack.imgur.com/iEXIl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iEXIl.png" alt="enter image description here"></a></p>
  
  <p>Changing the CSS is no problem so the text font, background, size etc. is easily altered adding something like this to the custom-css:</p>
  
  <pre><code>.out-of-stock-badge {
      background: red;
      font-size: 12px;
  }
  </code></pre>
  
  <p>How to change the out-of-stock-badge text from "Out of stock" to "SOLD"?</p>