Hi ooksanen,
where did you edit the table funcionality?
I am facing the same filter issue
thx
replace word wp_usermeta with {$wpdb->usermeta} in query in includes/user-list.php
if ( $this->selected_status() != null ) {
$filter = $this->selected_status();
$query->query_from .= ” INNER JOIN {$wpdb->usermeta} ON ( {$wpdb->users}.ID = wp_usermeta.user_id )”;
if ( ‘approved’ == $filter ) {
// $query->query_fields = “DISTINCT SQL_CALC_FOUND_ROWS {$wpdb->users}.ID”;
//$query->query_from .= ” LEFT JOIN {$wpdb->usermeta} AS mt1 ON ({$wpdb->users}.ID = mt1.user_id AND mt1.meta_key = ‘pw_user_status’)”;
//$query->query_where .= ” AND ( ( wp_usermeta.meta_key = ‘pw_user_status’ AND CAST(wp_usermeta.meta_value AS CHAR) = ‘approved’ ) OR mt1.user_id IS NULL )”;
} else {
//$query->query_where .= ” AND ( (wp_usermeta.meta_key = ‘pw_user_status’ AND CAST(wp_usermeta.meta_value AS CHAR) = ‘{$filter}’) )”;
}
}
with
if ( $this->selected_status() != null ) {
$filter = $this->selected_status();
$query->query_from .= ” INNER JOIN {$wpdb->usermeta} ON ( {$wpdb->users}.ID = {$wpdb->usermeta}.user_id )”;
if ( ‘approved’ == $filter ) {
$query->query_fields = “DISTINCT SQL_CALC_FOUND_ROWS {$wpdb->users}.ID”;
$query->query_from .= ” LEFT JOIN {$wpdb->usermeta} AS mt1 ON ({$wpdb->users}.ID = mt1.user_id AND mt1.meta_key = ‘pw_user_status’)”;
$query->query_where .= ” AND ( ( {$wpdb->usermeta}.meta_key = ‘pw_user_status’ AND CAST({$wpdb->usermeta}.meta_value AS CHAR) = ‘approved’ ) OR mt1.user_id IS NULL )”;
} else {
$query->query_where .= ” AND ( ({$wpdb->usermeta}.meta_key = ‘pw_user_status’ AND CAST({$wpdb->usermeta}.meta_value AS CHAR) = ‘{$filter}’) )”;
}
}