Skip to content

Prevent calls to load_plugin_textdomain() too early - #207

Closed
MocioF wants to merge 1 commit into
perfectyorg:masterfrom
MocioF:master
Closed

Prevent calls to load_plugin_textdomain() too early#207
MocioF wants to merge 1 commit into
perfectyorg:masterfrom
MocioF:master

Conversation

@MocioF

@MocioF MocioF commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

See: https://make.wordpress.org/core/2024/10/21/i18n-improvements-6-7/

Since WP version 6.7 when WP_DEBUG is true, the plugin sends a Warning as:
PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>perfecty-push-notifications</code> domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /MYABSPATH/wp-includes/functions.php on line 6121
This PR prevents the plugin to be run before init and to load translations too early.

@rwngallego

Copy link
Copy Markdown
Collaborator

This should be fixed in v1.6.5, as it includes #209.

@rwngallego

Copy link
Copy Markdown
Collaborator

Thanks for the heads-up and the crucial information about the issue, @MocioF!

@rwngallego rwngallego closed this Sep 4, 2025
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.

2 participants