Document pretty link incompatibility with Plain permalinks structure

Table of Contents

Path: WooCommerce > PDF Invoices > Advanced > Settings > Pretty document links.

If the Pretty document links setting is active, the WordPress permalinks should not be set to ‘Plain‘ at Settings > Permalinks.

If ‘Plain‘ is selected, a 404 error or a silent error may occur – redirecting to the wrong page – when trying to download or view a PDF.

Result – as a redirection to a wrong page:

Technical explanation #

When Plain permalink structure is used, WordPress does not use .htaccess or rewrite rules. Therefore, endpoints like wcpdf/invoice/... that are mapped by rewrite rules won’t work anymore, since WordPress doesn’t know how to route them.