woocommerce_transient_files_directory
Filters the directory where transient files are stored.
Note that this is used for both creating new files (with create_file_by_rendering_template) and retrieving existing files (with get_file_by_*).
Usage
add_filter( 'woocommerce_transient_files_directory', 'wp_kama_woocommerce_transient_files_directory_filter' ); /** * Function for `woocommerce_transient_files_directory` filter-hook. * * @param string $transient_files_directory The default directory for transient files. * * @return string */ function wp_kama_woocommerce_transient_files_directory_filter( $transient_files_directory ){ // filter... return $transient_files_directory; }
- $transient_files_directory(string)
- The default directory for transient files.
Changelog
Since 8.5.0 | Introduced. |
Where the hook is called
woocommerce_transient_files_directory
woocommerce/src/Internal/TransientFiles/TransientFilesEngine.php 104
$transient_files_directory = apply_filters( 'woocommerce_transient_files_directory', $default_transient_files_directory );