Skip to content

Commit 58e1af8

Browse files
committed
address missing query arg for prepare statements error
1 parent b02d395 commit 58e1af8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Utility/HealthPanel.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
use WebDevStudios\CCForWoo\Meta\ConnectionStatus;
1414
use WebDevStudios\CCForWoo\Plugin;
15+
use WebDevStudios\CCForWoo\AbandonedCheckouts\CheckoutsTable;
1516

1617
/**
1718
* Class HealthPanel
@@ -118,8 +119,9 @@ private function abandoned_checkouts_count() : string {
118119
SELECT
119120
count(*)
120121
FROM
121-
{CheckoutsTable::get_table_name()}
122+
%s
122123
SQL;
123-
return (string) $GLOBALS['wpdb']->query( $GLOBALS['wpdb']->prepare( $query ) );
124+
$count = (string) $GLOBALS['wpdb']->query( $GLOBALS['wpdb']->prepare( $query, CheckoutsTable::get_table_name() ) );
125+
return ( ! empty( $count ) ) ? $count : '0';
124126
}
125127
}

0 commit comments

Comments
 (0)