Merge pull request #8748 from thenbrent/reinstate_default_items
Reinstate default value for $items
This commit is contained in:
commit
528d6575ed
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue