Yes, you can query products by their ids and display them as ajax response. You code just needs a little revision. Perhaps you could try something along these lines,
public function display_search_result(){
$skus = urldecode($_POST['sku_universel']);
$skus = explode(',',$sku);
$product_ids = array();
// you can use native woocommerce function to get the product ids
foreach($skus as $sku){
$product_id = wc_get_product_id_by_sku($sku);
if ( is_int($product_id) ) {
$product_ids[] => $product_id;
}
}
$args = array(
'post_type' => 'product', // product, not products
'post_status' => 'publish',
'post__in' => $product_ids,
'posts_per_page' => 100 // change this based on your needs
);
$ajaxposts = new WP_Query( $args );
$response="";
if ( $ajaxposts->posts ){
while ( $ajaxposts->have_posts() ) {
$ajaxposts->the_post();
$response .= wc_get_template_part( 'content', 'product' ); // use WooCommerce function to get html
}
} else {
// handle not found by yourself or
// perhaps do_action( 'woocommerce_no_products_found' ); could do the trick?
}
echo $response;
exit;
}