WC_Product_Download::file_exists
Validate file exists.
Method of the class: WC_Product_Download{}
Hooks from the method
Returns
true|false.
Usage
$WC_Product_Download = new WC_Product_Download(); $WC_Product_Download->file_exists();
WC_Product_Download::file_exists() WC Product Download::file exists code WC 11.0.1
public function file_exists() {
if ( 'relative' !== $this->get_type_of_file_path() ) {
return true;
}
$file_url = $this->get_absolute_file_path( $this->get_file() );
return apply_filters( 'woocommerce_downloadable_file_exists', file_exists( $file_url ), $this->get_file() );
}