_load_textdomain_just_in_time for translations / i18n loaded too early #4322
Labels
bug
This label could be used to identify issues that are caused by a defect in the product.
regression
Issue represents a change in behavior from a previous version that is not intended or desired..
Description
There is a new change in WordPress 6.7 that prevents plugins from loading translations too early, without waiting for more parts of WordPress being loaded. It also changes how load_plugin_textdomain() works, as it delays actual loading until the first __() call is encountered.
Refreshing my site with Neve theme brings up this notice like an error message.
I'd like to see no warnings and that strings are actually translated.
Solution:
This happened to WooCommerce plugin, too. They fixed it with these pull requests:
woocommerce/woocommerce#52055
Unfortunaly, I'm unable to contribute because of lacking coding knowledge. Maybe anybody else can take a look at this issue?
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet or Help Scout ticket
Notice: Die Funktion _load_textdomain_just_in_time wurde fehlerhaft aufgerufen. Das Laden der Übersetzung für die Domain neve wurde zu früh ausgelöst. Das ist normalerweise ein Hinweis auf Code im Plugin oder Theme, der zu früh läuft. Übersetzungen sollten mit der Aktion init oder später geladen werden. Weitere Informationen: Debugging in WordPress (engl.). (Diese Meldung wurde in Version 6.7.0 hinzugefügt.) in /var/www/vhosts/event.XXXXXX.de/httpdocs/wp-includes/functions.php on line 6114
Environment info
https://pastebin.com/4buASWDz
Is the issue you are reporting a regression
Yes, this is a regression.
The text was updated successfully, but these errors were encountered: