title: When Splitting Cart into Packages Shipping Classes in stock string post meta gets returned as lowercase using Woocommerce
body: <p>We are splitting by Shipping Class and Post Meta: _stock_status on the cart page. When we split the cart, the shipping class appears for each item just fine, but when it splits the cart using the Post Meta: _stock_status, it returns the text on the cart page as lowercase; instock, onbackorder, outofstock. I have tried many things to change this string, but cannot. I want it to read like “On Backorder” instead of “onbackorder”. Is it possible to change this?</p>
  <p>The closest code I can find is this, but I am not sure how to execute it correctly in functions.php?</p>
  <p>$stock_status = $variation_obj-&gt;get_stock_status();</p>
  <p>// Here we change both $stock_status names to human readable strings:
  $stock_status = str_replace( array('instock','outofstock'), array('In Stock','Out of Stock'), $stock_status );</p>
  <p>$stock_qty = $variation_obj-&gt;get_stock_quantity();</p>
  <p>if( $stock_qty&gt;0 )
  return $term_name .= ' - ' . $stock_status . ' ('.$stock_qty.')';
  else
  return $term_name .= ' - ' . $stock_status;</p>
  <p>}</p>
  <p><a href="https://jeremyf15.sg-host.com/cart/" rel="nofollow noreferrer">https://jeremyf15.sg-host.com/cart/</a></p>
  <p><a href="https://i.stack.imgur.com/oGSR6.png" rel="nofollow noreferrer">screen cap</a></p>
  <p><a href="https://i.stack.imgur.com/tsx4X.png" rel="nofollow noreferrer">screen cap 2</a></p>