Replace “Out of stock” by “sold”

Replace “Out of stock” by “sold” WooCommerce support to any WordPress theme:

add_filter('woocommerce_get_availability', 'availability_filter_func');

function availability_filter_func($availability)
{
	$availability['availability'] = str_ireplace('Out of stock', 'Sold', $availability['availability']);
	return $availability;
}
See also  Secure WordPress Login Page 2021

Leave a Reply

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