Hi @emmaswl
We will check if it is possible to do via customization.
Could you please let us know whether you’re using the default WooCommerce coupon functionality or a third-party plugin to generate the coupon codes?
Looking forward for your reply.
Hi there, I am using both but primarily I need it to show the default WooCommerce coupons
Thanks,
Emma
Hi @emmaswl
Thank you for the information.
You can use the below filter to show the coupon code in delivery notes:
add_filter( 'wcdn_order_info_fields', function( $fields, $order ) {
$coupons = $order->get_coupon_codes();
if ( ! empty( $coupons ) ) {
$fields['coupon_code'] = array(
'label' => __( 'Coupon', 'woocommerce-delivery-notes' ),
'value' => implode( ', ', $coupons ),
);
}
return $fields;
}, 10, 2 );
Please add this filter in your theme’s function.php file or via Code Snippets plugin.
Let us know if there are any further issues.