• Resolved annaika

    (@annaika)


    Hi!

    I get the following fatal error when trying to send the pdf.-Invoices/Custom docs by eMail since updating to the newest version from 3.0.1.

    Fatal error: Uncaught Error: Call to a member function get_id() on null in /home/***/wp-content/plugins/woocommerce-jetpack/includes/functions/wcj-order-functions.php:44 Stack trace: #0 /home/***/wp-content/plugins/woocommerce-jetpack/includes/pdf-invoices/submodules/class-wcj-pdf-invoicing-emails.php(64): wcj_get_order_id(NULL) #1 /home/***/wp-includes/class-wp-hook.php(298): WCJ_PDF_Invoicing_Emails->add_pdf_invoice_email_attachment(Array, ‘wcj_custom_1’, NULL) #2 /home/***/wp-includes/plugin.php(203): WP_Hook->apply_filters(Array, Array) #3 /home/***/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(340): apply_filters(‘woocommerce_ema…’, Array, ‘wcj_custom_1’, NULL) #4 /home/***/wp-content/plugins/woocommerce-jetpack/includes/emails/class-wc-email-wcj-custom.php(160): WC_Email->get_attachments() #5 /home/dr951hob/www/home/o in /home/***/wp-content/plugins/woocommerce-jetpack/includes/functions/wcj-order-functions.php on line 44

    Please help!
    Thanks a lot, Annaika

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @annaika,

    Not really sure it’s because of the previous version – it seems that we didn’t make any changes in functions pointed in your error log. Anyway, we’ve just added additional checks, so this should be fixed – please update to v3.1.1 and let me know if it’s ok now.

    Best regards,
    Tom

    Thread Starter annaika

    (@annaika)

    @algoritmika

    Hi Tom!
    Thank you for your quick help!
    The eMails are sent now, but without the .pdf-Document.
    How can I attach it again?

    Thanks a lot!
    Annaika

    Hi @annaika,

    From the error you posted earlier, I saw that there is no order available when attaching invoice, so what I did is – I’ve added some additional checks, so in case when there is no order available, plugin doesn’t try to attach invoice and just skips corresponding code. This way we are securing ourselves from getting the error, but as there is no order available, no invoice can be attached (i.e. if there is no order, then there is no way to know which invoice exactly should be attached). To be honest, I’m not really sure why there is no order available when trying to attach the document. To figure this out I would need to know more info about your server, e.g. which additional WooCommerce related plugins do you have installed etc. So could you please contact me on [email protected] for further support?

    Best regards,
    Tom

    Even on our shop after the last update there were NO pdfs attached to the custom admin emails. customers emails are still with pdf. really strange.

    back to version 3.0.2-dev everything works fine.

    Hi @ricclazz,

    Thanks for reporting – I will check that as soon as possible.

    Best regards,
    Tom

    Hi again,

    Yes, I can confirm – it seems that PDFs are not being attached to custom emails. Fixing it right now…

    Best regards,
    Tom

    Hi @annaika, @ricclazz,

    I’ve finally found the bug I’ve made in v3.1.0. It’s fixed now – PDFs are attached in custom emails as it should. If you wish to check it out, the development version is here – https://booster.io/dev/. If you are a Booster Plus user – please contact me on [email protected] and I will send you Plus dev version.

    Sorry it took so long.

    Best regards,
    Tom

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Fatal error after upgrade’ is closed to new replies.