Troubleshooting Common Fatal Errors in PDF Invoices & Packing Slips for WooCommerce
Content
If you're encountering a fatal error after updating the 'PDF Invoices & Packing Slips for WooCommerce' plugin or your server's PHP version, you're not alone. These errors can be frustrating, often causing the plugin to stop working entirely or even crashing your admin area. Based on common community reports, this guide will help you diagnose and resolve the most frequent fatal errors.
Why Do These Fatal Errors Occur?
Fatal errors in the plugin typically arise from a few key scenarios:
- Incomplete Plugin Updates: Files may not have downloaded or installed correctly during an automatic update.
- PHP Version or Extension Issues: The plugin requires specific PHP extensions (like
DOMDocument) that might be missing on your server. - File Permission Problems: The plugin cannot access or write to necessary files due to restrictive server permissions.
- Compatibility Conflicts: An update may introduce a temporary conflict with your theme, another plugin, or a custom code snippet.
Common Errors and Their Solutions
1. Class Not Found Errors (e.g., ThirdPartyPlugins, DOMDocument)
These are among the most common errors reported.
Error Examples:
Fatal error: Class 'WPO\IPS\Compatibility\ThirdPartyPlugins' not foundFatal error: Class 'DOMDocument' not foundFatal error: Class 'DOMImplementation' not found
Solutions:
- Reinstall the Plugin: An incomplete update is a frequent cause. Completely delete the plugin from your WordPress plugins page and install it fresh from the repository. This ensures all files are correctly placed.
- Install PHP DOM Extension: The
DOMDocumentand related classes are part of the PHP XML extension. Contact your hosting provider and ask them to enable thephp-xmlorphp-domextension for your PHP version.
2. File System and Permission Errors
These errors indicate the plugin cannot interact with your server's file system correctly.
Error Examples:
PHP Fatal error: Uncaught RuntimeException: This plugin only supports the direct filesystem method.Warning: include_once(): Failed opening '...template-functions.php' for inclusion (Permission denied)
Solutions:
- Force Direct Filesystem Method: If you are on a host that uses a non-standard file system (like VIP), you may need to force the direct method. Add this line to your
wp-config.phpfile above the/* That's all, stop editing! Happy publishing. */line:
Note: Some specialized hosting environments may not support the direct method. Consult your host's documentation.define('FS_METHOD', 'direct'); - Check File Permissions: The
Permission deniedwarning suggests the web server user does not have read access to the plugin files. Contact your hosting support to check and correct the file permissions for the plugin's directory, typically located at/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/.
3. PHP 8.x Compatibility Warnings
While the core plugin is compatible with PHP 8.x, some deprecated code notices might appear, especially with extensions or custom templates.
Error Example:
PHP Deprecated: Return type of ... should either be compatible with DateTime::setTimezone(...
Solution:
- Ensure you are using the latest version of the plugin and any associated premium extensions, as these warnings are often fixed in subsequent updates. If the notice is non-fatal and everything works, you can safely suppress deprecation warnings in a production environment, but updating is the best long-term solution.
General Troubleshooting Steps
If the specific error isn't listed above, follow these steps to isolate the problem.
- Conflict Test: Temporarily switch to a default WordPress theme (like Twenty-Twenty Four) and disable all other plugins except WooCommerce and the PDF Invoices plugin. If the error disappears, re-enable your plugins and theme one by one to identify the conflict.
- Check for Custom Code: If you are using a custom PDF template or custom code snippets (e.g., from a functions.php file), try switching to the default "Simple" template and disabling the custom code. An outdated custom template is a common source of errors after plugin updates.
- Review Server Error Logs: Your hosting provider should give you access to error logs (often in a
logs/directory or via a control panel like cPanel). These logs provide the complete error message and stack trace, which is essential for diagnosing the root cause.
By methodically working through these solutions, you can usually resolve the fatal error and get your PDF generation back up and running. If your issue persists after trying these steps, sharing the exact error message and your environment details (WordPress, WooCommerce, PHP versions) on a community forum can help others provide more specific assistance.
Related Support Threads Support
-
Filesystem method on version 4.3.0https://wordpress.org/support/topic/filesystem-method-on-version-4-3-0/
-
200: parsererrorhttps://wordpress.org/support/topic/200-parsererror-8/
-
PHP Deprecatedhttps://wordpress.org/support/topic/php-deprecated-48/
-
Fatal error: Uncaught Errorhttps://wordpress.org/support/topic/fatal-error-uncaught-error-110/
-
This plugin only supports the direct filesystem method.https://wordpress.org/support/topic/this-plugin-only-supports-the-direct-filesystem-method/
-
Entire site is down with Fatal Errorhttps://wordpress.org/support/topic/entire-site-is-down-with-fatal-error/
-
Compatible with WooCommerce 8.0.1?https://wordpress.org/support/topic/compatible-with-woocommerce-8-0-1/
-
BUG: Fatal error due to extra Compatibility folder in 3.6.0/3.6.1https://wordpress.org/support/topic/bug-fatal-error-due-to-extra-compatibility-folder-in-3-6-0-3-6-1/
-
Fatal error: Call to undefined method DompdfHelpers::uniord()https://wordpress.org/support/topic/fatal-error-call-to-undefined-method-dompdfhelpersuniord/
-
Plugin Errorshttps://wordpress.org/support/topic/plugin-errors-33/
-
compatible with mysql & php 8+https://wordpress.org/support/topic/compatible-with-mysql-php-8/
-
Error showed on Status page (with debug mode on)https://wordpress.org/support/topic/error-showed-on-status-page-with-debug-mode-on/
-
Fatal error Woocommerce 9.6https://wordpress.org/support/topic/fatal-error-woocommerce-9-6/
-
PHP Warning: unserialize(): Extra data starting at offset 756 of 759https://wordpress.org/support/topic/php-warning-unserialize-extra-data-starting-at-offset-756-of-759/
-
Fatal error after plugin update to 3.3.1https://wordpress.org/support/topic/fatal-error-after-plugin-update-to-3-3-1/
-
Fatal error after updating to 3.8.5 and 3.8.6https://wordpress.org/support/topic/fatal-error-after-updating-to-3-8-5-and-3-8-6/
-
Compatibility issues with the woocommerce deposits partial payments invoicehttps://wordpress.org/support/topic/compatibility-issues-with-the-woocommerce-deposits-partial-payments-invoice/
-
error 500 version 4.4.1https://wordpress.org/support/topic/error-500-version-4-4-1/
-
There has been a critical error on this site.https://wordpress.org/support/topic/there-has-been-a-critical-error-on-this-site-6/
-
E_ERROR in Dompdf.phphttps://wordpress.org/support/topic/e_error-in-dompdf-php/
-
Error: Cannot load system fonthttps://wordpress.org/support/topic/error-cannot-load-system-font/
-
PHP Errorshttps://wordpress.org/support/topic/php-errors-291/
-
Fatal error: Class “DOMDocument” not foundhttps://wordpress.org/support/topic/fatal-error-class-domdocument-not-found-6/
-
Fatal errorhttps://wordpress.org/support/topic/fatal-error-4453/
-
Failure to generate PDFshttps://wordpress.org/support/topic/failure-to-generate-pdfs/
-
Fatal error generating packing slip with PHP 7.4https://wordpress.org/support/topic/fatal-error-generating-packing-slip-with-php-7-4/
-
Fatal error when updating to 2.16.4https://wordpress.org/support/topic/fatal-error-when-updating-to-2-16-4/
-
PHP Warning: Declaration of ADQ_PDFhttps://wordpress.org/support/topic/php-warning-declaration-of-adq_pdf/
-
PHP 8.3https://wordpress.org/support/topic/php-8-3-2/
-
PHP errorhttps://wordpress.org/support/topic/php-error-669/
-
Error when i activate the pluginshttps://wordpress.org/support/topic/error-when-i-activate-the-plugins/
-
Error with latest versionhttps://wordpress.org/support/topic/error-with-latest-version-7/
-
500 error after all troubleshooting steps?https://wordpress.org/support/topic/500-error-after-all-troubleshooting-steps/
-
Deprecated: Implicit conversion from float….https://wordpress.org/support/topic/deprecated-implicit-conversion-from-float-2/
-
unserialize(): Error at offset 119 of 164 byteshttps://wordpress.org/support/topic/unserialize-error-at-offset-119-of-164-bytes/
-
Fatal Error with 4.4.0https://wordpress.org/support/topic/fatal-error-with-4-4-0-2/
-
Fatal error: Typed property DOMDocumenthttps://wordpress.org/support/topic/fatal-error-typed-property-domdocument-2/
-
Can someone help me with this error.https://wordpress.org/support/topic/error-1866/
-
Fatal error: Class ‘DompdfCpdf’ not foundhttps://wordpress.org/support/topic/fatal-error-class-dompdfcpdf-not-found-2/
-
PHP errorhttps://wordpress.org/support/topic/php-error-622/
-
Fatal error.https://wordpress.org/support/topic/fatal-error-4695/