/** * Avada: wine doesn't go "out of stock" at the winery; it runs out, permanently * @param string $translation * @param string $text * @param string $domain * @return string */ add_filter('gettext', function($translation, $text, $domain) { if ($domain === 'Avada' && $text === 'Out of stock') { $translation = 'Sold out'; } return $translation; }, 10, 3);