• Resolved dbock

    (@dbock)


    Hi,

    the plugin does not create the invoices automatically anymore. It did it a few times after first installation, but then it stopped – but I have no idea what happend inbetween. I still can create the invoices manually on the order page (and send them to the customer).

    I found a critical error log in the Woocommerce Status Logs (wpo-wcpdf): 2019-08-14T13:52:36+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null

    I already switched to the default theme – problem still exists.

    General Information about the site:
    – PHP Memory Limit = 256
    – Status page of the plugin shows that everything is okay
    – I am using the default Simple PDF Template
    – Configured the plugin, so that the PDF Invoice is attached to the booking confirmation (from Woocommerce Bookings)
    – Switched back to the default email templates from Woocommerce and Woocommerce Bookings
    – WP + Plugins (WooCommerce, WooCommerce Bookings, Germanized for WooCommerce, Woocommerce Bookings Dropdown, WooCommerce PDF Invoices & Packing Slips, Yoast SEO and a few more, which shouldn’t be related to the problem) up to date
    – WooCommerce mails are working as expected

    Any idea what causes the problem?

    Thanks in advance & best regards,
    David

    • This topic was modified 5 years, 3 months ago by dbock.

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Could you share the full error with us of the error “Call to a member function get_formatted_billing_address() on null”? If we know which file line number we may be able to backtrace what the plugin is trying to do that triggers this issue. I have a hunch it may be related to Bookings…

    Thread Starter dbock

    (@dbock)

    Here is the full log:

    2019-08-14T10:54:49+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T10:58:21+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T11:01:02+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T11:01:02+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T11:02:56+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T11:05:50+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T11:06:47+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T11:09:26+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T11:10:51+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T11:11:05+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T11:11:05+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T11:20:57+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T11:24:15+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T11:32:56+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T11:33:47+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T13:49:47+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T13:49:47+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T13:52:36+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T14:06:42+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T14:08:34+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    2019-08-14T14:09:09+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null

    I got two more of them (with diff. timestamps). But none of them includes any other information..

    Plugin Contributor Ewout

    (@pomegranate)

    Ah that’s too bad, usually it refers to a specific PHP file and line number, without that it’s quite difficult to find the source of the issue. Do you have access to the PHP error logs? If so, this may contain more information.

    Two other things you could try:

    • Turn off Germanized and try to send the email
    • Try to send a non-bookings email

    Let us know what you find!

    Thread Starter dbock

    (@dbock)

    PHP error logs contains the following:

    2019-08-07 14:09:42 Error 80.110.113.219 AH01071: Got error ‘okings-dropdown.php on line 138\n’, referer: https://animont.wunu.dev/produkt-kategorie/rock/fuehrung_alpinklettern/ Apache-Fehler

    2019-08-07 14:09:42 Error 80.110.113.219 AH01071: Got error ‘line 138\n’, referer: https://animont.wunu.dev/produkt-kategorie/rock/fuehrung_alpinklettern/ Apache-Fehler

    I deactivated Germanized – PDF still not created.
    There are only bookings available on this site. So a non-booking email is not possible.

    • This reply was modified 5 years, 3 months ago by dbock.
    Plugin Contributor Ewout

    (@pomegranate)

    I think thats a different error log (may be an apache log rather than the PHP log?), and the date is also different (august 7th).

    Thread Starter dbock

    (@dbock)

    Sorry, my mistake.

    The PHP Log file shows no errors, only warnings and notices.

    Any idea what causes the problem?

    Best regards,
    David

    Plugin Contributor Ewout

    (@pomegranate)

    Hi David,
    I think there’s an alternative method to get the full stacktrace, with the help of a small filter:

    
    add_filter('wcpdf_log_stacktrace','__return_true');
    

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

    After activating this snippet and triggering the error again, you should hopefully see more information in the error log. Can you let us know what you find?

    Thanks!

    Thread Starter dbock

    (@dbock)

    Hi,

    I activated the filter, and got some PHP Warnings and Notices related to the woo-bookings-dropdown plugin while booking a tour.
    To be sure, I deactivated the plugin, and booked a new tour – no PHP warnings or errors anymore but the PDF is still not created automatically.

    When I remember correctly, I installed another PDF Plugin (WooCommerce PDF Invoices) somewhen inbetween for testing purposes. Any possibility, that this causes the problem somehow?

    Thanks for your support!

    Plugin Contributor Ewout

    (@pomegranate)

    I don’t think the other PDF plugin would be responsible for this particular error (not withing the context of creating the PDF for this plugin, that is). What’s the stack trace for that Call to a member function get_formatted_billing_address() on null error in the Woocommerce Status Logs (wpo-wcpdf) now?

    Thread Starter dbock

    (@dbock)

    The complete wpo-wcpdf Status log from today:

    2019-08-16T07:03:53+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    #0 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document-methods.php(122): WPO\WC\PDF_Invoices\Documents\Order_Document_Methods->get_billing_address()
    #1 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/templates/Simple/invoice.php(33): WPO\WC\PDF_Invoices\Documents\Order_Document_Methods->billing_address()
    #2 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(728): include(‘/var/www/vhosts…’)
    #3 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(632): WPO\WC\PDF_Invoices\Documents\Order_Document->render_template(‘/var/www/vhosts…’, Array)
    #4 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(614): WPO\WC\PDF_Invoices\Documents\Order_Document->get_html()
    #5 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-main.php(139): WPO\WC\PDF_Invoices\Documents\Order_Document->get_pdf()
    #6 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/class-wp-hook.php(286): WPO\WC\PDF_Invoices\Main->attach_pdf_to_email(Array, ‘booking_confirm…’, Object(WC_Order), Object(WC_Email_Booking_Confirmed))
    #7 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/plugin.php(208): WP_Hook->apply_filters(Array, Array)
    #8 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(429): apply_filters(‘woocommerce_ema…’, Array, ‘booking_confirm…’, Object(WC_Booking), Object(WC_Email_Booking_Confirmed))
    #9 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-bookings/includes/emails/class-wc-email-booking-confirmed.php(126): WC_Email->get_attachments()
    #10 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/class-wp-hook.php(286): WC_Email_Booking_Confirmed->trigger(1752)
    #11 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array)
    #12 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/plugin.php(531): WP_Hook->do_action(Array)
    #13 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce/includes/class-wc-emails.php(166): do_action_ref_array(‘woocommerce_boo…’, Array)
    #14 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/class-wp-hook.php(286): WC_Emails::send_transactional_email(Array)
    #15 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #16 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
    #17 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-bookings/includes/class-wc-booking-email-manager.php(112): do_action(‘woocommerce_boo…’, 1752)
    #18 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/class-wp-hook.php(286): WC_Booking_Email_Manager->trigger_confirmation_email(”)
    #19 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #20 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
    #21 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-settings.php(525): do_action(‘init’)
    #22 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-config.php(84): require_once(‘/var/www/vhosts…’)
    #23 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-load.php(37): require_once(‘/var/www/vhosts…’)
    #24 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-blog-header.php(13): require_once(‘/var/www/vhosts…’)
    #25 /var/www/vhosts/wunu.dev/animont.wunu.dev/index.php(17): require(‘/var/www/vhosts…’)
    #26 {main}
    2019-08-16T07:11:39+00:00 CRITICAL Call to a member function get_formatted_billing_address() on null
    #0 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document-methods.php(122): WPO\WC\PDF_Invoices\Documents\Order_Document_Methods->get_billing_address()
    #1 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/templates/Simple/invoice.php(33): WPO\WC\PDF_Invoices\Documents\Order_Document_Methods->billing_address()
    #2 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(728): include(‘/var/www/vhosts…’)
    #3 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(632): WPO\WC\PDF_Invoices\Documents\Order_Document->render_template(‘/var/www/vhosts…’, Array)
    #4 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(614): WPO\WC\PDF_Invoices\Documents\Order_Document->get_html()
    #5 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-main.php(139): WPO\WC\PDF_Invoices\Documents\Order_Document->get_pdf()
    #6 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/class-wp-hook.php(286): WPO\WC\PDF_Invoices\Main->attach_pdf_to_email(Array, ‘booking_confirm…’, Object(WC_Order), Object(WC_Email_Booking_Confirmed))
    #7 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/plugin.php(208): WP_Hook->apply_filters(Array, Array)
    #8 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(429): apply_filters(‘woocommerce_ema…’, Array, ‘booking_confirm…’, Object(WC_Booking), Object(WC_Email_Booking_Confirmed))
    #9 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-bookings/includes/emails/class-wc-email-booking-confirmed.php(126): WC_Email->get_attachments()
    #10 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/class-wp-hook.php(286): WC_Email_Booking_Confirmed->trigger(1754)
    #11 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array)
    #12 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/plugin.php(531): WP_Hook->do_action(Array)
    #13 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce/includes/class-wc-emails.php(166): do_action_ref_array(‘woocommerce_boo…’, Array)
    #14 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/class-wp-hook.php(286): WC_Emails::send_transactional_email(Array)
    #15 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #16 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
    #17 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-content/plugins/woocommerce-bookings/includes/class-wc-booking-email-manager.php(112): do_action(‘woocommerce_boo…’, 1754)
    #18 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/class-wp-hook.php(286): WC_Booking_Email_Manager->trigger_confirmation_email(”)
    #19 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #20 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
    #21 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-settings.php(525): do_action(‘init’)
    #22 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-config.php(84): require_once(‘/var/www/vhosts…’)
    #23 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-load.php(37): require_once(‘/var/www/vhosts…’)
    #24 /var/www/vhosts/wunu.dev/animont.wunu.dev/wp-blog-header.php(13): require_once(‘/var/www/vhosts…’)
    #25 /var/www/vhosts/wunu.dev/animont.wunu.dev/index.php(17): require(‘/var/www/vhosts…’)
    #26 {main}

    Plugin Contributor Ewout

    (@pomegranate)

    Thanks! I think I have found the root cause now, it’s indeed related to Bookings. I’ll do my best to provide a fix for you later today (this will require some code updates).

    Plugin Contributor Ewout

    (@pomegranate)

    Can you try this version (remove the current plugin version first) to see if that resolves the issue? https://we.tl/t-HnC8teZu1n

    Thread Starter dbock

    (@dbock)

    I did a quick test, and the PDF was created & sent automatically now. Furthermore, there are no new error logs related to your plugins.

    I will do a in-depth testing next week and will come back to you.

    Anyway, thanks a lot for your great support and the quick solution.

    I’ll leave you a review right now.

    Best regards,
    David

    Plugin Contributor Ewout

    (@pomegranate)

    Thanks David! I think that should resolve the issue then. I’ll include this fix in the next official release too. Happy selling!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘PDF Invoices are not created automatically’ is closed to new replies.