Title: Wrong call to wp_localize_script
Last modified: May 14, 2021

---

# Wrong call to wp_localize_script

 *  Resolved [rodrigosevero](https://wordpress.org/support/users/rodrigosevero/)
 * (@rodrigosevero)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/wrong-call-to-wp_localize_script/)
 * Hi,
 * After installing User Tags in a 5.7.2 WordPress I started getting the following
   Notice message:
 * > Notice: 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.) in /var/www/html/wp-includes/functions.
   > php on line 5313
 * I believe it is related to the wp_localize_script call at line 67 of class-usertags.
   php
 * Just putting the third argument inside an array fixes the issue AFAICT

Viewing 1 replies (of 1 total)

 *  [johndeebdd](https://wordpress.org/support/users/johndeebdd/)
 * (@johndeebdd)
 * [5 years ago](https://wordpress.org/support/topic/wrong-call-to-wp_localize_script/#post-14471796)
 * Same here.
    Notice: 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.) in /var/www/html/wp-includes/functions.php
   on line 5313

Viewing 1 replies (of 1 total)

The topic ‘Wrong call to wp_localize_script’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/user-tags_fdfdfd.svg)
 * [User Taxonomy & Directory](https://wordpress.org/plugins/user-tags/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-tags/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-tags/)
 * [Active Topics](https://wordpress.org/support/plugin/user-tags/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-tags/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-tags/reviews/)

## Tags

 * [compatibility](https://wordpress.org/support/topic-tag/compatibility/)
 * [notice](https://wordpress.org/support/topic-tag/notice/)

 * 1 reply
 * 2 participants
 * Last reply from: [johndeebdd](https://wordpress.org/support/users/johndeebdd/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/wrong-call-to-wp_localize_script/#post-14471796)
 * Status: resolved