woocommerce_download_parse_file_path
Filter the filepath for download.
Использование
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(строка)
- File path.
- $remote_file(true|false)
- Remote File Indicator.
Список изменений
С версии 6.5.0 | Введена. |
Где вызывается хук
woocommerce_download_parse_file_path
woocommerce/includes/class-wc-download-handler.php 340
'file_path' => apply_filters( 'woocommerce_download_parse_file_path', $file_path, $remote_file ),