Back to Community

Fixing 'You do not have sufficient permissions' Error for PDF Downloads

Content

If your customers are encountering a “You do not have sufficient permissions to access this page” error when trying to download their PDF invoices or packing slips, you're not alone. This is a common access control issue with a straightforward fix.

Why This Error Happens

By default, the 'PDF Invoices & Packing Slips for WooCommerce' plugin restricts PDF access to logged-in users for security. The error occurs when the system cannot verify a user's permission to view the document, often due to an invalid or missing security token (nonce) or a misconfigured access setting, especially for guest customers who checked out without creating an account.

How to Resolve the Permission Error

Solution 1: Adjust the Document Link Access Setting (Most Common Fix)

The most effective solution is often to change the plugin's access-level setting.

  1. Navigate to WooCommerce > PDF Invoices > Advanced.
  2. Locate the “Document link access type” option.
  3. Change the setting from the default “Connected” to “Full”.
  4. Click “Save changes”.

What this does: The “Full” setting allows anyone with the unique document link to access the PDF, which is essential for guests who cannot log in. The 'Connected' setting requires users to be logged into the same account that placed the order, which is more secure but will cause this error for guest orders.

Solution 2: Enable Guest Access for the Thank You Page

If you want to keep the more secure 'Connected' setting but still serve guest customers, ensure guest access is enabled for the order confirmation (thank you) page.

  1. Go to WooCommerce > PDF Invoices > Documents > Invoice.
  2. Check the box for “Enable on My Account page” and, crucially, “Allow guest access”.
  3. Save your changes.

Solution 3: Clear Caching and Check for Conflicts

If the error persists after changing settings:

  • Clear Caches: Clear any server, WordPress, or browser caches. A cached version of the page might be serving an old, expired link.
  • Check for Plugin Conflicts: Temporarily deactivate other plugins one by one to see if a conflict is causing the issue. Pay particular attention to security, caching, or admin customization plugins.

Important Considerations

  • Security: Using the “Full” access setting is less secure than “Connected” because it relies solely on the secrecy of the long, unique URL. However, for most stores, this is an acceptable level of risk for customer convenience.
  • REST API Access: If you are a developer trying to fetch invoice URLs via the REST API, you will need to use custom code to handle the access key. The threads indicate this is possible but requires specific implementation beyond basic settings.

By following these steps, you should be able to resolve the permissions error and ensure your customers can reliably access their important order documents.

Related Support Threads Support