From b612bab38b7be0f2c1c33466ab46c7d543bb21d7 Mon Sep 17 00:00:00 2001 From: Cesar Rodas Date: Tue, 23 May 2017 19:18:31 -0400 Subject: [PATCH] Fixed coding styles --- includes/abstracts/abstract-wc-order.php | 6 +++--- includes/data-stores/abstract-wc-order-data-store-cpt.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/abstracts/abstract-wc-order.php b/includes/abstracts/abstract-wc-order.php index 492e8f8eb9f..8f8d0d4c676 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -802,12 +802,12 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order { // The item was not found in memory, we load in memory all the items related to this order $types = $this->data_store->get_order_item_types( $this ); foreach ( $types as $type ) { - if ( !( $group = $this->type_to_group( $type ) ) || ! empty( $this->items[ $group ] ) ) { + if ( ! ( $group = $this->type_to_group( $type ) ) || ! empty( $this->items[ $group ] ) ) { continue; } $this->items[ $group ] = $this->data_store->read_items( $this, $type ); - if ( ! empty( $this->items[$group][ $item_id ] ) ) { - return $this->items[$group][ $item_id ]; + if ( ! empty( $this->items[ $group ][ $item_id ] ) ) { + return $this->items[ $group ][ $item_id ]; } } diff --git a/includes/data-stores/abstract-wc-order-data-store-cpt.php b/includes/data-stores/abstract-wc-order-data-store-cpt.php index bd82bec2e87..ea0b4014535 100644 --- a/includes/data-stores/abstract-wc-order-data-store-cpt.php +++ b/includes/data-stores/abstract-wc-order-data-store-cpt.php @@ -362,7 +362,7 @@ abstract class Abstract_WC_Order_Data_Store_CPT extends WC_Data_Store_WP impleme */ public function get_order_item_types( WC_Order $order ) { global $wpdb; - $query = $wpdb->prepare( "SELECT DISTINCT order_item_type FROM {$wpdb->prefix}woocommerce_order_items WHERE order_id = %d", $order->get_id() ); + $query = $wpdb->prepare( "SELECT DISTINCT order_item_type FROM {$wpdb->prefix}woocommerce_order_items WHERE order_id = %d", $order->get_id() ); return wp_list_pluck( $wpdb->get_results( $query ), 'order_item_type' ); } }