woocommerce_(export_type)_export_get_filename
Generate and return a filename.
Использование
add_filter( 'woocommerce_(export_type)_export_get_filename', 'wp_kama_woocommerce_export_type_get_filename_filter' ); /** * Function for `woocommerce_(export_type)_export_get_filename` filter-hook. * * @param $filename * * @return */ function wp_kama_woocommerce_export_type_get_filename_filter( $filename ){ // filter... return $filename; }
- $filename
- -
Где вызывается хук
woocommerce_(export_type)_export_get_filename
woocommerce/includes/export/abstract-wc-csv-exporter.php 223
return sanitize_file_name( apply_filters( "woocommerce_{$this->export_type}_export_get_filename", $this->filename ) );