Skip to content

fix: defer ability instantiation to init to resolve textdomain notice#150

Merged
chubes4 merged 1 commit intoExtra-Chill:mainfrom
Sarai-Chinwag:fix/textdomain-notice
Feb 16, 2026
Merged

fix: defer ability instantiation to init to resolve textdomain notice#150
chubes4 merged 1 commit intoExtra-Chill:mainfrom
Sarai-Chinwag:fix/textdomain-notice

Conversation

@saraichinwag
Copy link
Contributor

Wraps all Abilities and ServiceProvider instantiation in an add_action('init') callback so that __() calls in ability registration happen after translations are loaded.

Fixes the _load_textdomain_just_in_time notice that appears on every WP-CLI call (and likely admin pages) on WP 6.7+.

The require_once lines (class file loading) remain at plugins_loaded — only the new instantiation calls are deferred to init.

Closes #141

Wraps all Abilities and ServiceProvider instantiation in an add_action('init')
callback so that __() calls in ability registration happen after translations
are loaded. Fixes the _load_textdomain_just_in_time notice on WP 6.7+.

Closes Extra-Chill#141
@chubes4 chubes4 merged commit 17eff4a into Extra-Chill:main Feb 16, 2026
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.

Textdomain loaded too early: _load_textdomain_just_in_time notice on every WP-CLI call

2 participants