Hi @calamars
In that case, you will have to make some changes in the plugin files for now.
1. Go to line no 251 in ‘woocommerce-delivery-notes/includes/wcdn-template-functions.php’ file. You will find this condition –
if( wcdn_get_template_type() == ‘invoice:’ ) {
Remove the colon from the string ‘invoice:’. Change it to – if( wcdn_get_template_type() == ‘invoice’ ) {
2. Go to line 501 in ‘woocommerce-delivery-notes/includes/class-wcdn-print.php’ file. You will find this statement –
$meta_added = add_post_meta( $order_id, $meta_key, time(), true );
Change it to –
$meta_added = update_post_meta( $order_id, $meta_key, time() );
This will add a row which shows the Invoice date information as shown in the below screenshot.
Screenshot: http://i.prntscr.com/69ZAkxcNTTK4VlZ_1ALppQ.png
We will add this same change in the next update of our plugin so that you can update it in the future.
Please let me know if you have any further question.
Regards,
Kartik Parmar
Hi kartikparmar, thanks for your help and apologize for the delay in the response.
I have not tried your solution, I have added this line to print-content.php in line 25 and is working for me:
<?php $invoice_date = wcdn_get_order_invoice_date( $post_id ); ?>
<h2><?php _e( ‘Invoice date: ‘, ‘woocommerce-delivery-notes’ ); ?> <?php echo $invoice_date; ?></h2>
Your solution seems to be more complete than mine and I apreciate the change in the plugin update.
Best regards,
Hi @calamars,
It’s great that your solution is also working fine. We will surely include the fix for this in the next update of our plugin. If you face any issue with it then please try adding the solution which we have mentioned above.
Let us know if you have any questions.
Regards,
Priyanka Jagtap
Hi priyankajagtap,
Has been added the fix in the last versión of your plugin?
Best regards,
Hi @calamars,
Yet, we have not released an update of our Print invoice plugin with the fix provided to you. However soon, we will release an update of our plugin with the fix and will inform you about the same.
If you have any questions or face any issue then please let us know.
Regards,
Priyanka Jagtap