diff --git a/includes/class-wc-order.php b/includes/class-wc-order.php index 3a1068e834a..fc29304ff89 100644 --- a/includes/class-wc-order.php +++ b/includes/class-wc-order.php @@ -1076,7 +1076,7 @@ class WC_Order { $_product = $this->get_product_from_item( $item ); - if ($_product->exists() && $_product->is_downloadable()) : + if ( $_product && $_product->exists() && $_product->is_downloadable() ) : $has_downloadable_item = true; endif;