0

I would like to know in which class and function can I get my client ID, the same bank saved ID as entity_id

I would like to echo my script so that I can manipulate it for other functions later.

This ID is from the connected client.

enter image description here

enter image description here

Magento 2.3.3 windows xampp composer installation

1 Answer 1

0

class Client {

protected $customerSession;


public function __construct(
    \Magento\Customer\Model\Session $customerSession,
    array $data = []
) {

    $this->customerSession = $customerSession;
}
public function getID(){
    return $this->customerSession->getCustomer()->getId();
}

}

Resolved that way, echo $this->test->getID();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.