Merge pull request #8748 from thenbrent/reinstate_default_items

Reinstate default value for $items
This commit is contained in:
Claudio Sanches 2015-08-07 16:20:38 -03:00
commit 528d6575ed
1 changed files with 1 additions and 0 deletions

View File

@ -1126,6 +1126,7 @@ abstract class WC_Abstract_Order {
$type = array( $type );
}
$items = array();
$get_items_sql = $wpdb->prepare( "SELECT order_item_id, order_item_name, order_item_type FROM {$wpdb->prefix}woocommerce_order_items WHERE order_id = %d ", $this->id );
$get_items_sql .= "AND order_item_type IN ( '" . implode( "','", array_map( 'esc_sql', $type ) ) . "' ) ORDER BY order_item_id;";
$line_items = $wpdb->get_results( $get_items_sql );