| @@ 681-687 (lines=7) @@ | ||
| 678 | ); |
|
| 679 | } |
|
| 680 | ||
| 681 | if ( WC()->cart->needs_shipping() ) { |
|
| 682 | $items[] = array( |
|
| 683 | 'type' => 'final', |
|
| 684 | 'label' => __( 'Shipping', 'woocommerce-gateway-stripe' ), |
|
| 685 | 'amount' => $shipping, |
|
| 686 | ); |
|
| 687 | } |
|
| 688 | ||
| 689 | if ( WC()->cart->has_discount() ) { |
|
| 690 | $items[] = array( |
|
| @@ 689-695 (lines=7) @@ | ||
| 686 | ); |
|
| 687 | } |
|
| 688 | ||
| 689 | if ( WC()->cart->has_discount() ) { |
|
| 690 | $items[] = array( |
|
| 691 | 'type' => 'final', |
|
| 692 | 'label' => __( 'Discount', 'woocommerce-gateway-stripe' ), |
|
| 693 | 'amount' => '-' . $discounts, |
|
| 694 | ); |
|
| 695 | } |
|
| 696 | ||
| 697 | return $items; |
|
| 698 | } |
|