Prefer get_var() over get_col().

This commit is contained in:
barryhughes 2022-05-11 20:12:20 +00:00
parent 44bb55452a
commit d3bf32a147
1 changed files with 1 additions and 1 deletions

View File

@ -2416,7 +2416,7 @@ function wc_update_651_approved_download_directories() {
$directory_sync = wc_get_container()->get( Download_Directories_Sync::class );
// Check if at least 1 row exists, without scanning the entire table.
$is_populated = (bool) $wpdb->get_col(
$is_populated = (bool) $wpdb->get_var(
'SELECT 1 FROM ' . $download_directories->get_table() . ' LIMIT 1'
);