From 78a6ed4d44393234bbf66b3f39dc297f82b1c11a Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Thu, 12 Jan 2017 22:13:42 +0100 Subject: [PATCH] Restore remove and clear functionality to WC_Logger Maintain backwards compatibility of removing or clearing files. --- includes/class-wc-logger.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/includes/class-wc-logger.php b/includes/class-wc-logger.php index 114d96e52d4..fd4e957d5f7 100644 --- a/includes/class-wc-logger.php +++ b/includes/class-wc-logger.php @@ -216,11 +216,14 @@ class WC_Logger { * * @deprecated 2.7.0 * + * @param string $handle + * * @return bool */ - public function clear() { + public function clear( $handle ) { wc_deprecated_function( 'WC_Logger::clear', '2.7', 'WC_Log_Handler_File::clear' ); - return false; + $handler = new WC_Log_Handler_File(); + return $handler->clear( $handle ); } /** @@ -228,10 +231,13 @@ class WC_Logger { * * @deprecated 2.7.0 * + * @param string $handle + * * @return bool */ - public function remove() { + public function remove( $handle ) { wc_deprecated_function( 'WC_Logger::remove', '2.7', 'WC_Log_Handler_File::remove' ); - return false; + $handler = new WC_Log_Handler_File(); + return $handler->remove( $handle ); } }