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();
}
}
?>
.png)