Q:

Woo-commerce get all the comments for by product id

What I need to achieve is to get all comments from all products in Woocommerce.  I have try te 
get_comments( array( 'post_type' => 'product') );

But it give me all the comments not for the particular product id. 

A:

Hello after doing some research I got the what I want here is the code which return all approved post for the particular product. 
$args = array (
    'post_type' => 'product', 
    'post_ID' =>$product->id,  // Product Id
    'status' => "approve", // Status you can also use 'hold', 'spam', 'trash', 
    'number' => 1  // Number of comment you want to fetch I want latest approved post soi have use 1
    );
$comments = get_comments($args);

