parent
b97181c08a
commit
6fa57f707d
|
@ -98,12 +98,12 @@ class WC_Admin_Report {
|
|||
|
||||
} elseif ( $value['type'] == 'order_item_meta' ) {
|
||||
|
||||
$joins["order_items"] = "LEFT JOIN {$wpdb->prefix}woocommerce_order_items AS order_items ON posts.ID = order_id";
|
||||
$joins["order_items"] = "LEFT JOIN {$wpdb->prefix}woocommerce_order_items AS order_items ON posts.ID = order_items.order_id";
|
||||
$joins["order_item_meta_{$key}"] = "LEFT JOIN {$wpdb->prefix}woocommerce_order_itemmeta AS order_item_meta_{$key} ON order_items.order_item_id = order_item_meta_{$key}.order_item_id";
|
||||
|
||||
} elseif ( $value['type'] == 'order_item' ) {
|
||||
|
||||
$joins["order_items"] = "LEFT JOIN {$wpdb->prefix}woocommerce_order_items AS order_items ON posts.ID = order_id";
|
||||
$joins["order_items"] = "LEFT JOIN {$wpdb->prefix}woocommerce_order_items AS order_items ON posts.ID = order_items.order_id";
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ class WC_Admin_Report {
|
|||
|
||||
if ( isset( $value['type'] ) && $value['type'] == 'order_item_meta' ) {
|
||||
|
||||
$joins["order_items"] = "LEFT JOIN {$wpdb->prefix}woocommerce_order_items AS order_items ON posts.ID = order_id";
|
||||
$joins["order_items"] = "LEFT JOIN {$wpdb->prefix}woocommerce_order_items AS order_items ON posts.ID = order_items.order_id";
|
||||
$joins["order_item_meta_{$key}"] = "LEFT JOIN {$wpdb->prefix}woocommerce_order_itemmeta AS order_item_meta_{$key} ON order_items.order_item_id = order_item_meta_{$key}.order_item_id";
|
||||
|
||||
} else {
|
||||
|
|
|
@ -65,7 +65,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
),
|
||||
'where' => array(
|
||||
array(
|
||||
'key' => 'order_item_type',
|
||||
'key' => 'order_items.order_item_type',
|
||||
'value' => 'coupon',
|
||||
'operator' => '='
|
||||
)
|
||||
|
@ -226,7 +226,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
),
|
||||
'where' => array(
|
||||
array(
|
||||
'key' => 'order_item_type',
|
||||
'key' => 'order_items.order_item_type',
|
||||
'value' => 'line_item',
|
||||
'operator' => '='
|
||||
)
|
||||
|
@ -259,7 +259,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
|
|||
),
|
||||
'where' => array(
|
||||
array(
|
||||
'key' => 'order_item_type',
|
||||
'key' => 'order_items.order_item_type',
|
||||
'value' => 'coupon',
|
||||
'operator' => '='
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue