public function SubscriptionTypeBase::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.
Overrides SubscriptionTypeInterface::onSubscriptionActivate
File
- src/
Plugin/ Commerce/ SubscriptionType/ SubscriptionTypeBase.php, line 226
Class
- SubscriptionTypeBase
- Defines the subscription base class.
Namespace
Drupal\commerce_recurring\Plugin\Commerce\SubscriptionTypeCode
public function onSubscriptionActivate(SubscriptionInterface $subscription, OrderInterface $order) {
}