Fix undefined variable notice when adding a product that doesn't exists in order

This commit is contained in:
roykho 2021-09-20 07:06:41 -07:00
parent cc94edd8ea
commit 09fff8831a
No known key found for this signature in database
GPG Key ID: 7B36C0EA25795714
1 changed files with 1 additions and 0 deletions

View File

@ -932,6 +932,7 @@ class WC_AJAX {
// Add items to order.
$order_notes = array();
$added_items = array();
foreach ( $items_to_add as $item ) {
if ( ! isset( $item['id'], $item['qty'] ) || empty( $item['id'] ) ) {