Title: Fatal Error
Last modified: July 9, 2020

---

# Fatal Error

 *  Resolved [forgetmenaut](https://wordpress.org/support/users/deadlyvine/)
 * (@deadlyvine)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-3552/)
 * I’m using a foofy managed WP, FlyWheel, and your plugin has thrice crashed after
   working fine for a spell. No red flags on the status page, and I’ve read through
   the FAQ and am unable to hone in on the problem. Can you assist? I am disabling
   the plugin presently to ensure our site doesn’t go down a fourth time, but would
   be happy to give live access. We have only one product, one shop page (evident
   from the main menu).
 * WordPress version 5.4.2
    Current theme: Graphy Child Theme (version 1.0.0) Current
   plugin: WooCommerce PDF Invoices & Packing Slips (version 2.5.2) PHP version 
   7.3.19-1+ubuntu16.04.1+deb.sury.org+1
 * Error Details
    ============= An error of type E_ERROR was caused in line 204 
   of the file /www/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/
   documents/class-wcpdf-invoice.php. Error message: Uncaught Error: Call to undefined
   function WPO\WC\PDF_Invoices\Documents\wc_get_order_statuses() in /www/wp-content/
   plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/class-wcpdf-
   invoice.php:204 Stack trace: #0 /www/wp-content/plugins/woocommerce-pdf-invoices-
   packing-slips/includes/class-wcpdf-settings-documents.php(20): WPO\WC\PDF_Invoices\
   Documents\Invoice->init_settings() #1 /wordpress/wp-includes/class-wp-hook.php(
   287): WPO\WC\PDF_Invoices\Settings_Documents->init_settings(”) #2 /wordpress/
   wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #3 /wordpress/
   wp-includes/plugin.php(478): WP_Hook->do_action(Array) #4 /wordpress/wp-admin/
   admin.php(170): do_action(‘admin_init’) #5 {main} thrown
 * Here is a screenshot of my status page, in case that’s useful – all marked green.
   
   [https://drive.google.com/file/d/15L-VV5PmO1KdUL3VD10Xss68v2ByVxAb/view?usp=sharing](https://drive.google.com/file/d/15L-VV5PmO1KdUL3VD10Xss68v2ByVxAb/view?usp=sharing)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-3552%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [forgetmenaut](https://wordpress.org/support/users/deadlyvine/)
 * (@deadlyvine)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-3552/#post-13100734)
 * It’s also worth noting that the plugin failing disabled WooCommerce, which then
   disabled 4 other WooCommerce-related plugins I’d installed. Basically, one of
   the more catastrophic fails of a plugin. Is it normal for WooCommerce to be deactivated?
 * The reinstall of WooCommerce merited deleting the actual plugin folder, as it
   was still there but not visible to the WP install.
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-3552/#post-13101020)
 * First of all, I’m sorry to hear that the plugin crashed on your site.
 * From your description of events, I think things actually happened in a different
   order: Our plugin does not have the power to deactivate WooCommerce, and even
   when our plugin crashes that would not deactivate WooCommerce. The fact that 
   you had an empty woocommerce plugin folder (“_as it was still there but not visible
   to the WP install._“) makes me suspect that a WooCommerce update was incomplete
   for some reason, causing our plugin to execute even though WooCommerce was not
   really ready for it. Our plugin depends on a few core WooCommerce functions, 
   such as the one that triggered the fatal error: `wc_get_order_statuses()`.
 * If you can verify that WooCommerce is currently installed correctly, I think 
   you should be able to safely activate PDF Invoices & Packing Slips.
 * In all of this, I am assuming that the event that triggered this issue was the
   last WooCommerce update (4.3.0), is that correct? Did you install plugin updates
   one by one, or did you install multiple updates at once? Normally, the recommended
   order of installing/updating plugins would be to update extensions first, and
   then WooCommerce (since older versions of the extensions may not be compatible
   with the newer WooCommerce).
 *  Thread Starter [forgetmenaut](https://wordpress.org/support/users/deadlyvine/)
 * (@deadlyvine)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-3552/#post-13101544)
 * Thanks for your quick response. I never had said the WooCommerce folder was empty,
   only that the Fatal Error seems to have triggered a destructive happening to 
   the WooCommerce installation itself. The error message I posted came as the only
   warning the site was experiencing difficulty. While the site’s front end continued
   to work, WooCommerce was now disabled and many top menu entries that corresponded
   to WooCommerce shop pages and/or products also became non-functional.
 * The circumstance around the plugin folder was that firstly, WooCommerce was completely
   corrupted somehow and not showing in Active or Disabled Plugins, suddenly. Attempting
   to install WooCommerce returned the “can’t install, directory already exists”–
   prompting me to look on the server and note that despite the presence of the 
   WooCommerce dir under Plugins, it was not recognized by WordPress.
 * Your plugin was the most recent installation with very few other WooCommerce 
   add-ons, and has twice now cited as the reason for the site crash – once yesterday
   and once about 2 weeks ago. Neither coincided with a WordPress Update, either,
   though I’m seeing your suggestion about plugin/extension updates as potentially
   problematic. The JetPack AutoUpdate (Plugins) could be doing a bulk update that
   I might assume would update WooCommerce before your plugin.
 * Did the error message reveal anything?
    Error message: Uncaught Error: Call to
   undefined function WPO\WC\PDF_Invoices\Documents\wc_get_order_statuses() in /
   www/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/
   class-wcpdf-invoice.php:204
 * Thanks again
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-3552/#post-13103436)
 * > Did the error message reveal anything?
 * Yes – as I wrote above that error will show up if PDF invoices determines WooCommerce
   to be active, while if it didn’t actually completely install correctly/completely,
   it may not have access to that particular function (`wc_get_order_statuses()`)
   and thus crash.
    I have built in a check for this function that I will include
   in the next release.
 * Our plugin does not handle any of the update process, and under normal circumstances,
   one plugin crashing should not have any effect on the installation/update of 
   another plugin.
    Also, the above error will only happen if WooCommerce is not
   installed/loaded correctly, which leads me to conclude that it can only have 
   happened in that order (1) WooCommerce update not completing 2) PDF invoices 
   crashing and reporting by email 3) Other plugins deactivated due to WooCommerce
   not present).
 * Now that crash of our plugin should certainly not happen so I will make sure 
   that in the next update it won’t, but that doesn’t explain why the WooCommerce
   update failed and you may want to look into what happened there. I have not worked
   with JetPack AutoUpdate Plugins (mostly because of the aforementioned considerations
   regarding plugin interdependency but also because for example X.0 updates generally
   are more prone to errors), so I don’t know how that plays into this.

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

The topic ‘Fatal Error’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Ewout](https://wordpress.org/support/users/pomegranate/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-3552/#post-13103436)
 * Status: resolved