Check function returns a product. #3526
This commit is contained in:
parent
41c27b19ad
commit
ff0fc4fa31
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue