From f859e64a57c624ff2daa2b21355f65a49fd4807d Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sat, 29 Aug 2026 03:09:12 +0000
Subject: [PATCH] =Some more tweaks. Mostly on the MenuBlock and adding the Meta.php to WooCommerce Products
---
inc/managers/UserTermsManager.php | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/inc/managers/UserTermsManager.php b/inc/managers/UserTermsManager.php
index ffc982e..c3a02e8 100644
--- a/inc/managers/UserTermsManager.php
+++ b/inc/managers/UserTermsManager.php
@@ -1,8 +1,9 @@
<?php
namespace JVBase\managers;
+use JVBase\Instance;
+use JVBase\managers\queue\Queue;
use JVBase\registrar\Registrar;
-use WP_Post;
use WP_Error;
use Exception;
use WP_Query;
@@ -12,10 +13,10 @@
}
class UserTermsManager
{
-
+ use Instance;
protected CustomTable $index;
- public function __construct()
+ private function __construct()
{
$this->defineTables();
@@ -66,8 +67,7 @@
*/
public function clearUserCache(int $user_id, string|null $taxonomy = null):void
{
- $cache = Cache::for($user_id.'_term_relationships', DAY_IN_SECONDS)->connect('post', true)->connect('taxonomy', true);
- $cache->flush();
+ Cache::for($user_id.'_term_relationships')->flush();
}
/**
@@ -188,7 +188,7 @@
];
}
- JVB()->queue()->queueOperation(
+ Queue::getInstance()->queueOperation(
'rebuild_user_term_index',
0,
[
@@ -223,7 +223,7 @@
];
}
- JVB()->queue()->queueOperation(
+ Queue::getInstance()->queueOperation(
'rebuild_user_term_index',
0,
[
@@ -317,7 +317,7 @@
'result' => $results
];
} catch (Exception $e) {
- JVB()->error()->log(
+ Errors::getInstance()->log(
'[UserTermsManager]:processOperation',
"Exception during operation processing: " . $e->getMessage(),
[
--
Gitblit v1.10.0