[wp-trac] [WordPress Trac] #44937: Add _doing_it_wrong to load_plugin_textdomain
WordPress Trac
noreply at wordpress.org
Fri Oct 18 09:54:40 UTC 2024
#44937: Add _doing_it_wrong to load_plugin_textdomain
--------------------------------------+-------------------------
Reporter: garrett-eclipse | Owner: swissspidy
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.7
Component: I18N | Version: 4.7
Severity: normal | Resolution: fixed
Keywords: has-patch needs-dev-note | Focuses:
--------------------------------------+-------------------------
Comment (by LeonidasMilossis):
Replying to [comment:46 domainsupport]:
> Looks like this is going to fill up error logs fast as it appears to
affect many plugins. We are testing v6.7-beta2 on a very small site and
have three plugins showing as doing it wrong ...
>
> **WooCommerce**
>
> {{{
> [13-Oct-2024 08:08:08 UTC] E_USER_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 /public_html/wp-includes/functions.php on line 6099
> }}}
>
> **Payment Methods by Product & Country for WooCommerce**
>
> {{{
> [13-Oct-2024 08:08:15 UTC] E_USER_NOTICE: Function
_load_textdomain_just_in_time was called incorrectly. Translation loading
for the **hcaptcha-for-forms-and-more** 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 /public_html/wp-includes/functions.php on line
6099
> }}}
>
> **hCaptcha for WP**
>
> {{{
> [13-Oct-2024 08:08:19 UTC] E_USER_NOTICE: Function
_load_textdomain_just_in_time was called incorrectly. Translation loading
for the **payment-gateways-per-product-categories-for-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 /public_html
/wp-includes/functions.php on line 6099
> }}}
>
> Can this be specifically highlighted in the "WordPress 6.7 is imminent!"
email that will be going out to plugin developers soon in the "Highlights
of the release include:" section so developers know to look out for it in
their plugins?
Maybe also worth to mention @swissspidy that also Yoast SEO has the same
above issue, even after we stop use `load_plugin_textdomain`, just because
we use translating functions on `plugins_loaded` instead of eg. `init`.
Unfortunately, fixing that is a bit more involved than moving them to a
later function because they are tied to basic processes that are greatly
intertwined with each other.
We're currently working towards a fix, but I figured it's worth to add in
the conversation here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44937#comment:51>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list