public function read_items($order, $type)
{
global $wpdb;
$get_items_sql = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}woocommerce_order_items WHERE order_id = %d AND order_item_type = %s ORDER BY order_item_id;", $order->get_id(), $type);
$items = $wpdb->get_results($get_items_sql);
if (!empty($items)) {
$items = array_map(array('WC_Order_Factory', 'get_order_item'), array_combine(wp_list_pluck($items, 'order_item_id'), $items));
} else {
$items = array();
}
return $items;
}