Notice: WP_Scripts::localize was called incorrectly.
-
This error appears when the plugin is added to site. –
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/web/wp-includes/functions.php on line 5768
This seems to be caused by localizing the values without keeping them in a proper array while localizing.
- The topic ‘Notice: WP_Scripts::localize was called incorrectly.’ is closed to new replies.