• jtg

    (@favdes)


    Hello,

    We are having an issue when on the order page in Woocommerce and then we click on the ‘PDF Packing Slip’ button. We get the following error:

    Fatal error: date_format(): Argument #1 ($object) must be of type DateTimeInterface, bool given/home/lincolnshirepoac/public_html/wp-content/themes/devdmbootstrap3/woocommerce/pdf/Simplelpc/packing-slip.php (74)#0 /home/lincolnshirepoac/public_html/wp-content/themes/devdmbootstrap3/woocommerce/pdf/Simplelpc/packing-slip.php(74): date_format(false, ‘D jS M y’) #1 /home/lincolnshirepoac/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(1213): include(‘/home/lincolnsh…’) #2 /home/lincolnshirepoac/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(1071): WPO\WC\PDF_Invoices\Documents\Order_Document->render_template(‘/home/lincolnsh…’, Array) #3 /home/lincolnshirepoac/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(1026): WPO\WC\PDF_Invoices\Documents\Order_Document->get_html() #4 /home/lincolnshirepoac/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(1093): WPO\WC\PDF_Invoices\Documents\Order_Document->get_pdf() #5 /home/lincolnshirepoac/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-main.php(568): WPO\WC\PDF_Invoices\Documents\Order_Document->output_pdf(‘inline’) #6 /home/lincolnshirepoac/public_html/wp-includes/class-wp-hook.php(324): WPO\WC\PDF_Invoices\Main->generate_document_ajax(”) #7 /home/lincolnshirepoac/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) #8 /home/lincolnshirepoac/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #9 /home/lincolnshirepoac/public_html/wp-admin/admin-ajax.php(192): do_action(‘wp_ajax_generat…’) #10 {main}

    We’re running Woocommerce version 9.1.4?, PDF Invoices & Packing Slips for WooCommerce version 3.8.6 and PHP 8.1.

    Any help would be appreciated.

    Many thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hi @favdes

    You seem to be passing false instead of an object here:

    wp-content/themes/devdmbootstrap3/woocommerce/pdf/Simplelpc/packing-slip.php(74): date_format(false, ‘D jS M y’)
    Thread Starter jtg

    (@favdes)

    Hi Alex,

    Thank you. I’ve tried using a different theme and that seems to work so we’ll have to look at upgrading that I think – the current one is quite old now anyway so it needs doing.

    Thank you for your help.

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