Skip to content

Keep cloud reporting on when the cached API status is missing + 2.17.3 - #176

Merged
cport1 merged 2 commits into
mainfrom
fix/premium-revalidates
Dec 2, 2026
Merged

cport1 merged 2 commits into
mainfrom
fix/premium-revalidates

Conversation

@cport1

@cport1 cport1 commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Connected sites stop sending detections to WebDecoy Cloud shortly after they connect.

is_premium() reads only the cached webdecoy_api_status transient. Connecting sets it to active, but the cache is cleared on every save of webdecoy_options and expires after 12 hours, and nothing ever refills it: is_api_active(), the only re-check, has no callers. From then on detections, the test trigger and violation reports are all skipped, even though the test trigger still returns its "recorded" receipt.

  • A missing status now counts as unknown rather than inactive, so cloud features stay on, and it schedules a one-off webdecoy_check_api_status cron that re-validates the key and caches active or inactive.
  • Only a confirmed refusal (inactive) or a recent network error (error, 5 minutes) turns cloud features off.
  • The decision is WebDecoy_Cloud_Connect::status_allows_cloud(), unit-tested. A source test asserts that the re-check is scheduled and wired; it fails when the fix is reverted.

Needs a release to reach installed sites.

is_premium() read only a cached status, and nothing re-checked the key
once that cache was gone: is_api_active() had no callers. The cache is
cleared on every settings save and expires after 12 hours, so a connected
site silently stopped sending detections at the first save or within 12
hours of connecting.

A missing status now counts as unknown, keeps cloud features on, and
schedules a background re-check that sets it to active or inactive.
@cport1 cport1 changed the title Keep cloud reporting on when the cached API status is missing Keep cloud reporting on when the cached API status is missing + 2.17.3 Dec 2, 2026
@cport1
cport1 merged commit da1ce1d into main Dec 2, 2026
5 checks passed
@cport1
cport1 deleted the fix/premium-revalidates branch December 2, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant