Customer report data store: fix handling of ‘name’ parameter in WHERE clause.
This commit is contained in:
parent
714c1ee030
commit
fa3379e62f
|
@ -168,7 +168,6 @@ class WC_Admin_Reports_Customers_Data_Store extends WC_Admin_Reports_Data_Store
|
|||
$where_clauses = array();
|
||||
|
||||
$exact_match_params = array(
|
||||
'name',
|
||||
'username',
|
||||
'email',
|
||||
'country',
|
||||
|
@ -183,6 +182,10 @@ class WC_Admin_Reports_Customers_Data_Store extends WC_Admin_Reports_Data_Store
|
|||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $query_args['name'] ) ) {
|
||||
$where_clauses[] = $wpdb->prepare( "CONCAT_WS( ' ', first_name, last_name ) = %s", $query_args['name'] );
|
||||
}
|
||||
|
||||
$numeric_params = array(
|
||||
'orders_count' => '%d',
|
||||
'total_spend' => '%f',
|
||||
|
|
Loading…
Reference in New Issue