How to check if a user has ever ordered a product/list of products
Here's an alternative approach, using an SQL query

$ordered = FALSE;

$node_wrapper = entity_metadata_wrapper('node', $node);
$product_ids = array();
foreach ($node_wrapper-&gt;field_products as $product) {
  $product_ids[] = $product-&gt;product_id-&gt;value();
}

// Query order details for products
// Note this is the line item product reference table
$query = db_select('field_data_commerce_product', 'p');
// Example if you want more fields, but would need to change -&gt;fetchCol()
// $query-&gt;fields('o', array('order_id', 'order_number', 'uid', 'mail'));
$query-&gt;fields('o', array('uid'));
$query-&gt;innerJoin('field_data_commerce_line_items', 'l', 'l.commerce_line_items_line_item_id = p.entity_id');
$query-&gt;innerJoin('commerce_order', 'o', 'o.order_id = l.entity_id');
$query-&gt;condition('p.commerce_product_product_id', $product_ids, 'IN');
$query-&gt;groupBy('o.order_id');
// Fetch array of uids
$result = $query-&gt;execute()-&gt;fetchCol();

// Check if account-&gt;uid in array of order uids
// If so, uid has ordered product.
if(in_array($account-&gt;uid, $result)){
  $ordered = TRUE;
}