Skip to content

Commit 49ad77c

Browse files
committed
move to a variable that we still control aspects of, remove prepare statement, and switch to get_var
1 parent 58e1af8 commit 49ad77c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Utility/HealthPanel.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,14 @@ private function user_has_cc_key(): bool {
115115
* @return string
116116
*/
117117
private function abandoned_checkouts_count() : string {
118+
$table = CheckoutsTable::get_table_name();
118119
$query = <<<SQL
119120
SELECT
120121
count(*)
121122
FROM
122-
%s
123+
{$table}
123124
SQL;
124-
$count = (string) $GLOBALS['wpdb']->query( $GLOBALS['wpdb']->prepare( $query, CheckoutsTable::get_table_name() ) );
125+
$count = (string) $GLOBALS['wpdb']->get_var( $query );
125126
return ( ! empty( $count ) ) ? $count : '0';
126127
}
127128
}

0 commit comments

Comments
 (0)