Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/class-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ public function get_user_points( $user_id, $filters = array() ) {

global $wpdb;

$query = 'SELECT SUM(CASE WHEN type = "points" THEN value ELSE 0 END) AS points FROM wp_broo_user_assignment WHERE user_id = '
$query = 'SELECT SUM(CASE WHEN type = "points" THEN value ELSE 0 END) AS points FROM ' . $wpdb->prefix . BROO_USER_ASSIGNMENT_TABLE_NAME . ' WHERE user_id = '
. $user_id . ' AND ( NOW() <= expiry_dt OR expiry_dt IS NULL ) AND status = "approved"';

$added_to_query = true;
Expand Down Expand Up @@ -1173,4 +1173,4 @@ public function add_user_action_meta( $user_action_id, $meta_key, $meta_value =
array( '%s', '%s', '%s')
);
}
}
}