WooCommerce doesn’t have the best message for availability by default. What if you want to change it? There is a simple way to do this but you have to be sure you know how to modify your functions.php file.

If so, you should paste the above code and replace the words AVAILABLE and SOLD OUT with yours. So simple!

  function custom_get_availability( $availability, $_product ) {
   //change text "In Stock' to 'SPECIAL ORDER'
   if ( $_product->is_in_stock() ) $availability['availability'] = __('AVAILABLE', 'woocommerce');

   //change text "Out of Stock' to 'SOLD OUT'
   if ( !$_product->is_in_stock() ) $availability['availability'] = __('SOLD OUT', 'woocommerce');
   return $availability;

  add_filter( 'woocommerce_get_availability', 'custom_get_availability', 1, 2);

WooCommerce is powered with a variety of hooks in order to customize the functionality among to your needs. You can read the whole documentation here.

WordPress Support Services

Do you need a super fast and optimized website like ours?
We do things different at BakeMyWP!

Get a Free Quote

Leave a Reply

Your email address will not be published.