From cc3ce2e10757485700ee3bb79f30cd50a599598b Mon Sep 17 00:00:00 2001 From: vinkmeta Date: Wed, 4 Jun 2025 20:30:47 +0100 Subject: [PATCH] Revert "Removing BatchLogHandler (#3295)" This reverts commit 768675c1819b26a9c1b6a6d6d0e223a2f62340e3. --- includes/Framework/Plugin.php | 15 +++++++++++++++ includes/Handlers/PluginRender.php | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/includes/Framework/Plugin.php b/includes/Framework/Plugin.php index 83ddb9e3c..dc04c8318 100644 --- a/includes/Framework/Plugin.php +++ b/includes/Framework/Plugin.php @@ -65,6 +65,9 @@ abstract class Plugin { /** @var AdminNoticeHandler the admin notice handler class */ private $admin_notice_handler; + /** @var BatchLogHandler the batch log handler class */ + private $batch_log_handler; + /** @var ErrorLogHandler the error log handler class */ private $error_log_handler; @@ -123,6 +126,9 @@ public function __construct( $id, $version, $args = [] ) { // add the action & filter hooks $this->add_hooks(); + // build the batch log handler instance + $this->init_batch_log_handler(); + // build the error log handler instance $this->init_error_log_handler(); } @@ -183,6 +189,15 @@ protected function init_lifecycle_handler() { $this->lifecycle_handler = new \WooCommerce\Facebook\Lifecycle( $this ); } + /** + * Builds the batch log handler instance. + * + * @since 3.5.0 + */ + protected function init_batch_log_handler() { + $this->batch_log_handler = new BatchLogHandler(); + } + /** * Builds the error log handler instance. * diff --git a/includes/Handlers/PluginRender.php b/includes/Handlers/PluginRender.php index 1ea0c4546..1e40a844a 100644 --- a/includes/Handlers/PluginRender.php +++ b/includes/Handlers/PluginRender.php @@ -26,7 +26,7 @@ class PluginRender { private \WC_Facebookcommerce $plugin; /** @var string opt out plugin version action */ - const ALL_PRODUCTS_PLUGIN_VERSION = '3.5.2'; + const ALL_PRODUCTS_PLUGIN_VERSION = '3.5.1'; /** @var string opt out sync action */ const ACTION_OPT_OUT_OF_SYNC = 'wc_facebook_opt_out_of_sync'; @@ -88,7 +88,7 @@ public function should_show_banners() { $current_version = $this->plugin->get_version(); /** * Case when current version is less or equal to latest - * but latest is below 3.5.2 + * but latest is below 3.5.1 * Should show the opt in/ opt out banner */ if ( version_compare( $current_version, self::ALL_PRODUCTS_PLUGIN_VERSION, '<' ) ) {