Merge pull request #8557 from pmgarman/patch-1

Update WC_Logger to include actions on add & clear methods
This commit is contained in:
Claudio Sanches 2015-07-10 16:45:16 -03:00
commit 2841d67340
1 changed files with 4 additions and 0 deletions

View File

@ -73,6 +73,8 @@ class WC_Logger {
$time = date_i18n( 'm-d-Y @ H:i:s -' ); // Grab Time
@fwrite( $this->_handles[ $handle ], $time . " " . $message . "\n" );
}
do_action( 'woocommerce_log_add', $handle, $message );
}
@ -87,6 +89,8 @@ class WC_Logger {
if ( $this->open( $handle ) && is_resource( $this->_handles[ $handle ] ) ) {
@ftruncate( $this->_handles[ $handle ], 0 );
}
do_action( 'woocommerce_log_clear', $handle );
}
}