VirtueMart

WooCommerce

Others

Docs

Support

Demo

Blog

About

Ordernumbers for WooCommerce

We are currently unable to provide proper support!

For the last few months we have been very busy working on some huge, very time-consuming and time-sensitive projects, so our support was very limited and we were unable to provide proper support in our forums! We now have a huge backlog of requests from our customers, which we are trying to clear bit by bit. Unfortunately, this takes longer than we anticipated, so our response time is not yet up to par. We are trying our best to improve this situation as soon as possible.

Sorry for the inconvenience and thank you for your understanding!

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: checkbox in options to customize invoice number

checkbox in options to customize invoice number 25 Feb 2017 22:43 #1

  • Digital Multimedia
  • Digital Multimedia's Avatar Topic Author
  • Offline
  • Posts: 1
checkbox in options to customize invoice number is not used anywhere in the code

'customize_invoice'
¿?¿?

As it is not used it can not be used to disable the plugin hook "WooCommerce PDF Invoices & Packing Slips": wpo_wcpdf_invoice_number
If (! Has_filter ('wpo_wcpdf_invoice_number')) {
Add_filter ('wpo_wcpdf_invoice_number', array ($ this, 'format_invoice_number'), 20, 4);
}

And then the original "WooCommerce PDF Invoices & Packing Slips" plugin does not work.

Please add this code (IF) or similar in ordernumbers_woocommerce.php on line 76
// Support for specific plugins:
If (get_option ('customize_invoice', 'no') === 'yes') {  //<< this line
$ This-> thirdparty_wpo_wcpdf_init ();
$ This-> thirdparty_wt_wc_pdf_invoice_init ();
$ This-> thirdparty_bewpi_invoices_init ();
$ This-> thirdparty_yith_pdf_invoice_init ();
$ This-> thirdparty_wc_delivery_notes_init ();
} // << this line
// END THIRD-PARTY PLUGIN SUPPORT

Please Log in or Create an account to join the conversation.

checkbox in options to customize invoice number 04 Mar 2017 18:46 #2

Hello,
Thanks for noticing this issue. In fact, we added wrappers around almost all code, but apparently forgot the wrapper in the thirdparty_get_invoicenumber function. Here is the new code, which we'll release shortly (we'll have to fix another bug with the WC PDF Invoices and Packaging slips plugin):
	function thirdparty_get_invoicenumber($default, $orderid) {
		if ($this->invoicenumbers_activated()) {
			$_of = new WC_Order_Factory();
			$order = $_of->get_order($orderid);
			$number = $this->get_or_create_number($orderid, $order, 'invoice');
			return $number;
		} else {
			return $default;
		}
	}

The next release should have that issue fixed.

Best regards,
Reinhold

Please Log in or Create an account to join the conversation.

  • Page:
  • 1