|
@@ 858-864 (lines=7) @@
|
| 855 |
|
$item_total = wc_format_decimal( WC()->cart->cart_contents_total, $decimals ) + $discounts; |
| 856 |
|
$order_total = wc_format_decimal( $item_total + $tax + $shipping, $decimals ); |
| 857 |
|
|
| 858 |
|
if ( wc_tax_enabled() ) { |
| 859 |
|
$items[] = array( |
| 860 |
|
'type' => 'final', |
| 861 |
|
'label' => esc_html( __( 'Tax', 'woocommerce-gateway-stripe' ) ), |
| 862 |
|
'amount' => $tax, |
| 863 |
|
); |
| 864 |
|
} |
| 865 |
|
|
| 866 |
|
if ( WC()->cart->needs_shipping() && $this->is_shipping_enabled ) { |
| 867 |
|
$items[] = array( |
|
@@ 874-880 (lines=7) @@
|
| 871 |
|
); |
| 872 |
|
} |
| 873 |
|
|
| 874 |
|
if ( WC()->cart->has_discount() ) { |
| 875 |
|
$items[] = array( |
| 876 |
|
'type' => 'final', |
| 877 |
|
'label' => esc_html( __( 'Discount', 'woocommerce-gateway-stripe' ) ), |
| 878 |
|
'amount' => '-' . $discounts, |
| 879 |
|
); |
| 880 |
|
} |
| 881 |
|
|
| 882 |
|
return $items; |
| 883 |
|
} |