Support only during business hours : Monday to friday, from 8:30 am – 5:30 pm CEST

Due to the decrease in our staff due to vacations, our response time may be longer.

Be sure we're doing our best to manage your topic as soon as possible.

WP_Scripts::localize was called incorrectly

This topic is resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Mohammad
    Participant
    • 15 Topics
    • 31 Posts
    @mohammad

    Hello, why am I seeing this warning?

    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…public_html/wp-includes/functions.php on line 5313

    How can i fix it?

    Manathan
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 5277 Posts
    @themodactyl

    Hi Mohammad,

    Thank you for reaching out! We’re sorry for the late answer. We’re experiencing a much larger number of requests than usual.

    No worries. These are PHP warnings, not errors. Unlike errors, warnings won’t break your website. They’re just messages aimed at developers to improve their code.

    My best guess is that this issue is related with your php version. Please check the WordPress prerequisites here:
    WordPress requirements

    For more about this, please click on the following link:
    Getting notice is wordpress “WP_Scripts::localize was called incorrectly”

    To hide this message, I suggest that you activate error logging on your website. Please keep WP_DEBUG to true and just paste the following code lines in your wp-config.php file, just before the line that says ‘That’s all, stop editing! Happy blogging.’:

    // Enable WP_DEBUG mode
    define( 'WP_DEBUG', true );
    
    // Enable Debug logging to the /wp-content/debug.log file
    define( 'WP_DEBUG_LOG', true );
    
    // Disable display of errors and warnings 
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );

    More on this in the following topic: Debugging in WordPress

    You will still be able to consult the warnings and errors triggered by your website but these won’t appear on your pages anymore.

    Regards,

Roboraptor 🦖
Themosaurus Topic Closer

Hi there,

This topic has been inactive for a while now so we will be closing it to keep the forum tidy. Don't hesitate to create a new topic if you still need help and we'll be glad to help you!

Best regards,
The Themosaurus team.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘WP_Scripts::localize was called incorrectly’ is closed to new replies.

Troubleshooting Demo Imports

You're trying to setup your theme but you're experiencing errors when importing the demo content? Or you've just followed the setup guide but your website doesn't look exactly like our demo? These are common issues for which you can find easy and quick fixes.

Happy With our Support So Far?

Feel free to review our theme on Themeforest! It helps us making our products more known to new potential customers, which allow us more time to improve the quality and develop new features. #SharingIsCaring ❤️

Discover MatchPress

Skip • Like • Super-Like

Add powerful matching features like Member likes, skips, super likes, conditional private messaging and much more.

Setup Your Cera-powered Community Website and Turn it into an iOS and Android App

15% discount for Cera users

To unleash the full power of the Cera theme, we have partnered with the Zipline team. Your community website can now be fully setup and turned into your very own custom app for iOS and Android.

Whether you're new to Cera and already got your site up and running, Zipline got you covered. And we got you an incredible discount.

Holiday, Weather & Festive effects
to pimp your WordPress Site