$_product can be false. This is because the ->get_product() has these return types: \WC_Product|false. Then we should check if $_product instanceof \WC_Product or continue;
Cases:
Order with an empty line
Plugins which permit to buy (in WC cart) items (CPT) which are NOT extending the \WC_Product class.
$_product can be false. This is because the ->get_product() has these return types: \WC_Product|false. Then we should check if $_product instanceof \WC_Product or continue;
Cases: