How can we change the badge text that displays on “Out of Stock” products. We would like it to display “Coming Soon” instead of “Out of Stock”
We were able to change the “Out of Stock” product text to “Coming Soon” by using the below code in our functions.php:
// Change Out of Stock to Coming Soon
add_filter('woocommerce_get_availability', 'availability_filter_func');
function availability_filter_func($availability)
{
$availability['availability'] = str_ireplace('Out of stock', 'Coming Soon!', $availability['availability']);
return $availability;
}
However the product badge text still displays “Sold Out”. We would like the badge text to display “Coming Soon” until our products are ready to sell.
Attachments:
You must be
logged in to view attached files.