• 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 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @alexmigf ,

    hope you’re fine? Sorry for the issue you’re facing. I’ll check it on my side and get you in touch.

    To be sure to reproduce your issue i can follow this steps :
    1- install woocommerce and WooCommerce PDF Invoices & Packing Slips
    2- generate an order
    3- try to get the invoice in an other language not the original ?

    May you can reach your issue to [email protected] and mention me and/or this message.

    Regards

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    hi @alexmigf ,

    ok i’ve identify the issue on my side, a fix is coming, tha,ks for your help. I’ll send you a patch version of the plugin when the issue is fixed

    regards

    Thread Starter alexmigf

    (@alexmigf)

    Hi @glx77

    Sorry for the delay in getting back to you. I’m glad you were able to replicate the issue and implement a fix. Thank you for the hard work!

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    re @alexmigf ,

    can you try this plugin : https://we.tl/t-EpEM1SUk4m and confirm it’s fixed ?

    the fix would be in the futur release so you can fell free to update your plugin when it comes 😉

    Regards

    Thread Starter alexmigf

    (@alexmigf)

    Hi @glx77

    I’ve confirmed that it’s working. Is it safe to share this plugin with the customer who reported the issue to us?

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    yes sure, this version i’ll send you is the same version of the actual 4.3.2 with only one fix. And this fix would be include on our next version 😉

    If you appreciated my help and if you have 2 minutes to help me, it would be awesome if you could give us a review on WordPress
    —-> https://wordpress.org/support/plugin/weglot/reviews/
    It’s really useful for me 

    And of course, if you need anything, don’t hesitate to ask me.

    Regards

    Thread Starter alexmigf

    (@alexmigf)

    Done.

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.