Notice: Only variables should be assigned by reference in /var/www/clients/client4/web20/web/templates/shape5_vertex/vertex/responsive/responsive_mobile_sidebar.php on line 8

Notice: Only variables should be assigned by reference in /var/www/clients/client4/web20/web/templates/shape5_vertex/vertex/responsive/responsive_mobile_menu.php on line 278

VirtueMart

WooCommerce

Others

Docs

Support

Demo

Blog

About

Forum
Welcome, Guest
Username: Password: Remember me

TOPIC: checkbox in options to customize invoice number

checkbox in options to customize invoice number 25 Feb 2017 22:43 #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
The administrator has disabled public write access.

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
The administrator has disabled public write access.

VM - Shopping cart

 x 

Cart empty

Login Formular