From 81599c51780a6f237a62006a1896748e9b9484ed Mon Sep 17 00:00:00 2001 From: Joshua T Flowers Date: Fri, 29 Nov 2019 09:22:18 +0800 Subject: [PATCH] Check if extended_info is set for order report items (https://github.com/woocommerce/woocommerce-admin/pull/3315) --- .../woocommerce-admin/src/API/Reports/Orders/Controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/woocommerce-admin/src/API/Reports/Orders/Controller.php b/plugins/woocommerce-admin/src/API/Reports/Orders/Controller.php index 7280902202f..9fc8706fd52 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Orders/Controller.php +++ b/plugins/woocommerce-admin/src/API/Reports/Orders/Controller.php @@ -497,9 +497,9 @@ class Controller extends ReportsController implements ExportableInterface { 'order_number' => $item['order_number'], 'status' => $item['status'], 'customer_type' => $item['customer_type'], - 'products' => $this->_get_products( $item['extended_info']['products'] ), + 'products' => isset( $item['extended_info']['products'] ) ? $this->_get_products( $item['extended_info']['products'] ) : null, 'num_items_sold' => $item['num_items_sold'], - 'coupons' => $this->_get_coupons( $item['extended_info']['coupons'] ), + 'coupons' => isset( $item['extended_info']['coupons'] ) ? $this->_get_coupons( $item['extended_info']['coupons'] ) : null, 'net_total' => $item['net_total'], ); }