woocommerce_downloadable_file_exists

woocommerce_downloadable_file_exists

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_downloadable_file_exists') is found 1 times:

  • /includes/class-wc-product-download.php line 188
    			$file_url = realpath( ABSPATH . $file_url );
    		} elseif ( substr( WP_CONTENT_DIR, strlen( untrailingslashit( ABSPATH ) ) ) === substr( $file_url, 0, strlen( substr( WP_CONTENT_DIR, strlen( untrailingslashit( ABSPATH ) ) ) ) ) ) {
    			$file_url = realpath( WP_CONTENT_DIR . substr( $file_url, 11 ) );
    		}
    		return apply_filters( 'woocommerce_downloadable_file_exists', file_exists( $file_url ), $this->get_file() );
    	}
    
    	/**
    	 * Confirms that the download exists within an approved directory.
    	 *
    	 * If it is not within an approved directory but the current user has sufficient