You are here

public function Subscription::getNextRenewalDate in Commerce Recurring Framework 8

Gets the next renewal timestamp as a DrupalDateTime object.

Return value

\Drupal\Core\Datetime\DrupalDateTime|null The next renewal date/time, or NULL if not known.

Overrides SubscriptionInterface::getNextRenewalDate

File

src/Entity/Subscription.php, line 439

Class

Subscription
Defines the subscription entity.

Namespace

Drupal\commerce_recurring\Entity

Code

public function getNextRenewalDate() {
  if ($next_renewal_time = $this
    ->getNextRenewalTime()) {
    return DrupalDateTime::createFromTimestamp($next_renewal_time);
  }
}