Automattic\WooCommerce\Internal\ProductDownloads

DownloadableFileAttachments::current_user_can_see_files │ private │ WC 1.0

Check whether the current user may see downloadable product file URLs.

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

Хуков нет.

Возвращает

bool.

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

// private - только в коде основоного (родительского) класса
$result = $this->current_user_can_see_files(): bool;

Код DownloadableFileAttachments::current_user_can_see_files() WC 11.3.0

private function current_user_can_see_files(): bool {
	return current_user_can( 'upload_files' ) || current_user_can( 'manage_woocommerce' );
}