From 8c6502de2f8ec2bd8382cd6945c327d7be400e14 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 28 Jan 2026 05:34:41 +0000
Subject: [PATCH] =Queue cleanup - seems to be working enough to get legacy before and after going!

---
 inc/integrations/Helcim.php |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/inc/integrations/Helcim.php b/inc/integrations/Helcim.php
index 498c2b8..ca486cd 100644
--- a/inc/integrations/Helcim.php
+++ b/inc/integrations/Helcim.php
@@ -157,6 +157,10 @@
 	 */
 	protected function registerAdditionalHooks(): void
 	{
+		$this->ensureInitialized();
+		if (!$this->isSetUp()) {
+			return;
+		}
 		// User login tracking for security
 		add_action('wp_login', [$this, 'trackUserLogin'], 10, 2);
 
@@ -527,6 +531,10 @@
 	 */
 	public function enqueueScripts(): void
 	{
+		$this->ensureInitialized();
+		if (!$this->isSetUp()) {
+			return;
+		}
 		// Helcim JS SDK
 		$sdk_url = $this->is_test_mode
 			? 'https://helcim-js-sandbox.helcim.com/v1/helcim.js'
@@ -1483,7 +1491,7 @@
 			update_user_meta($user->ID, BASE . '_helcim_customer_updated', current_time('mysql'));
 
 			// Clear cached customer data
-			$this->cache->delete('helcim_customer_' . $user->ID);
+			$this->cache->forget('helcim_customer_' . $user->ID);
 		}
 
 		return true;

--
Gitblit v1.10.0