podlove / podlove-publisher

Podlove Podcast Publisher for WordPress
https://wordpress.org/plugins/podlove-podcasting-plugin-for-wordpress/
MIT License
299 stars 84 forks source link

WP 6.7 textdomain soft deprecation NOTICE #1532

Closed eteubert closed 1 week ago

eteubert commented 1 week ago

Since WordPress 6.7.0 this notice appears:

PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the podlove-podcasting-plugin-for-wordpress 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.)

We do indeed call load_plugin_textdomain before init. However, the notice stays even if I remove the line completely. (in fact we don't need to call this at all any more since we don't use local translation files)

Digging deeper, it seems calling any translation function before init causes this issue. For example lib/jobs/tools_section.php:9. I can't tell how many instances of this issue we might have because only the first call causes the notice. There's no way around fixing them one by one.

Suggested Approach

eteubert commented 1 week ago

fixed with 299d820d and 6a1a538d