Restore remove and clear functionality to WC_Logger
Maintain backwards compatibility of removing or clearing files.
This commit is contained in:
parent
7b95988811
commit
78a6ed4d44
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue