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.

Method of the class: DownloadableFileAttachments{}

No Hooks.

Returns

bool.

Usage

// private - for code of main (parent) class only
$result = $this->current_user_can_see_files(): bool;

DownloadableFileAttachments::current_user_can_see_files() code WC 11.3.0

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