Jake Vanderwerf
2026-01-25 b38f03c0e7218762d90fa5092696b127f24f36db
inc/managers/TaxonomyRelationships.php
@@ -1,8 +1,7 @@
<?php
namespace JVBase\managers;
use JVBase\JVB;
use JVBase\managers\CacheManager;
use JVBase\managers\Cache;
use WP_Error;
use WP_Post;
@@ -20,7 +19,7 @@
    {
        global $wpdb;
        $this->table_name = $wpdb->prefix . BASE.'taxonomy_relationships';
        $this->cache = CacheManager::for('term_relationship', WEEK_IN_SECONDS);
        $this->cache = Cache::for('term_relationship', WEEK_IN_SECONDS);
        // Ensure the table exists
//        $this->create_table_if_not_exists();
@@ -64,7 +63,6 @@
      if (in_array($post_type, jvbIgnoredPostTypes())) {
         return;
      }
        $this->cache->invalidate();
        // Get all taxonomies for this post type
        $taxonomies = get_object_taxonomies($post_type);
@@ -339,7 +337,7 @@
     */
    public function rebuildAllRelationships():bool
    {
        $this->cache->invalidate();
        $this->cache->flush();
        global $wpdb;
        // Clear existing relationships
@@ -371,7 +369,7 @@
            ]
        );
        $this->cache->invalidate();
        $this->cache->flush();
        return true;
    }
@@ -449,6 +447,5 @@
            $term_id,
            $term_id
        ));
        $this->cache->invalidate();
    }
}