Add coupon description
-
I am using the following snippet
//Add used coupons to PDFs
add_action( ‘wpo_wcpdf_after_order_details’, ‘wpo_wcpdf_coupons_used’, 10, 2 );
function wpo_wcpdf_coupons_used ($template_type, $order) {
if( $used_coupons = $order->get_used_coupons() ) {
$coupons_list = implode(‘, ‘, $used_coupons);
echo ‘<h4>’ . __(‘Coupons used’) . ‘</h4>’;
echo ‘<p>’ . $coupons_list . ‘</p>’;
}
}This applied the coupon code to the invoice (which works great). Is there a way to get it to add the coupon description instead of or in addition to the coupon code?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Add coupon description’ is closed to new replies.