woocommerce_downloadable_product_name хук-фильтрWC 1.0

Download name will be 'Product Name' for products with a single downloadable file, and 'Product Name - File X' for products with multiple files.

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

add_filter( 'woocommerce_downloadable_product_name', 'wp_kama_woocommerce_downloadable_product_name_filter', 10, 4 );

/**
 * Function for `woocommerce_downloadable_product_name` filter-hook.
 * 
 * @param  $download_file_name 
 * @param  $product            
 * @param  $download_id        
 * @param  $file_number        
 *
 * @return 
 */
function wp_kama_woocommerce_downloadable_product_name_filter( $download_file_name, $product, $download_id, $file_number ){

	// filter...
	return $download_file_name;
}
$download_file_name
-
$product
-
$download_id
-
$file_number
-

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

wc_get_customer_available_downloads()
woocommerce_downloadable_product_name
woocommerce/includes/wc-user-functions.php 647-653
$download_name = apply_filters(
	'woocommerce_downloadable_product_name',
	$download_file['name'],
	$_product,
	$result->download_id,
	$file_number
);

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

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