woocommerce_downloadable_file_exists
Использование
add_filter( 'woocommerce_downloadable_file_exists', 'wp_kama_woocommerce_downloadable_file_exists_filter', 10, 2 ); /** * Function for `woocommerce_downloadable_file_exists` filter-hook. * * @param $file_exists * @param $file * * @return */ function wp_kama_woocommerce_downloadable_file_exists_filter( $file_exists, $file ){ // filter... return $file_exists; }
- $file_exists
- -
- $file
- -
Где вызывается хук
woocommerce_downloadable_file_exists
woocommerce/includes/class-wc-product-download.php 194
return apply_filters( 'woocommerce_downloadable_file_exists', file_exists( $file_url ), $this->get_file() );