Hook to show Coupon Code on Invoice
-
I think I am close?
I am trying to show the “coupon code” used underneath the “Cart Discount” amount row on the invoice.
function my_custom_order_fields( $fields, $order ) { $new_fields = array(); if( get_post_meta( $order->id, 'woocommerce_coupon_code', true ) ) { $new_fields['woocommerce_coupon_code'] = array( 'label' => 'Coupon Code 1', 'value' => get_post_meta( $order->id, 'woocommerce_coupon_code', true ) ); } return array_merge( $fields, $new_fields ); } add_filter( 'wcdn_order_info_fields', 'my_custom_order_fields', 10, 2 );
https://www.ads-software.com/plugins/woocommerce-delivery-notes/
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Hook to show Coupon Code on Invoice’ is closed to new replies.