- 状态
- 未解决
- 主题标签
- Compatibility, Known issue
问题概述
如果您已将 WordPress 更新到新的 6.7 版本,您可能会看到此通知:
Function _load_textdomain_just_in_time was called
- 从 WP 6.7 开始,翻译应在 WP init 钩子之后加载,您可以在此处阅读有关此问题的信息:https://wordpress.org/support/topic/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called-3/
- 某些插件较早加载翻译文件,这会导致上述错误。
- 请注意,该错误会指出是哪个插件导致了此问题:
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the woocommerce 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 /home/customer/www/xxx.com/public_html/wp-includes/functions.php on line 6114在此示例中,请注意该问题来自 WooCommerce 域;它极有可能出在 WooCommerce 插件中。
临时解决方法
您应该将 WPML & WooCommerce 插件更新到最新版本。
如果您仍然遇到此问题,则很可能与另一个主题或插件有关;
WordPress 6.7.1 很可能会修复此问题(请参阅此处 – https://core.trac.wordpress.org/ticket/62337)