did you try to use setGroupId() method on the customer model object?
/** @var \Magento\Customer\Api\Data\CustomerInterface $customer */ $customer->setGroupId($someCustomerGroupId); /** @var \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository */ $customerRepository->save($customer);
Cheers,
BX
did you try to use setGroupId() method on the customer model object?
/** @var \Magento\Customer\Api\Data\CustomerInterface $customer */ $customer->setGroupId($someCustomerGroupId); /** @var \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository */ $customerRepository->save($customer);
Cheers,
BX
Yeah I did this , $this->session->getCustomer()->setGroupId("5")->save(); and it worked , thanks