original_string: 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']);
          }
      }
code: 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']);
          }
      }
code_tokens: 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' ] ) ; } }
docstring: Prepare submitted order components
  @param array $submitted
docstring_tokens: Prepare submitted order components