could that work ?
add_filter( ‘gettext’, ‘customizing_woocommerce_strings’, 999, 3 );
function customizing_woocommerce_strings( $translated_text, $untranslated_text, $domain ) {
switch ( $translated_text ) {
case ‘Veuillez sélectionner des options du produit avant de l’ajouter à votre panier.’ :
$translated_text = __( ‘Votre message personnalisé ici.’, ‘woocommerce’ );
break;
}
return $translated_text;
}