woocommerce_download_parse_file_path
Filter the filepath for download.
Usage
add_filter( 'woocommerce_download_parse_file_path', 'wp_kama_woocommerce_download_parse_file_path_filter', 10, 2 ); /** * Function for `woocommerce_download_parse_file_path` filter-hook. * * @param string $file_path File path. * @param bool $remote_file Remote File Indicator. * * @return string */ function wp_kama_woocommerce_download_parse_file_path_filter( $file_path, $remote_file ){ // filter... return $file_path; }
- $file_path(string)
- File path.
- $remote_file(true|false)
- Remote File Indicator.
Changelog
Since 6.5.0 | Introduced. |
Where the hook is called
woocommerce_download_parse_file_path
woocommerce/includes/class-wc-download-handler.php 328
'file_path' => apply_filters( 'woocommerce_download_parse_file_path', $file_path, $remote_file ),