public function stateId(array $condition, array $data, $key)
    {
        // Check form fields
        if (isset($data['data']['address']['state_id'])) {
            $state_id = $data['data']['address']['state_id'];
            return $this->compare($state_id, $condition['value'], $condition['operator']);
        }

        if (!isset($data['data']['order'][$key])) {
            return false;
        }

        $address = $this->address->get($data['data']['order'][$key]);

        if (empty($address['state_id'])) {
            return false;
        }

        return $this->compare($address['state_id'], $condition['value'], $condition['operator']);
    }