From 0672afdc9fee0306685f089a5bed7cbe466bfcb2 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 13 Feb 2018 19:22:01 +0000 Subject: [PATCH] Log cancel event --- includes/class-wc-regenerate-images.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/class-wc-regenerate-images.php b/includes/class-wc-regenerate-images.php index 1196278ba88..94ffaec9267 100644 --- a/includes/class-wc-regenerate-images.php +++ b/includes/class-wc-regenerate-images.php @@ -71,6 +71,13 @@ class WC_Regenerate_Images { public static function dismiss_regenerating_notice() { if ( self::$background_process ) { self::$background_process->kill_process(); + + $log = wc_get_logger(); + $log->info( __( 'Cancelled product image regeneration job.', 'woocommerce' ), + array( + 'source' => 'wc-image-regeneration', + ) + ); } WC_Admin_Notices::remove_notice( 'regenerating_thumbnails' ); }