fix call to apply_coupon_fixed_cart_remainder
This commit is contained in:
parent
c7cb46a524
commit
14717d4ebb
|
@ -465,7 +465,7 @@ class WC_Discounts {
|
|||
}
|
||||
|
||||
} elseif ( $amount > 0 ) {
|
||||
$total_discounted = $this->apply_fixed_cart_discount_remainder( $coupon, $items_to_apply, $amount );
|
||||
$total_discounted = $this->apply_coupon_fixed_cart_remainder( $coupon, $items_to_apply, $amount );
|
||||
}
|
||||
return $total_discount;
|
||||
}
|
||||
|
|
|
@ -357,7 +357,7 @@ class WC_Tests_Discounts extends WC_Unit_Test_Case {
|
|||
$discounts->apply_discount( $coupon );
|
||||
}
|
||||
|
||||
$this->assertEquals( $test['expected_total_discount'], array_sum( $discounts->get_discounts() ), 'Test case ' . $test_index . ' failed (' . print_r( $test, true ) . ' - ' . print_r( $discounts->get_discounts(), true ) . ')' );
|
||||
$this->assertEquals( $test['expected_total_discount'], array_sum( $discounts->get_discounts_by_item() ), 'Test case ' . $test_index . ' failed (' . print_r( $test, true ) . ' - ' . print_r( $discounts->get_discounts(), true ) . ')' );
|
||||
|
||||
// Clean.
|
||||
WC()->cart->empty_cart();
|
||||
|
|
Loading…
Reference in New Issue