Skip to content

Instantly share code, notes, and snippets.

@tenken
Created April 4, 2019 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tenken/d954fbfd369f503049d0588308fd1e4f to your computer and use it in GitHub Desktop.
Save tenken/d954fbfd369f503049d0588308fd1e4f to your computer and use it in GitHub Desktop.
<?php
// ... adding order items to cart ...
// Protect order from adding new products.
$cartOrder->lock();
$cartOrder->save();
$cartOrder = $this->entityTypeManager->getStorage('commerce_order')->load($cartOrder->id());
$this->redirectToCheckout($cartOrder);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment