Drupal Commerce Stock Availability or Out of Stock
On Drupal 7.61 &amp; Commerce Stock 7.x-2.3 I've solved it with hook_commerce_product_reference_default_delta_alter:

/**
 * Implements hook_commerce_product_reference_default_delta_alter().
*/
function test_module_commerce_product_reference_default_delta_alter(&amp;$delta, $products) {

foreach ($products as $product) {
  if ($product-&gt;commerce_stock['und'][0]['value'] &gt; 0){
    $product-&gt;commerce_stock['und'][0]['value'] = "On stock";
  }else {
    $product-&gt;commerce_stock['und'][0]['value'] = "Out of stock";
  }
 }
}