I got the same problem, I needed to edit the plugin’s core to prevent this error.
This error happens when:
1) you added a product with variation
2) your customer buy the product with that variation
3) you remove the variation
4) you try to print the delivery note … ( ERROR!)
So I had to edit: classwcdn-print.php because line 139 is returning false
$product = $this->order->get_product_from_item( $item );
line 142 replace to:
if( $product && isset( $item['variation_id'] ) && $item['variation_id'] > 0 ) {
line 162 replace to:
if( $product && $product->exists() && $product->is_downloadable() && $product->has_file() && ( $this->order->status == 'completed' || ( get_option( 'woocommerce_downloads_grant_access_after_payment' ) == 'yes' && $this->order->status == 'processing' ) ) ) {
add this before line 171 “// Set the single price”
if ($product) {
add this before line 186 “// Pass complete item array”
}
that is it…
@chabis can you correct this at the core ? Maybe doing a better solution than mine…