title: wp_localize_script not working
body: <p>I have the following code in my theme <code>functions.php</code> but when I call <code>console.log(pw_script_vars);</code> the variable is <code>undefined</code>. What did I miss?</p>
  
  <pre><code>function mytheme_enqueue_scripts(){
      wp_enqueue_script( 'jquery' );
  
  }
  add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_scripts');
  
  function pw_load_scripts() {
  
      wp_enqueue_script('pw-script');
      wp_localize_script('pw-script', 'pw_script_vars', array(
              'alert' =&gt; __('Hey! You have clicked the button!', 'pippin'),
              'message' =&gt; __('You have clicked the other button. Good job!', 'pippin')
          )
      );
  
  
  }
  add_action('wp_enqueue_scripts', 'pw_load_scripts');
  </code></pre>