public function Order::getCustomerId in Commerce Core 8.2
Gets the customer user ID.
Return value
int The customer user ID ('0' if anonymous).
Overrides OrderInterface::getCustomerId
1 call to Order::getCustomerId()
- Order::preSave in modules/
order/ src/ Entity/ Order.php - Acts on an entity before the presave hook is invoked.
File
- modules/
order/ src/ Entity/ Order.php, line 183
Class
- Order
- Defines the order entity class.
Namespace
Drupal\commerce_order\EntityCode
public function getCustomerId() {
return $this
->get('uid')->target_id;
}