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 <[email protected]>
  • Loading branch information
grogou and opr authored Aug 20, 2021
1 parent 29c8493 commit e7bd0e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/StoreApi/Utilities/ProductQueryFilters.php
Original file line number Diff line number Diff line change
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 e7bd0e6

Please sign in to comment.