public function CheckoutEventSubscriber::onCheckoutCompletion in Commerce Core 8.2
Creates a log when the customer completes checkout.
Parameters
\Drupal\commerce_order\Event\OrderEvent $event: The order event.
File
- modules/
log/ src/ EventSubscriber/ CheckoutEventSubscriber.php, line 44
Class
Namespace
Drupal\commerce_log\EventSubscriberCode
public function onCheckoutCompletion(OrderEvent $event) {
$order = $event
->getOrder();
$this->logStorage
->generate($order, 'checkout_complete')
->save();
}