WC_Log_Handler_File::get_log_file_name()
Get a log file name.
File names consist of the handle, followed by the date, followed by a hash, .log.
Метод класса: WC_Log_Handler_File{}
Хуков нет.
Возвращает
true|false|Строку
. The log file name or false if cannot be determined.
Использование
$result = WC_Log_Handler_File::get_log_file_name( $handle );
- $handle(строка) (обязательный)
- Log name.
Список изменений
С версии 3.3 | Введена. |
Код WC_Log_Handler_File::get_log_file_name() WC Log Handler File::get log file name WC 9.4.2
public static function get_log_file_name( $handle ) { if ( function_exists( 'wp_hash' ) ) { $date_suffix = date( 'Y-m-d', time() ); $hash_suffix = wp_hash( $handle ); return sanitize_file_name( implode( '-', array( $handle, $date_suffix, $hash_suffix ) ) . '.log' ); } else { wc_doing_it_wrong( __METHOD__, __( 'This method should not be called before plugins_loaded.', 'woocommerce' ), '3.3' ); return false; } }