@ole_wilkenburg
I included the following code in print-invoice.php file located in my-theme-name/woocommerce/print (this path is in case that you keep your woocommerce template files away from the plugins folder. if not so you will lose any changes of the file upon plugin’s update) And I’m using woocommerce-delivery-notes plugin so the file above belongs to this plugin.
<li>
<h3 class="invoice-number-label"><?php _e( 'Invoice Number', 'option-tree' ); ?></h3>
<span class="invoice-number">
<?php
$invoice_number2="your-prefix_";
echo $invoice_number2;
$invoice_number=wcdn_order_number();
?>
</span>
</li>
Please tell me if you have any issues with this.
@gabriel Reguly
I checked your code and presume that the correct way to get an invoice number of an order is by:
$invoice_number = get_post_meta( $post_id, '_invoice_number', true );
But i haven’t tested it yet.