Hi @mollernina,
Currently, it is not possible to show the discount code in the invoice but we have created some modification in our plugin code to achieve your requirement.
For that, you will need to replace the below code on line number 196 to 208 in the print-content.php file of our WooCommerce Print Invoice & Delivery Note plugin.
Path: woocommerce-delivery-notes/templates/print-order/print-content.php
Code to replace:
<?php if( $totals = $order->get_order_item_totals() ) :
$code = $order->get_used_coupons();
?>
<?php
foreach( $totals as $total ) : ?>
<tr>
<?php if( $total['label'] == 'Discount' ) { ?>
<td class="total-name"><span><?php echo $code[0] ?></span></td>
<?php
}else { ?>
<td class="total-name"><span><?php echo $total['label']; ?></span></td>
<?php
}
?>
<td class="total-item-price"></td>
<td class="total-quantity"></td>
<td class="total-price"><span><?php echo $total['value']; ?></span></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
Attaching the screenshot for your reference: https://www.screencast.com/t/AtlSoMyQSH
Once you have replaced the above code at the mentioned place, please check and let us know whether the discount code is displaying in the invoice/delivery note/receipt or not.
Let us know the result and if you have any questions.
Regards,
Priyanka Jagtap