WC_Product::has_file( string $download_id = '' )
Check if downloadable product has a file attached.
Description Description
Parameters Parameters
- $download_id
-
(string) (Optional) file identifier.
Default value: ''
Return Return
(bool) Whether downloadable product has a file attached.
Source Source
File: includes/abstracts/abstract-wc-product.php
public function has_file( $download_id = '' ) { return $this->is_downloadable() && $this->get_file( $download_id ); }
Changelog Changelog
Version | Description |
---|---|
1.6.2 | Introduced. |