Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Escape statuses for sql query
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
  • Loading branch information
grogou and opr committed Aug 20, 2021
1 parent 304348a commit 8012b2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/StoreApi/Utilities/ProductQueryFilters.php
Expand Up @@ -102,7 +102,7 @@ private function generate_stock_status_count_query( $status, $product_query_sql,
return false;
}
global $wpdb;

$status = esc_sql( $status );
return "
SELECT COUNT( DISTINCT posts.ID ) as status_count
FROM {$wpdb->posts} as posts
Expand Down

0 comments on commit 8012b2b

Please sign in to comment.