You are here

public function SubscriptionTypeInterface::onSubscriptionActivate in Commerce Recurring Framework 8

Acts on a subscription after it has been activated.

If a trial just ended, $subscription->getTrialEndTime() will be non-empty and $subscription->getOrders() will have a single order (the trial order).

Called before the subscription and recurring order are saved.

Parameters

\Drupal\commerce_recurring\Entity\SubscriptionInterface $subscription: The subscription.

\Drupal\commerce_order\Entity\OrderInterface $order: The recurring order.

1 method overrides SubscriptionTypeInterface::onSubscriptionActivate()
SubscriptionTypeBase::onSubscriptionActivate in src/Plugin/Commerce/SubscriptionType/SubscriptionTypeBase.php
Acts on a subscription after it has been activated.

File

src/Plugin/Commerce/SubscriptionType/SubscriptionTypeInterface.php, line 113

Class

SubscriptionTypeInterface
Defines the interface for subscription types.

Namespace

Drupal\commerce_recurring\Plugin\Commerce\SubscriptionType

Code

public function onSubscriptionActivate(SubscriptionInterface $subscription, OrderInterface $order);