Drupal Commerce Stock Availability or Out of Stock I am working on Drupal Commerce website. Using Commerce Stock I am able to manage the inventory but on product details page I want to print the following.

Availability: In Stock

or 

Availability: Out of Stock

Also if possible

Availability: Limited Stock

If I am displaying stock filed its showing number of items available in stock, which I don't want to display.

Is there any way in Drupal I can acheive this task?
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";
  }
 }
}