How to Get Current Customer Full Details in Magento2 - magento source24

 

How to Get Customer Full Details in Magento2 - magento source24

In this blog post i'm share with you to How to Get Current Customer Full Details in Magento2 - magento source24


In this method i'm using customerSession using Class Magento\Customer\Model\Session 



<?php

namespace Vendor_Name\Module_Name\Block;

class Example

{

private $customerSession;

public function __construct(

\Magento\Customer\Model\Session $customerSession

) {

$this->customerSession = $customerSession;

}

public function getCurrentCustomer()

{

return $this->customerSession->getCustomer();

}

}

?>

Deepak Kumar Bind

Success is peace of mind, which is a direct result of self-satisfaction in knowing you made the effort to become the best of which you are capable.

Post a Comment

If you liked this post please do not forget to leave a comment. Thanks

Previous Post Next Post