Customers report: perform a LEFT JOIN on the order stats table to include customers that have not yet placed an order.

This commit is contained in:
Jeff Stieler 2019-01-08 10:47:19 -07:00
parent 46b503dd54
commit d9fd8568df
1 changed files with 2 additions and 2 deletions

View File

@ -327,7 +327,7 @@ class WC_Admin_Reports_Customers_Data_Store extends WC_Admin_Reports_Data_Store
SELECT {$customers_table_name}.customer_id
FROM
{$customers_table_name}
JOIN
LEFT JOIN
{$order_stats_table_name}
ON
{$customers_table_name}.customer_id = {$order_stats_table_name}.customer_id
@ -354,7 +354,7 @@ class WC_Admin_Reports_Customers_Data_Store extends WC_Admin_Reports_Data_Store
{$selections}
FROM
{$customers_table_name}
JOIN
LEFT JOIN
{$order_stats_table_name}
ON
{$customers_table_name}.customer_id = {$order_stats_table_name}.customer_id