protected function prepareSubmittedOrderComponentsCheckout(array &$submitted)
    {
        foreach ($submitted['data']['components'] as $id => &$component) {

            if (!isset($component['price'])) {
                continue;
            }

            if (empty($component['price'])) {
                unset($submitted['data']['components'][$id]);
                continue;
            }

            $component['currency'] = $submitted['currency'];
            $component['price'] = $this->price->amount($component['price'], $submitted['currency']);
        }
    }
protected function prepareSubmittedOrderComponentsCheckout(array &$submitted)
    {
        foreach ($submitted['data']['components'] as $id => &$component) {

            if (!isset($component['price'])) {
                continue;
            }

            if (empty($component['price'])) {
                unset($submitted['data']['components'][$id]);
                continue;
            }

            $component['currency'] = $submitted['currency'];
            $component['price'] = $this->price->amount($component['price'], $submitted['currency']);
        }
    }
protected function prepareSubmittedOrderComponentsCheckout ( array & $ submitted ) { foreach ( $ submitted [ 'data' ] [ 'components' ] as $ id => & $ component ) { if ( ! isset ( $ component [ 'price' ] ) ) { continue ; } if ( empty ( $ component [ 'price' ] ) ) { unset ( $ submitted [ 'data' ] [ 'components' ] [ $ id ] ) ; continue ; } $ component [ 'currency' ] = $ submitted [ 'currency' ] ; $ component [ 'price' ] = $ this -> price -> amount ( $ component [ 'price' ] , $ submitted [ 'currency' ] ) ; } }
Prepare submitted order components
@param array $submitted
Prepare submitted order components