| @@ 750-756 (lines=7) @@ | ||
| 747 | ); |
|
| 748 | } |
|
| 749 | ||
| 750 | if ( WC()->cart->needs_shipping() ) { |
|
| 751 | $items[] = array( |
|
| 752 | 'type' => 'final', |
|
| 753 | 'label' => __( 'Shipping', 'woocommerce-gateway-stripe' ), |
|
| 754 | 'amount' => $shipping, |
|
| 755 | ); |
|
| 756 | } |
|
| 757 | ||
| 758 | if ( WC()->cart->has_discount() ) { |
|
| 759 | $items[] = array( |
|
| @@ 758-764 (lines=7) @@ | ||
| 755 | ); |
|
| 756 | } |
|
| 757 | ||
| 758 | if ( WC()->cart->has_discount() ) { |
|
| 759 | $items[] = array( |
|
| 760 | 'type' => 'final', |
|
| 761 | 'label' => __( 'Discount', 'woocommerce-gateway-stripe' ), |
|
| 762 | 'amount' => '-' . $discounts, |
|
| 763 | ); |
|
| 764 | } |
|
| 765 | ||
| 766 | return $items; |
|
| 767 | } |
|