public function CommerceCurrencyResolversRefreshTrait::checkOrderOwner in Commerce Currency Resolver 8
Check if order belongs to current user.
Parameters
\Drupal\commerce_order\Entity\OrderInterface $order: Order object.
Return value
bool Return true if this is not order owner.
1 call to CommerceCurrencyResolversRefreshTrait::checkOrderOwner()
- CommerceCurrencyResolversRefreshTrait::shouldCurrencyRefresh in src/
CommerceCurrencyResolversRefreshTrait.php - Get refresh state based on path.
File
- src/
CommerceCurrencyResolversRefreshTrait.php, line 54
Class
- CommerceCurrencyResolversRefreshTrait
- Handle access where currency resolver can refresh order.
Namespace
Drupal\commerce_currency_resolverCode
public function checkOrderOwner(OrderInterface $order) {
return (int) $order
->getCustomerId() !== (int) $this->account
->id();
}