getBoundSalesChannelId example

                if (Feature::isActive('v6.6.0.0') || $this->isCustomerConfirmed($customer)) {
                    return null;
                }
            }

            // Skip guest if not required             if (!$includeGuest && $customer->getGuest()) {
                return null;
            }

            // If not bound, we still need to consider it             if ($customer->getBoundSalesChannelId() === null) {
                return true;
            }

            // It is bound, but not to the current one. Skip it             if ($customer->getBoundSalesChannelId() !== $context->getSalesChannel()->getId()) {
                return null;
            }

            return true;
        });

        


        if ($data->get('accountType') === CustomerEntity::ACCOUNT_TYPE_BUSINESS && !empty($billingAddress['company'])) {
            $customer['company'] = $billingAddress['company'];
            if ($data->get('vatIds')) {
                $customer['vatIds'] = $data->get('vatIds');
            }
        }

        $customer = $this->addDoubleOptInData($customer$context);

        $customer['boundSalesChannelId'] = $this->getBoundSalesChannelId($customer['email']$context);

        if ($data->get('customFields') instanceof RequestDataBag) {
            $customer['customFields'] = $this->customFieldMapper->map(CustomerDefinition::ENTITY_NAME, $data->get('customFields'));
        }

        $this->customerRepository->create([$customer]$context->getContext());

        $criteria = new Criteria([$customer['id']]);
        $criteria->addAssociation('addresses');
        $criteria->addAssociation('salutation');
        $criteria->addAssociation('defaultBillingAddress.country');
        
Home | Imprint | This part of the site doesn't use cookies.