How can I get customer group name by using group id in a template (phtml
file) ?
Magento2 Customer Group – How to Get Customer Group Name by Using Group ID
customercustomer-groupmagento2template
customercustomer-groupmagento2template
How can I get customer group name by using group id in a template (phtml
file) ?
Best Answer
If you have group id then add below code at your block class
At last in phtml file you will get group name by:
If you want to get group name by group id at phtml using Object manager and donot want edit block class then you can use below code at
phtml
But direct use of Object manager is not good idea,So best idea to add code at block class.