Back to Community

Troubleshooting Common PDF Invoices & Packing Slips Plugin Errors

Content

Encountering errors with the 'PDF Invoices & Packing Slips for WooCommerce' plugin can be frustrating, especially when it disrupts your order management workflow. Based on common issues reported by users, this guide outlines the most frequent problems and their solutions to help you get back on track quickly.

1. 404 Error When Generating PDFs

Problem: Clicking the PDF Invoice or Packing Slip button in an order results in a 404 'Page Not Found' error.

Why it happens: This is often caused by a conflict with the 'Pretty Links' setting or a missing database table required for invoice numbering.

Solution:

  • Navigate to WooCommerce > PDF Invoices > Advanced.
  • Disable the 'Use pretty URLs for document links' setting.
  • If the issue persists, try setting the 'Next invoice number' under WooCommerce > PDF Invoices > Documents > Invoice to force the creation of the necessary database table.

2. Critical Error: Call to a member function get_id() on null/bool

Problem: A critical PHP error appears, often on the admin order screen, preventing PDF generation and sometimes breaking other page elements. The error message typically includes Call to a member function get_id() on null or ...on bool.

Why it happens: This usually indicates a conflict where the plugin is trying to access an order object that is not valid or doesn't exist. This can be triggered by other plugins, theme code, or specific server environments.

Solution:

  • Check for conflicts: Temporarily deactivate all other plugins except WooCommerce and PDF Invoices. Switch to a default WordPress theme (like Storefront). If the error disappears, reactivate your plugins and theme one by one to identify the culprit.
  • Review error logs: Check the WooCommerce logs under WooCommerce > Status > Logs for files prefixed with 'wpo-wcpdf' or 'fatal-errors'. These logs often contain more detailed information about the conflict.
  • Ensure compatibility: Make sure your WooCommerce, WordPress, and plugin versions are all up to date, as these errors are often patched in newer releases.

3. Deprecated Function Warnings

Problem: Your WooCommerce logs are filled with notices about deprecated functions, such as The method invoice_number() is deprecated.

Why it happens: The plugin developers update code and mark old functions as deprecated. While these are just notices and don't break functionality, they can clutter logs.

Solution:

  • This is typically a notification, not a functional error. The 'PDF Invoices & Packing Slips for WooCommerce' team addresses these deprecations in subsequent updates.
  • Ensure you are running the latest version of the plugin, as updates often remove these deprecated calls.
  • If you are using a custom template or an extension, check that they have also been updated to use the new function names (e.g., number() instead of invoice_number()).

4. PDF Generation Fails with a 503 Error

Problem: The browser shows a '503 Service Unavailable' error when trying to generate or preview a PDF.

Why it happens: This is frequently a server-level issue related to PHP processing or resource limits.

Solution:

  • Update PHP: Upgrade your site's PHP version to 8.2 or higher. This has been confirmed to resolve the 503 error for many users.
  • Increase memory limit: A very low WordPress memory limit (e.g., 40MB) can cause failures. Contact your hosting provider to increase the WP memory limit to 128MB or 256MB.

5. Buttons or Data Missing from Admin Orders

Problem: The PDF document buttons are missing from the WooCommerce order screen, or the PDF document data panel is blank.

Why it happens: This can occur if the plugin's files were not properly updated or installed, or due to a conflict with the new WordPress HPOS (High-Performance Order Storage) feature.

Solution:

  • Reinstall the plugin: Manually reinstall the plugin to ensure all files are intact. Download the latest version from the WordPress plugin repository, deactivate and delete your current version (your settings are safe in the database), and then install the uploaded ZIP file.
  • Check HPOS compatibility: Ensure that both WooCommerce and the PDF Invoices plugin are fully updated to versions that are compatible with HPOS. You can find this setting under WooCommerce > Settings > Advanced > Features.

General Troubleshooting Tips

  • Always check logs: The first step for any error should be to check the WooCommerce logs under WooCommerce > Status > Logs. Look for relevant error messages.
  • Keep everything updated: Many issues are resolved by simply ensuring WordPress, WooCommerce, the PDF Invoices plugin, and your theme are all running their latest versions.
  • Test for conflicts: A systematic approach to deactivating other plugins and switching themes is the most reliable way to identify the source of a conflict.

By following these steps, you can resolve the majority of common issues encountered with the 'PDF Invoices & Packing Slips for WooCommerce' plugin. If your specific issue isn't listed here, checking the plugin's support forums may provide additional insights from other users.

Related Support Threads Support