@@ 565-571 (lines=7) @@ | ||
562 | $invoice_currency = $invoice->get_currency(); |
|
563 | ||
564 | if ( !empty( $items ) && is_array( $items ) ) { |
|
565 | foreach ( $items as $key => $item ) { |
|
566 | $items[$key]['currency'] = $invoice_currency; |
|
567 | ||
568 | if ( !isset( $cart_item['subtotal'] ) ) { |
|
569 | $items[$key]['subtotal'] = $items[$key]['amount'] * 1; |
|
570 | } |
|
571 | } |
|
572 | } |
|
573 | ||
574 | return apply_filters( 'wpinv_get_items', $items, $invoice_id ); |
|
@@ 1012-1018 (lines=7) @@ | ||
1009 | if ( ! empty( $cart_details ) && is_array( $cart_details ) ) { |
|
1010 | $invoice_currency = ! empty( $invoice->currency ) ? $invoice->currency : wpinv_get_default_country(); |
|
1011 | ||
1012 | foreach ( $cart_details as $key => $cart_item ) { |
|
1013 | $cart_details[ $key ]['currency'] = $invoice_currency; |
|
1014 | ||
1015 | if ( ! isset( $cart_item['subtotal'] ) ) { |
|
1016 | $cart_details[ $key ]['subtotal'] = $cart_item['price']; |
|
1017 | } |
|
1018 | } |
|
1019 | } |
|
1020 | ||
1021 | return apply_filters( 'wpinv_get_cart_details', $cart_details, $invoice_id ); |