|  | @@ 559-567 (lines=9) @@ | 
                                                            
                                    | 556 |  |     $items              = $invoice->get_items(); | 
                                                            
                                    | 557 |  |     $invoice_currency   = $invoice->get_currency(); | 
                                                            
                                    | 558 |  |  | 
                                                            
                                    | 559 |  |     if ( !empty( $items ) && is_array( $items ) ) { | 
                                                            
                                    | 560 |  |         foreach ( $items as $key => $item ) { | 
                                                            
                                    | 561 |  |             $items[$key]['currency'] = $invoice_currency; | 
                                                            
                                    | 562 |  |  | 
                                                            
                                    | 563 |  |             if ( !isset( $cart_item['subtotal'] ) ) { | 
                                                            
                                    | 564 |  |                 $items[$key]['subtotal'] = $items[$key]['amount'] * 1; | 
                                                            
                                    | 565 |  |             } | 
                                                            
                                    | 566 |  |         } | 
                                                            
                                    | 567 |  |     } | 
                                                            
                                    | 568 |  |  | 
                                                            
                                    | 569 |  |     return apply_filters( 'wpinv_get_items', $items, $invoice_id ); | 
                                                            
                                    | 570 |  | } | 
                                                                                
                                |  | @@ 1000-1008 (lines=9) @@ | 
                                                            
                                    | 997 |  |  | 
                                                            
                                    | 998 |  |     $invoice_currency = $invoice->currency; | 
                                                            
                                    | 999 |  |  | 
                                                            
                                    | 1000 |  |     if ( ! empty( $cart_details ) && is_array( $cart_details ) ) { | 
                                                            
                                    | 1001 |  |         foreach ( $cart_details as $key => $cart_item ) { | 
                                                            
                                    | 1002 |  |             $cart_details[ $key ]['currency'] = $invoice_currency; | 
                                                            
                                    | 1003 |  |  | 
                                                            
                                    | 1004 |  |             if ( ! isset( $cart_item['subtotal'] ) ) { | 
                                                            
                                    | 1005 |  |                 $cart_details[ $key ]['subtotal'] = $cart_item['price']; | 
                                                            
                                    | 1006 |  |             } | 
                                                            
                                    | 1007 |  |         } | 
                                                            
                                    | 1008 |  |     } | 
                                                            
                                    | 1009 |  |  | 
                                                            
                                    | 1010 |  |     return apply_filters( 'wpinv_get_cart_details', $cart_details, $invoice_id ); | 
                                                            
                                    | 1011 |  | } |