woocommerce_file_download_path
Usage
add_filter( 'woocommerce_file_download_path', 'wp_kama_woocommerce_file_download_path_filter', 10, 3 ); /** * Function for `woocommerce_file_download_path` filter-hook. * * @param $value_file * @param $product * @param $key * * @return */ function wp_kama_woocommerce_file_download_path_filter( $value_file, $product, $key ){ // filter... return $value_file; }
- $value_file
- -
- $product
- -
- $key
- -
Where the hook is called
woocommerce_file_download_path
woocommerce_file_download_path
woocommerce_file_download_path
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 565
$download->set_file( apply_filters( 'woocommerce_file_download_path', $value['file'], $product, $key ) );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-products-v2-controller.php 1429
$download->set_file( apply_filters( 'woocommerce_file_download_path', $file['file'], $product, $key ) );
woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-products-v1-controller.php 967
$download->set_file( apply_filters( 'woocommerce_file_download_path', $file['file'], $product, $key ) );