Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author algol.plus

    (@algolplus)

    hi

    you can try following code, I’m unsure how must it work for 2+ coupons.
    thanks, Alex

    add_filter('woe_get_order_product_fields', function ($fields,$format) {
    	$fields['product_coupon'] = array( 'label' => 'Product Coupons', 'colname' => 'Product Coupons', 'checked' => 1 );
    	return $fields;
    }, 10, 2);
    
    add_filter('woe_get_order_product_value_product_coupon', function ($value,$order, $item, $product,$item_meta) {
    	return join(",", $order->get_used_coupons());
    }, 10, 5);
    Thread Starter vkcode

    (@vkcode)

    it works, thanks!

    • This reply was modified 6 years, 7 months ago by vkcode.
    Plugin Author algol.plus

    (@algolplus)

    you’re welcome.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Coupon used in order per product’ is closed to new replies.