Skip to content

Conversation

@n7studios
Copy link
Contributor

@n7studios n7studios commented Feb 10, 2026

Summary

Fixes this reported issue by ensuring that initialize_admin() is not run during admin-ajax.php requests by explicitly bailing when wp_doing_ajax() is true.

admin-ajax.php runs in an admin context (is_admin() === true) even when triggered from the frontend, which previously caused admin-only classes (including setup wizard importers) to load and execute expensive database queries on frontend AJAX requests.

With #1012 and #1013, the Kit Plugin no longer uses admin-ajax.php (using the REST API instead); this change is safe and prevents unnecessary performance issues on large sites.

Testing

Existing tests pass.

Checklist

@n7studios n7studios changed the base branch from main to broadcasts-use-rest-api February 10, 2026 04:36
@n7studios n7studios closed this Feb 10, 2026
@n7studios n7studios deleted the fix-initialize-admin-ajax branch February 10, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG - v3.1.7 introduced severe performance regression

1 participant