Store coupon id, not coupon item id in the stat table.
This commit is contained in:
parent
942db641e8
commit
8dbcbfc6cb
|
@ -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() ),
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue