I need to get the invoice number and put it into the other plugin’s part. For example I have the DHL plugin and I need to put the invoice number to the printable sticker.
I used this code as a basis:
$invoice = wcpdf_get_invoice( (array) $order->get_id(), true );
$invoice_number = $invoice->get_number();
$plain_invoice_number = $invoice_number->get_plain();
But it seems it’s only work inside emails’ templates.
The developer of the DHL Shipping Germany for WooCommerce plugin, gave me this snippet to solve my case:
add_filter('pr_shipping_dhl_label_args', 'modify_order_id_to_number', 10, 2);
function modify_order_id_to_number( $args, $order_id ) {
if ( function_exists( 'wcpdf_get_invoice' ) ) {
$invoice = wcpdf_get_invoice( $order_id, true );
$invoice_number = $invoice->get_number();
$plain_invoice_number = $invoice_number->get_plain();
$args['dhl_settings']['dhl_label_ref'] = $plain_invoice_number;
}
return $args;
}
But it doesn’t work.
Please help me to embed the invoice number into the DHL label.
]]>Thanks!
]]>When last week (so in 2024) I marked as “Completed” a payment of some WooCommerce orders of 2023, the system automatically updated the number of the invoices to 2024 in the system, and sent a confirmation to the client with the new number and the new invoice (generated via the PDF Invoice module).
So -example- the invoice number 23177 became 24177.
Now I find myself with wrong invoice numbers in the system and an annoyed customer!
Not sure this is due to WooCommerce orders or to the PDF Invoice module, but in either case:
Thank you very much.
]]>I found strange behaviour. Orders opened in year 2023 and completed in 2024 (that’s the moment the invoice is generated) have the right number, but wrong year. And yes, in the settings in prefix is used shortcode [order_year].
Let me explain: Order #1234 was created on 28.12.2023 and paid, sent a invoiced generated on 2.1.2024. The correct number of the invoice should be 20240001, but the generated number was 20230001.
(As fix we manually changed the numbers in database (it was two invoices, so no big deal) and regenerated invoices, so it’s ok now on our site.)
Could you please look at it?
Thank you!
Jitka
]]>We have been using this plugin for quite some years, amongst others to give incoming orders invoice numbers. Recently, we noticed that the search function in Woocommerce does not provide results anymore when searching for an invoice number. It does still work for Woocommerce’s own order number, but just not for the invoice numbers anymore. Does anyone know more about this?
]]>your plugin seem’s very good.
I have a problem when I generate html or PDF from the list of orders invoice number on generated file is too big for one thousand.
Example: Order id is #7033, generated Invoice number is INV-8033
How can I fix this.
Best regards,
Simon
When I import orders using your plugin, the orders somehow don’t get Invoice Numbers generated like typical orders.
Is this plugin compatible with WooCommerce PDF Invoices & Packing Slips by WP Overnight?
Thanks.
]]>For some subscriptions in which the payment is €0,00 the invoice number is not created anymore, while my settings are put in such way that this should happen. The strange thing is that it happens only sometimes.
The plugin tells me that my memory is too little. However, there are two types of memory you display: WordPress and PHP. My WordPress memory is only 40 while the PHP is sufficient (define(‘WP_MEMORY_LIMIT’, ‘256M’ );). I asked my hosting party how I could adjust the WordPress memory but they told me this should be the same as the ‘PHP’ memory. I’m using Antagonist. How can I adjust the WordPress memory? More important how can I make sure the €0,00 payment orders do get an invoice number too?
]]>