WP_Scripts::localize was called incorrectly
-
This is more of a bug report than a support request. Plugin works great just the following small issue. My environment:
PHP Version 7.4.30
WordPress Version 5.8
WP_DEBUG true
WP_DEBUG_DISPLAY true
SCRIPT_DEBUG trueWordPress displays this notice when calling wp_localize_script() from the plugin:
WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
- The topic ‘WP_Scripts::localize was called incorrectly’ is closed to new replies.