• Resolved alistairmckenzie

    (@alistairmckenzie)


    Hi I am getting the following on the Invoice pdf

    Fatal error: Call to a member function get_header_logo_id() on null/home/lipmate/public_html/wp-content/themes/lipmate/woocommerce/pdf/lipmate/invoice.php (9)#0 /home/lipmate/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(976): include() #1 /home/lipmate/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(879): WPO\WC\PDF_Invoices\Documents\Order_Document->render_template(‘/home/lipmate/p…’, Array) #2 /home/lipmate/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(834): WPO\WC\PDF_Invoices\Documents\Order_Document->get_html() #3 /home/lipmate/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(901): WPO\WC\PDF_Invoices\Documents\Order_Document->get_pdf() #4 /home/lipmate/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-main.php(466): WPO\WC\PDF_Invoices\Documents\Order_Document->output_pdf(‘inline’) #5 /home/lipmate/public_html/wp-includes/class-wp-hook.php(310): WPO\WC\PDF_Invoices\Main->generate_pdf_ajax(”) #6 /home/lipmate/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(”, Array) #7 /home/lipmate/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #8 /home/lipmate/public_html/wp-admin/admin-ajax.php(188): do_action(‘wp_ajax_generat…’) #9 {main}

    Any help greatly appreciated, I have disabaled all plugins except woocommerce and PDF Invoices & Packing Slips for WooCommerce but still the same

Viewing 1 replies (of 1 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @alistairmckenzie,

    It seems that your custom PDF template is using deprecated code that we started removing on latest version. Actually, these legacy code is very old, but we kept them for long time in order to provide support to old WooCommerce versions as long as possible. However, since WooCommerce started bumping the minimal requirements, we chose to follow the same approach.

    At this point, you could do the following:

    1. Switching to our default Simple template, and try to apply your customizations using the PDF template action hooks and PDF template filter hooks. We can try to help you on this, if you provide us with the customizations details.
    2. Updating the code of your custom PDF template.

    If you choose the second option from the above, follow these steps to update your template:

    1. Replace the whole code within the?html-document-wrapper.php?file with the updated code you will find?here.
    2. Open the invoice.php file, and do the following:
    • Replace the first line with this one:
      <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
    • Replace every concurrence of $wpo_wcpdf with $this
    • Replace every concurrence of?'wpo_wcpdf'?with?'woocommerce-pdf-invoices-packing-slips': This is the text domain which is needed in order for translations to work.
    • If need it, repeat the steps of the 2nd point for the packing slip too.
Viewing 1 replies (of 1 total)
  • The topic ‘200: parsererror’ is closed to new replies.