Changing Out of Stock Text in WooCommerce

by | Oct 22, 2021 | Technical Help, WordPress

Add to functions.php file:

function themeprefix_change_soldout ( $text, $product) {
if ( !$product->is_in_stock() ) {
$text = ‘<div class=””>Sold out</div>’;
}
return $text;
}

274425
CLICK HERE to find your domain name!   CLICK HERE to transfer your domain name!

Archives