/** * Check whether we need to create new customer (for another website) during order creation * * @param \Magento\Store\Model\Store $store * @return bool */ protected function _customerIsInStore($store) { $customerId = (int) $this->getSession()->getCustomerId(); $customerData = $this->_customerAccountService->getCustomer($customerId); return $customerData->getWebsiteId() == $store->getWebsiteId() || $this->_customerAccountService->isCustomerInStore($customerData->getWebsiteId(), $store->getId()); }