woocommerce_download_parse_file_path хук-фильтрWC 6.5.0

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 Введена.

Где вызывается хук

WC_Download_Handler::parse_file_path()
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 ),

Где используется хук в WooCommerce

Использование не найдено.