Handler/CustomerGroupHandler.php
public function checkCustomerHasGroup(Customer $customer, $groupCode)
    {
        $group = CustomerCustomerGroupQuery::create()
            ->filterByCustomer($customer)
            ->useCustomerGroupQuery()
            ->filterByCode($groupCode)
            ->endUse()
            ->findOne();

        return $group !== null;
    }
public function checkCustomerHasGroup(Customer $customer, $groupCode)
    {
        $group = CustomerCustomerGroupQuery::create()
            ->filterByCustomer($customer)
            ->useCustomerGroupQuery()
            ->filterByCode($groupCode)
            ->endUse()
            ->findOne();

        return $group !== null;
    }
public function checkCustomerHasGroup ( Customer $ customer , $ groupCode ) { $ group = CustomerCustomerGroupQuery :: create ( ) -> filterByCustomer ( $ customer ) -> useCustomerGroupQuery ( ) -> filterByCode ( $ groupCode ) -> endUse ( ) -> findOne ( ) ; return $ group !== null ; }
Check that a customer belongs to a group.

@param Customer $customer
@param string $groupCode

@return bool
Check that a customer belongs to a group .