Title: some fatal error
Last modified: August 21, 2016

---

# some fatal error

 *  [rkquizzes](https://wordpress.org/support/users/rkquizzes/)
 * (@rkquizzes)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/some-fatal-error/)
 * This is what I get when trying to print out :
    Fatal error: Call to a member 
   function get_variation_attributes() on a non-object in /home/u228408012/public_html/
   wp-content/plugins/woocommerce-delivery-notes/classes/classwcdn-print.php on 
   line 143
 * [http://wordpress.org/extend/plugins/woocommerce-delivery-notes/](http://wordpress.org/extend/plugins/woocommerce-delivery-notes/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [tiagoalves83](https://wordpress.org/support/users/tiagoalves83/)
 * (@tiagoalves83)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/some-fatal-error/#post-3749880)
 * 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](https://wordpress.org/support/users/chabis/) can you correct this at
   the core ? Maybe doing a better solution than mine…
 *  [piffpaffpuff](https://wordpress.org/support/users/chabis/)
 * (@chabis)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/some-fatal-error/#post-3749881)
 * 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.

 * ![](https://ps.w.org/woocommerce-delivery-notes/assets/icon-256x256.jpg?rev=2829362)
 * [Print Invoice & Delivery Notes for WooCommerce](https://wordpress.org/plugins/woocommerce-delivery-notes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-delivery-notes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-delivery-notes/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-delivery-notes/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [piffpaffpuff](https://wordpress.org/support/users/chabis/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/some-fatal-error/#post-3749881)
 * Status: not resolved