Title: error on function wc_maybe_store_user_agent()
Last modified: April 21, 2017

---

# error on function wc_maybe_store_user_agent()

 *  Resolved [axew3](https://wordpress.org/support/users/axewww/)
 * (@axewww)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/error-on-function-wc_maybe_store_user_agent/)
 * Hello lovely and cool people. Love this part of WP.
    I’ve get a request to see
   about a bug on redirect in WP after an external login. It seem that the function
   on file _includes\wc-core-functions.php_ at line 1516 `function wc_maybe_store_user_agent(
   $user_login, $user) {` should maybe be: `function wc_maybe_store_user_agent( 
   $user_login, $user = '' ) {` because if the second arg isn’t present the function
   will return this: [21-Apr-2017 14:34:06 UTC] PHP Warning: Missing argument 2 
   for wc_maybe_store_user_agent() in ….woocommerce\includes\wc-core-functions.php
   on line 1516 ?? Best regards!

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

 *  [jsg9in9nl](https://wordpress.org/support/users/jsg9in9nl/)
 * (@jsg9in9nl)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/error-on-function-wc_maybe_store_user_agent/#post-9628354)
 * This is WooCommerce (v3.2.1) file:
    _/wp-content/plugins/woocommerce/includes/
   wc-core-functions.php_ Rule: 1622
 *     ```
       function wc_maybe_store_user_agent( $user_login, $user ) {
       ```
   
 * change to:
 *     ```
       function wc_maybe_store_user_agent( $user_login, $user = '' ) {
       ```
   
 * Is some php old 5.6 code, what gives a problem in php 7.xx
 *  Thread Starter [axew3](https://wordpress.org/support/users/axewww/)
 * (@axewww)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/error-on-function-wc_maybe_store_user_agent/#post-9628692)
 * Thank you!

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

The topic ‘error on function wc_maybe_store_user_agent()’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [integration](https://wordpress.org/support/topic-tag/integration/)
 * [login](https://wordpress.org/support/topic-tag/login/)
 * [phpBB](https://wordpress.org/support/topic-tag/phpbb/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)

 * 3 replies
 * 2 participants
 * Last reply from: [axew3](https://wordpress.org/support/users/axewww/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/error-on-function-wc_maybe_store_user_agent/#post-9628692)
 * Status: resolved