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 translation notice during initial Jetpack Configuration #9875

Closed
vbelolapotkov opened this issue Dec 4, 2024 · 0 comments · Fixed by #9884
Closed

Fix translation notice during initial Jetpack Configuration #9875

vbelolapotkov opened this issue Dec 4, 2024 · 0 comments · Fixed by #9884
Labels
focus: account lifecycle type: enhancement The issue is a request for an enhancement.

Comments

@vbelolapotkov
Copy link
Collaborator

This issue is the second part of #9727

PHP Notices are triggered during plugin initialization. This issue should focus on fixing notice coming from setting Jetpack Config.

Describe the bug

Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the <code>woocommerce</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 .../wp-includes/functions.php on line 6114

To Reproduce

  • WP 6.7.0.
  • Other language the EN
    wp-config.php -> define('WP_DEBUG',true);define('WP_DEBUG_DISPLAY',true);@ini_set('display_errors',0);define('SCRIPT_DEBUG',true);

Actual behavior

Open any page

Desktop (please complete the following information):

  • OS: W11
  • Browser chrome (last)

Additional context

debug.log

Internal investigation results by @mordeth (paJDYF-fWD):

The first instance occurs during the initialization of the Jetpack WooPayments configuration, specifically the custom content property, which includes localized strings. This needs to be hooked into plugins_loaded with priority 1 because Jetpack-config initializes modules on plugins_loaded with priority 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: account lifecycle type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant