title: WP/WC missing argument in WooCommerce Function
body: <p>I have Wordpress with WooCommerce installed and I am trying to use this code to login an admin user:</p>
  
  <pre><code>if ( !is_user_logged_in() ) {
      $user = get_userdatabylogin( $username ); // get_user_by('login', $user_login);
      $id = $user-&gt;ID;
  
      wp_set_current_user( $id, $user-&gt;user_login );
      wp_set_auth_cookie( $id );
      do_action( 'wp_login', $user-&gt;user_login );
  }
  </code></pre>
  
  <p>But it is returning this error message:</p>
  
  <blockquote>
    <p>Warning: Missing argument 2 for wc_maybe_store_user_agent() in
    plugins/woocommerce/includes/wc-core-functions.php
    on line 1516</p>
  </blockquote>
  
  <p>I have tried looking around online but no one seems to have had this issue.</p>