Just thought I’d add something to enhance the answer given by bheadrick to the OP’s original question…
To change the out of stock message for certain products only, you can add an ‘if’ statement with an array of the product ID’s of those that you want to change the message for.
Add this to your themes functions.php file, changing the ID’s 2230 etc to match your product IDs:
add_filter('woocommerce_get_availability', 'availability_filter_func');
function availability_filter_func($availability)
{
if(is_single( array(2230,2232,2234,2236)))$availability['availability'] = str_ireplace('Out of stock', 'your text here', $availability['availability']);
return $availability;
}
Now just the products you add to the array will have their out of stock message changed. All other products will keep the original ‘out of stock’ message,
Thanks to bheadrick for the original function – it enabled me to work out how to use it for specific products!
Hope this helps somebody out there!