function commerce_cart_commerce_order_item_access in Commerce Core 8.2
Implements hook_ENTITY_TYPE_access().
File
- modules/
cart/ commerce_cart.module, line 133 - Implements the shopping cart system and add to cart features.
Code
function commerce_cart_commerce_order_item_access(OrderItemInterface $order_item, $operation, AccountInterface $account) {
$order = $order_item
->getOrder();
return $order ? _commerce_cart_order_access($order, $operation, $account) : AccessResult::neutral();
}