• Resolved alexmigf

    (@alexmigf)


    Hi team,

    I’m experiencing a compatibility issue between the Weglot plugin and the WooCommerce PDF Invoices & Packing Slips plugin when using the Dompdf engine. Problem:

    When Weglot is active and a user accesses the invoice PDF from the My Account page in a non-default language, the generated PDF is completely blank. The same invoice renders correctly in the default language or when Weglot is disabled. Debugging so far:

    • Disabling Weglot resolves the issue immediately.
    • Commenting out the following lines in bootstrap.php of the Weglot plugin also fixes it:
    // '\WeglotWP\Third\Woocommercepdf\Wcpdf_Active',
    // '\WeglotWP\Third\Woocommercepdf\WCPDF_Weglot',
    • However, commenting out the actual translate_pdf() logic inside those classes has no effect — the PDF still renders blank.
    • I enabled Dompdf debugging (debugCss, debugLayout, logOutputFile) — the logs indicate no layout is processed at all.
    • The HTML being passed to Dompdf is valid and works fine when Weglot is inactive.
    • This behavior occurs only when accessing the PDF from My Account in a translated language. From the admin area or default language, the PDF renders as expected.

    It appears the presence of the Weglot integration classes alone — even without actively modifying the PDF content — disrupts Dompdf rendering when language is switched from the site default. Possibly due to output buffering, encoding, or unexpected side-effects in filters.

    Would appreciate your insight or a recommended fix/workaround.

    Thanks in advance!

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

The topic ‘WCPDF output blank PDF when Weglot plugin is active’ is closed to new replies.