Hi @yordansoares,
I think I am having the same issue, as it arised after upgrading to version 3.6.3. When generating an invoice I get the following error (some data has been anonymized):
Fatal error: Call to a member function custom_field() on null
/usr/home/example.com/web/wp-content/themes/storefront child/functions.php (34)
0 /usr/home/example.com/web/wp-includes/class-wp-hook.php(312): incluir_nif_en_factura(‘ANONYMOUS…’)
1 /usr/home/example.com/web/wp-includes/plugin.php(205): WP_Hook->apply_filters(‘ANONYMOUS…’, Array)
2 /usr/home/example.com/web/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document-methods.php(93): apply_filters(‘wpo_wcpdf_billi…’, ‘ANONYMOUS…’, Object(WPO\WC\PDF_Invoices\Documents\Invoice))
3 /usr/home/example.com/web/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document-methods.php(102): WPO\WC\PDF_Invoices\Documents\Order_Document_Methods->get_billing_address()
4 /usr/home/example.com/web/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/templates/Simple/invoice.php(42): WPO\WC\PDF_Invoices\Documents\Order_Document_Methods->billing_address()
5 /usr/home/example.com/web/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(976): include(‘/usr/home/example…’)
6 /usr/home/example.com/web/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(‘/usr/home/example…’, Array)
7 /usr/home/example.com/web/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()
8 /usr/home/example.com/web/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()
9 /usr/home/example.com/web/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-main.php(466): WPO\WC\PDF_Invoices\Documents\Order_Document->output_pdf(‘inline’)
10 /usr/home/example.com/web/wp-includes/class-wp-hook.php(310): WPO\WC\PDF_Invoices\Main->generate_pdf_ajax(”)
11 /usr/home/example.com/web/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(”, Array)
12 /usr/home/example.com/web/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
13 /usr/home/example.com/web/wp-admin/admin-ajax.php(188): do_action(‘wp_ajax_generat…’)
14 {main}
I am not a programmer and I can’t determine if your solution also applies in this case.
Many thanks in advance.