WC_Product::has_file( string $download_id = '' )

Check if downloadable product has a file attached.


Description Description


Parameters Parameters

$download_id

(Optional) file identifier.

Default value: ''


Top ↑

Return Return

(bool) Whether downloadable product has a file attached.


Top ↑

Source Source

File: includes/abstracts/abstract-wc-product.php

	public function has_file( $download_id = '' ) {
		return $this->is_downloadable() && $this->get_file( $download_id );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.6.2 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.