Not generating pdf
-
Until 27/11/2023, everything was working correctly; since then, the automatic generation of receipts when an order is created is no longer functioning. The settings have not been changed. What could be the issue?
-
This topic was modified 2 years, 3 months ago by
gioboxd.
-
This topic was modified 2 years, 3 months ago by
-
Did you install any plugins that control the emails in WordPress, such as MailPoet, Brevo, etc?
In addition to answering the above question, please follow these steps to find out if the issue occurs before the message is sent:
- Install and activate the WP Mail Logging plugin.
- Open an existent order, find the Send order email panel, on the right side, select one of the email notification in which you attach the invoice, e.g. Complete order, and click on Save order and send email:

- Then go to Tools > WP Mail Log, find your last email & check if there are files in the Attachments column and/or any notice on the Error column:

Let us know your findings
As for email-related plugins, I only have WP Mail SMTP, but I don’t think it’s causing the issue, as before November 27th, it didn’t conflict with your plugin. Additionally, I conducted the test you recommended, and the email was sent without errors, but there is no attachment.
Hi @gioboxd:
You said in your first message “the automatic generation of receipts“, are you referring to the new receipt document included in the Professional extension extension or the PDF invoice instead?
I am referring to the editable document in the documents section of your plugin, which is associated with various WooCommerce emails, such as the one for completed orders
Thanks for the clarification, @gioboxd:
Could you please share a screenshot of the Disabled for setting, that you find under WooCommerce > PDF Invoices > Documents > Invoice?
I got this error sent to me in an email can it help?
Un errore di E_ERROR è stato causato nella linea 39 del file /var/www/vhosts/amorini.it/httpdocs/wp-content/themes/understrap-child/woocommerce/emails/customer-completed-order.php. Messaggio di errore: Uncaught TypeError: date_format(): Argument #1 ($object) must be of type DateTimeInterface, bool given in /var/www/vhosts/amorini.it/httpdocs/wp-content/themes/understrap-child/woocommerce/emails/customer-completed-order.php:39
Stack trace:
#0 /var/www/vhosts/amorini.it/httpdocs/wp-content/themes/understrap-child/woocommerce/emails/customer-completed-order.php(39): date_format()
#1 /var/www/vhosts/amorini.it/httpdocs/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘…’)
#2 /var/www/vhosts/amorini.it/httpdocs/wp-content/plugins/woocommerce/includes/wc-core-functions.php(364): wc_get_template()
#3 /var/www/vhosts/amorini.it/httpdocs/wp-content/plugins/woocommerce/includes/emails/class-wc-email-customer-completed-order.php(109): wc_get_template_html()
#4 /var/www/vhosts/amorini.it/httpdocs/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(588): WC_Email_Customer_Completed_Order->get_content_html()
#5 /var/www/vhosts/amorini.it/httpdocs/wp-content/plugins/woocommerce/includes/emails/class-wc-email-customer-completed-order.php(69): WC_Email->get_content()
#6 /var/www/vhosts/amorini.it/httpdocs/wp-includes/class-wp-hook.php(308): WC_Email_Customer_Completed_Order->trigger()
#7 /var/www/vhosts/amorini.it/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#8 /var/www/vhosts/amorini.it/httpdocs/wp-includes/plugin.php(565): WP_Hook->do_action()
#9 /var/www/vhosts/amorini.it/httpdocs/wp-content/plugins/woocommerce/includes/class-wc-emails.php(170): do_action_ref_array()
#10 /var/www/vhosts/amorini.it/httpdocs/wp-includes/class-wp-hook.php(308): WC_Emails::send_transactional_email()
#11 /var/www/vhosts/amorini.it/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#12 /var/www/vhosts/amorini.it/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
#13 /var/www/vhosts/amorini.it/httpdocs/wp-content/plugins/woocommerce/includes/class-wc-order.php(395): do_action()
#14 /var/www/vhosts/amorini.it/httpdocs/wp-content/plugins/woocommerce/includes/class-wc-order.php(253): WC_Order->status_transition()
#15 /var/www/vhosts/amorini.it/httpdocs/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php(714): WC_Order->save()
#16 /var/www/vhosts/amorini.it/httpdocs/wp-includes/class-wp-hook.php(310): WC_Meta_Box_Order_Data::save()
#17 /var/www/vhosts/amorini.it/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#18 /var/www/vhosts/amorini.it/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
#19 /var/www/vhosts/amorini.it/httpdocs/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-meta-boxes.php(263): do_action()
#20 /var/www/vhosts/amorini.it/httpdocs/wp-includes/class-wp-hook.php(310): WC_Admin_Meta_Boxes->save_meta_boxes()
#21 /var/www/vhosts/amorini.it/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#22 /var/www/vhosts/amorini.it/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
#23 /var/www/vhosts/amorini.it/httpdocs/wp-includes/post.php(4715): do_action()
#24 /var/www/vhosts/amorini.it/httpdocs/wp-includes/post.php(4817): wp_insert_post()
#25 /var/www/vhosts/amorini.it/httpdocs/wp-admin/includes/post.php(439): wp_update_post()
#26 /var/www/vhosts/amorini.it/httpdocs/wp-admin/post.php(227): edit_post()
#27 {main}Also are you referring to this settings?
Also, are you referring to this settings? [screenshots]
That is correct, thanks!
It seems that you are indeed attaching the PDF invoices already. However, the error could be the reason because the invoices are not being created: Maybe the WooCommerce email notifications are failing?
Please temporarily rename the folder
woocommerceunder/themes/understrap-child/towoocommerce-hold, so the custom email templates are not using temporarily, but the default WooCommerce templates. Then, follow these steps to find out if the issue occurs before the message is sent, or it has been producing by your custom email templates:- Install and activate the WP Mail Logging by MailPoet plugin
- Open an existent order, find the Send order email panel, on the right side, select Complete order and click on Save order and send email:

- Then go to Tools > WP Mail Log, find your last email, and check if there are files in the Attachments column, and/or any notice on the Error column:

- Share the results with us 🙂
Hi @gioboxd,
Since we haven’t heard back from you in the last two weeks, we’re assuming you solved this issue, so I’ll go ahead and mark this ticket as Resolved.
Feel free to reply to this topic is you still need help with this, or open a new topic if you have any other questions!
Ciao Yordan,
I have the same exact problem of @gioboxd and pretty much the same configuration:
- Woocommerce: 8.4.0
- PDF Invoices & Packing Slips for WooCommerce: 3.7.5
- WP Mail SMTP: 3.11.0
Correct setting to send the pdf of the Receipt on new orders email.
Standard PDF templates.
Pretty much same timing (do not know the exact day when the PDF stopped working but I can say mid to end November).
Tested with WP Mail Logging plugin, the email was sent without the attachment and without error logs (nothing on the plugin page an nothing sent by email).
Looks like the PDF is not automatically generated, in fact the receipt number is not generated. To generate it I have to press the Create PDF button on the order page. But also with the Receipt number generated the email sent still do not have attachment in it.
It is definitely a problem of sending attachments with the emails, but do not know where to look/investigate.
Any hints?
Thanks
Andrea
Hi, @jeffi:
Could you please create a new topic with your question (copying and pasting the text above)? This way we keep the forum organized and avoid annoying the thread starter user with email notifications unrelated to their query. Please note that yours could be a totally different issue.
I will answer you there! 😉
The topic ‘Not generating pdf’ is closed to new replies.