Skip to content

Fix _load_textdomain_just_in_time notice on WordPress 6.7+#392

Closed
trajche wants to merge 1 commit intoWordPress:trunkfrom
trajche:fix/textdomain-wp67-compat
Closed

Fix _load_textdomain_just_in_time notice on WordPress 6.7+#392
trajche wants to merge 1 commit intoWordPress:trunkfrom
trajche:fix/textdomain-wp67-compat

Conversation

@trajche
Copy link
Contributor

@trajche trajche commented Mar 21, 2026

Summary

  • Replaces load_textdomain() with load_plugin_textdomain() in acf_load_textdomain() for proper integration with the just-in-time translation loading system introduced in WordPress 6.7.
  • This fixes the _load_textdomain_just_in_time was called incorrectly notice that appears on WordPress 6.7+ installations.

Fixes #252

Test plan

  • Install SCF on WordPress 6.7+ with WP_DEBUG and WP_DEBUG_DISPLAY enabled
  • Verify no _load_textdomain_just_in_time notice appears for the secure-custom-fields domain
  • Verify translations still load correctly on localized WordPress installations

Replace load_textdomain() with load_plugin_textdomain() in
acf_load_textdomain() for proper integration with the just-in-time
translation loading system introduced in WordPress 6.7.

Fixes WordPress#252
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @nmwaipopo.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

Core Committers: Use this line as a base for the props when committing in SVN:

Props trajche.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@trajche trajche closed this Mar 21, 2026
@trajche trajche deleted the fix/textdomain-wp67-compat branch March 21, 2026 11:35
@trajche
Copy link
Contributor Author

trajche commented Mar 21, 2026

This was not an issue with SCF. It was caused by other plugins registering options page/acf fields too early, which initalized SCF. By wrapping it in acf/init action, it works just fine.

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.

Function _load_textdomain_just_in_time was called incorrectly (WP version 6.7 and above)

1 participant