Extra protection for empty order key orders.
Some order can have order key set to empty string. This commit disallows fetching those orders via key at DB level (its already disallowed from interface).
This commit is contained in:
parent
ebb43378a1
commit
322639bb7e
|
@ -847,7 +847,7 @@ WHERE
|
||||||
$wpdb->prepare(
|
$wpdb->prepare(
|
||||||
"SELECT {$orders_table}.id FROM {$orders_table}
|
"SELECT {$orders_table}.id FROM {$orders_table}
|
||||||
INNER JOIN {$op_table} ON {$op_table}.order_id = {$orders_table}.id
|
INNER JOIN {$op_table} ON {$op_table}.order_id = {$orders_table}.id
|
||||||
WHERE {$op_table}.order_key = %s",
|
WHERE {$op_table}.order_key = %s AND {$op_table}.order_key != ''",
|
||||||
$order_key
|
$order_key
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue