woocommerce_log_file_size_limit
Filter the threshold size of a log file at which point it will get rotated.
Usage
add_filter( 'woocommerce_log_file_size_limit', 'wp_kama_woocommerce_log_file_size_limit_filter' ); /** * Function for `woocommerce_log_file_size_limit` filter-hook. * * @param int $file_size_limit The file size limit in bytes. * * @return int */ function wp_kama_woocommerce_log_file_size_limit_filter( $file_size_limit ){ // filter... return $file_size_limit; }
- $file_size_limit(int)
- The file size limit in bytes.
Changelog
Since 3.4.0 | Introduced. |
Where the hook is called
woocommerce_log_file_size_limit
woocommerce_log_file_size_limit
woocommerce/src/Internal/Admin/Logging/FileV2/FileController.php 94
$file_size_limit = apply_filters( 'woocommerce_log_file_size_limit', $default );
woocommerce/includes/log-handlers/class-wc-log-handler-file.php 58
$this->log_size_limit = apply_filters( 'woocommerce_log_file_size_limit', $log_size_limit );