[wp-trac] [WordPress Trac] #62462: Reconsider _doing_it_wrong warning when loading translations early

WordPress Trac noreply at wordpress.org
Tue Nov 26 09:59:37 UTC 2024


#62462: Reconsider _doing_it_wrong warning when loading translations early
-------------------------------+---------------------
 Reporter:  TimothyBlynJacobs  |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  6.7.2
Component:  I18N               |     Version:  6.7
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+---------------------

Comment (by swissspidy):

 One issue there is that you're calling `wp_schedule_event()` (which calls
 `wp_get_schedules()` on `plugins_loaded`, so you are triggering a
 translation call on `plugins_loaded`. If you do it on `init` instead, I
 don't see any issue, be it when loading normally or when actually
 executing wp-cron.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62462#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list