WP VisitChart v2.8.6
Fix: featured star badge (⭐) didn't always appear on articles with the correct category.
Root Cause
_prime_post_caches() was called with $update_term_cache set to false in all three places that check has_term() for the Featured Category (live count, top pages, dashboard widget). This meant category term relations were not primed alongside post data, so has_term() could hit a stale term cache entry — particularly likely with a persistent object cache (Redis/Memcached), where an outdated cached term relation can outlive expectations.
This explained the intermittent behaviour: sometimes the cache happened to be fresh (star showed correctly), other times it was stale (star was missing) even though the article actually had the correct category assigned.
Fix
Changed all three _prime_post_caches() calls to pass true for $update_term_cache, ensuring category relations are always fetched fresh alongside post data. Negligible added cost given only 10–20 rows are involved per call.
Upgrade
Download wp-visitchart.zip below and replace the existing plugin files. No database changes required.