Answers for "WP_Scripts::localize was called incorrectly."

1

WP_Scripts::localize was called incorrectly.

# Befor

wp_localize_script( 'wlsm-admin', 'wlsmloadingtext', 'Loading...');

# After

wp_localize_script( 'wlsm-admin', 'wlsmloadingtext', ['Loading...'] );

you can fix that by passing in an array
Posted by: Guest on April-05-2021

Code answers related to "WP_Scripts::localize was called incorrectly."

Browse Popular Code Answers by Language