original_string: protected function setFormDataAfterCheckout()
      {
          if (empty($this->data_cart)) {
              return null;
          }
  
          $this->data_form['cart'] = $this->data_cart;
  
          $this->setFormDataAddressCheckout();
  
          if (empty($this->data_form['addresses'])) {
              $this->show_shipping_address_form = true;
          }
  
          $this->data_form['default_payment_method'] = false;
          $this->data_form['default_shipping_method'] = false;
          $this->data_form['same_payment_address'] = $this->same_payment_address;
          $this->data_form['get_payment_methods'] = $this->isPosted('get_payment_methods');
          $this->data_form['get_shipping_methods'] = $this->isPosted('get_shipping_methods');
          $this->data_form['show_login_form'] = $this->show_login_form;
          $this->data_form['show_payment_address_form'] = $this->show_payment_address_form;
          $this->data_form['show_shipping_address_form'] = $this->show_shipping_address_form;
          $this->data_form['show_payment_methods'] = !$this->data_form['has_dynamic_payment_methods'];
          $this->data_form['show_shipping_methods'] = !$this->data_form['has_dynamic_shipping_methods'];
  
          $submitted = array('order' => $this->getSubmitted());
  
          $this->data_form['context_templates'] = array(
              'payment' => $this->getPaymentMethodTemplate('context', $submitted['order'], $this->payment),
              'shipping' => $this->getShippingMethodTemplate('context', $submitted['order'], $this->shipping),
          );
  
          $this->data_form = gplcart_array_merge($this->data_form, $submitted);
  
          $this->setFormDataRequestServicesCheckout('payment');
          $this->setFormDataRequestServicesCheckout('shipping');
          $this->setFormDataCalculatedCheckout();
          $this->setFormDataPanesCheckout();
      }
code: protected function setFormDataAfterCheckout()
      {
          if (empty($this->data_cart)) {
              return null;
          }
  
          $this->data_form['cart'] = $this->data_cart;
  
          $this->setFormDataAddressCheckout();
  
          if (empty($this->data_form['addresses'])) {
              $this->show_shipping_address_form = true;
          }
  
          $this->data_form['default_payment_method'] = false;
          $this->data_form['default_shipping_method'] = false;
          $this->data_form['same_payment_address'] = $this->same_payment_address;
          $this->data_form['get_payment_methods'] = $this->isPosted('get_payment_methods');
          $this->data_form['get_shipping_methods'] = $this->isPosted('get_shipping_methods');
          $this->data_form['show_login_form'] = $this->show_login_form;
          $this->data_form['show_payment_address_form'] = $this->show_payment_address_form;
          $this->data_form['show_shipping_address_form'] = $this->show_shipping_address_form;
          $this->data_form['show_payment_methods'] = !$this->data_form['has_dynamic_payment_methods'];
          $this->data_form['show_shipping_methods'] = !$this->data_form['has_dynamic_shipping_methods'];
  
          $submitted = array('order' => $this->getSubmitted());
  
          $this->data_form['context_templates'] = array(
              'payment' => $this->getPaymentMethodTemplate('context', $submitted['order'], $this->payment),
              'shipping' => $this->getShippingMethodTemplate('context', $submitted['order'], $this->shipping),
          );
  
          $this->data_form = gplcart_array_merge($this->data_form, $submitted);
  
          $this->setFormDataRequestServicesCheckout('payment');
          $this->setFormDataRequestServicesCheckout('shipping');
          $this->setFormDataCalculatedCheckout();
          $this->setFormDataPanesCheckout();
      }
code_tokens: protected function setFormDataAfterCheckout ( ) { if ( empty ( $ this -> data_cart ) ) { return null ; } $ this -> data_form [ 'cart' ] = $ this -> data_cart ; $ this -> setFormDataAddressCheckout ( ) ; if ( empty ( $ this -> data_form [ 'addresses' ] ) ) { $ this -> show_shipping_address_form = true ; } $ this -> data_form [ 'default_payment_method' ] = false ; $ this -> data_form [ 'default_shipping_method' ] = false ; $ this -> data_form [ 'same_payment_address' ] = $ this -> same_payment_address ; $ this -> data_form [ 'get_payment_methods' ] = $ this -> isPosted ( 'get_payment_methods' ) ; $ this -> data_form [ 'get_shipping_methods' ] = $ this -> isPosted ( 'get_shipping_methods' ) ; $ this -> data_form [ 'show_login_form' ] = $ this -> show_login_form ; $ this -> data_form [ 'show_payment_address_form' ] = $ this -> show_payment_address_form ; $ this -> data_form [ 'show_shipping_address_form' ] = $ this -> show_shipping_address_form ; $ this -> data_form [ 'show_payment_methods' ] = ! $ this -> data_form [ 'has_dynamic_payment_methods' ] ; $ this -> data_form [ 'show_shipping_methods' ] = ! $ this -> data_form [ 'has_dynamic_shipping_methods' ] ; $ submitted = array ( 'order' => $ this -> getSubmitted ( ) ) ; $ this -> data_form [ 'context_templates' ] = array ( 'payment' => $ this -> getPaymentMethodTemplate ( 'context' , $ submitted [ 'order' ] , $ this -> payment ) , 'shipping' => $ this -> getShippingMethodTemplate ( 'context' , $ submitted [ 'order' ] , $ this -> shipping ) , ) ; $ this -> data_form = gplcart_array_merge ( $ this -> data_form , $ submitted ) ; $ this -> setFormDataRequestServicesCheckout ( 'payment' ) ; $ this -> setFormDataRequestServicesCheckout ( 'shipping' ) ; $ this -> setFormDataCalculatedCheckout ( ) ; $ this -> setFormDataPanesCheckout ( ) ; }
docstring: Prepares the form data before passing to the templates
docstring_tokens: Prepares the form data before passing to the templates