WC_Customer::get_role()publicWC 3.0.0

Return customer's user role.

Метод класса: WC_Customer{}

Хуков нет.

Возвращает

Строку.

Использование

$WC_Customer = new WC_Customer();
$WC_Customer->get_role( $context );
$context(строка)
What the value is for. Valid values are 'view' and 'edit'.
По умолчанию: 'view'

Список изменений

С версии 3.0.0 Введена.

Код WC_Customer::get_role() WC 8.7.0

public function get_role( $context = 'view' ) {
	return $this->get_prop( 'role', $context );
}