Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Load textdomain on init action hook #7631

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

kjohnson
Copy link
Member

@kjohnson kjohnson commented Nov 25, 2024

Resolves GIVE-2015

Description

This PR moves the loading of the give textdomain to the init action hook, which was previously being loaded during plugins_loaded.

The release of WordPress v6.7.0 added a new notice when a textdomain is loaded "too early", see WordPress/wordpress-develop@d42d958.

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the give 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 init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /wp-includes/functions.php on line 6114

Testing Instructions

Check that no notice is shown when using WordPress v6.7.0+.

Pre-review Checklist

  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Self Review of code and UX completed

@kjohnson kjohnson changed the title Fix: Load textdomain on init action hook Fix: Load textdomain on init action hook Nov 25, 2024
@kjohnson kjohnson marked this pull request as ready for review November 25, 2024 02:20
@jonwaldstein jonwaldstein self-requested a review November 25, 2024 15:13
Copy link
Contributor

@jonwaldstein jonwaldstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kjohnson awesome, thanks for doing this! let's make sure QA tests that translations are working properly

@kjohnson
Copy link
Member Author

Copy link
Member

@rickalday rickalday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passed manual QA tests.

@kjohnson kjohnson merged commit 9f915d2 into develop Nov 25, 2024
20 checks passed
@kjohnson kjohnson deleted the fix/textdomain-load-timing-GIVE-2015 branch November 25, 2024 17:52
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.

3 participants