Block/Review.php
public function filterItemsForReview($items, $websiteId)
    {
        $order = $this->getOrder();

        if (empty($items) || ! $order) {
            return false;
        }

        //if customer is guest then no need to filter any items
        if ($order->getCustomerIsGuest()) {
            return $items;
        }

        if (!$this->helper->isNewProductOnly($websiteId)) {
            return $items;
        }

        $customerId = $order->getCustomerId();

        $items = $this->review->filterItemsForReview($items, $customerId, $order);

        return $items;
    }
public function filterItemsForReview($items, $websiteId)
    {
        $order = $this->getOrder();

        if (empty($items) || ! $order) {
            return false;
        }

        //if customer is guest then no need to filter any items
        if ($order->getCustomerIsGuest()) {
            return $items;
        }

        if (!$this->helper->isNewProductOnly($websiteId)) {
            return $items;
        }

        $customerId = $order->getCustomerId();

        $items = $this->review->filterItemsForReview($items, $customerId, $order);

        return $items;
    }
public function filterItemsForReview ( $ items , $ websiteId ) { $ order = $ this -> getOrder ( ) ; if ( empty ( $ items ) || ! $ order ) { return false ; } //if customer is guest then no need to filter any items if ( $ order -> getCustomerIsGuest ( ) ) { return $ items ; } if ( ! $ this -> helper -> isNewProductOnly ( $ websiteId ) ) { return $ items ; } $ customerId = $ order -> getCustomerId ( ) ; $ items = $ this -> review -> filterItemsForReview ( $ items , $ customerId , $ order ) ; return $ items ; }
Filter items for review. If a customer has already placed a review for a product then exclude the product.

@param array $items
@param int   $websiteId

@return boolean|array
Filter items for review . If a customer has already placed a review for a product then exclude the product .