Merge pull request #13647 from woocommerce/fix-13635
Use correct getter in legacy API for get_discount
This commit is contained in:
commit
725c153d0c
|
@ -224,7 +224,7 @@ class WC_API_Orders extends WC_API_Resource {
|
|||
$order_data['coupon_lines'][] = array(
|
||||
'id' => $coupon_item_id,
|
||||
'code' => $coupon_item->get_code(),
|
||||
'amount' => wc_format_decimal( $coupon_item->get_discount_total(), 2 ),
|
||||
'amount' => wc_format_decimal( $coupon_item->get_discount(), 2 ),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -275,7 +275,7 @@ class WC_API_Orders extends WC_API_Resource {
|
|||
$order_data['coupon_lines'][] = array(
|
||||
'id' => $coupon_item_id,
|
||||
'code' => $coupon_item->get_code(),
|
||||
'amount' => wc_format_decimal( $coupon_item->get_discount_total(), $dp ),
|
||||
'amount' => wc_format_decimal( $coupon_item->get_discount(), $dp ),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -302,7 +302,7 @@ class WC_API_Orders extends WC_API_Resource {
|
|||
$coupon_line = array(
|
||||
'id' => $coupon_item_id,
|
||||
'code' => $coupon_item->get_code(),
|
||||
'amount' => wc_format_decimal( $coupon_item->get_discount_total(), $dp ),
|
||||
'amount' => wc_format_decimal( $coupon_item->get_discount(), $dp ),
|
||||
);
|
||||
|
||||
if ( in_array( 'coupons', $expand ) ) {
|
||||
|
|
Loading…
Reference in New Issue