Fix typo in SQL for stock quantity check (#36402)

This commit is contained in:
Corey McKrill 2023-08-30 17:01:15 -07:00 committed by GitHub
commit 26fde13e00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Fix a minor code typo, no change in functionality

View File

@ -2120,7 +2120,7 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da
global $wpdb;
return $wpdb->prepare(
"
SELECT COALESCE ( MAX( meta_value ), 0 ) FROM $wpdb->postmeta as meta_table
SELECT COALESCE( MAX( meta_value ), 0 ) FROM $wpdb->postmeta as meta_table
WHERE meta_table.meta_key = '_stock'
AND meta_table.post_id = %d
",