For our customization want to change woocommerce Out of stock text to Sold Out then place the following snippet in functions.php within your theme folder!.

add_filter('woocommerce_get_availability', 'change_woocommerce_out_of_stock_text');
function change_woocommerce_out_of_stock_text($availability)
{
	$availability['availability'] = str_ireplace('Out of stock', 'Sold Out', $availability['availability']);
	return $availability;
}

Have any doubt, then comment here!

Leave a Reply

Your email address will not be published. Required fields are marked *