woocommerce_log_directory
Filter to change the directory for storing WooCommerce's log files.
Usage
add_filter( 'woocommerce_log_directory', 'wp_kama_woocommerce_log_directory_filter' ); /** * Function for `woocommerce_log_directory` filter-hook. * * @param string $dir The full directory path, with trailing slash. * * @return string */ function wp_kama_woocommerce_log_directory_filter( $dir ){ // filter... return $dir; }
- $dir(string)
- The full directory path, with trailing slash.
Changelog
Since 8.8.0 | Introduced. |
Where the hook is called
woocommerce_log_directory
woocommerce/src/Internal/Admin/Logging/Settings.php 72
$dir = apply_filters( 'woocommerce_log_directory', $upload_dir['basedir'] . '/wc-logs/' );