You are here

public function Subscription::getInitialOrder in Commerce Recurring Framework 8

Gets the initial order.

This is the non-recurring order which started the subscription. Might not be available for manually created subscriptions.

Return value

\Drupal\commerce_order\Entity\OrderInterface|null The initial order, or NULL if not known.

Overrides SubscriptionInterface::getInitialOrder

File

src/Entity/Subscription.php, line 291

Class

Subscription
Defines the subscription entity.

Namespace

Drupal\commerce_recurring\Entity

Code

public function getInitialOrder() {
  return $this
    ->get('initial_order')->entity;
}