[wp-trac] [WordPress Trac] #50749: wp_set_script_translations() ignores failure when called before script is registered.

WordPress Trac noreply at wordpress.org
Wed Feb 28 09:02:06 UTC 2024


#50749: wp_set_script_translations() ignores failure when called before script is
registered.
--------------------------------------+-----------------------------
 Reporter:  tellyworth                |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Future Release
Component:  I18N                      |     Version:  5.4
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------

Comment (by swissspidy):

 Worth noting that `wp_add_inline_script()` doesn't emit a warning either.

 Instead of silently failing we could also just make it work.

 See #41990

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


More information about the wp-trac mailing list