Viewing 2 replies - 1 through 2 (of 2 total)
  • 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…

    please update to the latest version (2.0.2) and tell me if the error still exists. thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘some fatal error’ is closed to new replies.