You are here

public function CheckoutFlowBase::__wakeup in Commerce Core 8.2

Overrides DependencySerializationTrait::__wakeup

File

modules/checkout/src/Plugin/Commerce/CheckoutFlow/CheckoutFlowBase.php, line 131

Class

CheckoutFlowBase
Provides the base checkout flow class.

Namespace

Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow

Code

public function __wakeup() {
  parent::__wakeup();
  if (!empty($this->_parentEntityId)) {
    $checkout_flow_storage = $this->entityTypeManager
      ->getStorage('commerce_checkout_flow');
    $this->parentEntity = $checkout_flow_storage
      ->load($this->_parentEntityId);
    unset($this->_parentEntityId);
  }
  if (!empty($this->_orderId)) {
    $order_storage = $this->entityTypeManager
      ->getStorage('commerce_order');
    $this->order = $order_storage
      ->load($this->_orderId);
    unset($this->_orderId);
  }
}