Store coupon id, not coupon item id in the stat table.

This commit is contained in:
Peter Fabian 2018-11-27 16:18:42 +01:00
parent 942db641e8
commit 8dbcbfc6cb
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ function wc_order_coupon_lookup_entry( $order_id ) {
$wpdb->prefix . 'wc_order_coupon_lookup',
array(
'order_id' => $order_id,
'coupon_id' => $coupon_item->get_id(),
'coupon_id' => wc_get_coupon_id_by_code( $coupon_item->get_code() ),
'coupon_gross_discount' => $coupon_item->get_discount(),
'date_created' => date( 'Y-m-d H:i:s', $order->get_date_created( 'edit' )->getTimestamp() ),
),