Hi Lily,
The quickest and easiest way, would be to add this code to your functions.php of your child theme:
add_filter( ‘gettext’, ‘customizing_product_variation_message’, 10, 3 );
function customizing_product_variation_message( $translated_text, $untranslated_text, $domain )
{
if ($untranslated_text == ‘Sorry, this product is unavailable. Please choose a different combination.’) {
$translated_text = __( ‘You need to be logged in to purchase the product. Please login and try again.’, $domain );
}
return $translated_text;
}
That code will replace the message, to what ever you want BEAR IN MIND that will do it allways, so if for some reason someone tryies to add an unavailable product, it will show same message (there are not many ocasions where that will happen)
Hope that helps