Replace “Out of stock” by “sold”

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; }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.