@@ -141,19 +141,19 @@ discard block |
||
141 | 141 | |
142 | 142 | // Format decimal values. |
143 | 143 | foreach ( $format_decimal as $key ) { |
144 | - $data[ $key ] = wc_format_decimal( $data[ $key ], $this->request['dp'] ); |
|
144 | + $data[$key] = wc_format_decimal( $data[$key], $this->request['dp'] ); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | // Format date values. |
148 | 148 | foreach ( $format_date as $key ) { |
149 | - $datetime = $data[ $key ]; |
|
150 | - $data[ $key ] = wc_rest_prepare_date_response( $datetime, false ); |
|
151 | - $data[ $key . '_gmt' ] = wc_rest_prepare_date_response( $datetime ); |
|
149 | + $datetime = $data[$key]; |
|
150 | + $data[$key] = wc_rest_prepare_date_response( $datetime, false ); |
|
151 | + $data[$key . '_gmt'] = wc_rest_prepare_date_response( $datetime ); |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | // Format line items. |
155 | 155 | foreach ( $format_line_items as $key ) { |
156 | - $data[ $key ] = array_values( array_map( array( $this, 'get_order_item_data' ), $data[ $key ] ) ); |
|
156 | + $data[$key] = array_values( array_map( array( $this, 'get_order_item_data' ), $data[$key] ) ); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | return array( |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | $line_tax = array(); |
295 | 295 | |
296 | 296 | foreach ( $item_line_taxes['total'] as $tax_rate_id => $tax ) { |
297 | - $line_tax[ $tax_rate_id ] = array( |
|
297 | + $line_tax[$tax_rate_id] = array( |
|
298 | 298 | 'id' => $tax_rate_id, |
299 | 299 | 'total' => $tax, |
300 | 300 | 'subtotal' => '', |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | } |
303 | 303 | |
304 | 304 | foreach ( $item_line_taxes['subtotal'] as $tax_rate_id => $tax ) { |
305 | - $line_tax[ $tax_rate_id ]['subtotal'] = $tax; |
|
305 | + $line_tax[$tax_rate_id]['subtotal'] = $tax; |
|
306 | 306 | } |
307 | 307 | |
308 | 308 | $line_item['taxes'] = array_values( $line_tax ); |