How to check company registration is allowed from the store front B2B Magento 2?

Company Module in B2B Magento 2 allowed to create a registration for the company user from the storefront in Magneto 2.

Its store configuration setting to enable or disable storefront registration. By default, the B2B module allowed to create a registration from the frontend.

Go To admin panel,
Stores -> Configuration -> Company Configuration -> Allow Company Registration from the Storefront -> Yes/No.

You can check it also using the programmatic way with the use of StatusServiceInterface.

Call method to identify status,
echo $isCompanyActive = $this->isCompanyModuleActive();

If Output is 1, Company module is enable to work with B2B in Magento 2.

Output:
Boolean

Leave a Reply