Help with WooCommerce auto-filling user checkout fields

2,697 views
Skip to first unread message

suefernandes

unread,
May 1, 2017, 10:25:36 AM5/1/17
to Manchester WordPress User Group
Hi,

I have a WooCommerce site where users can submit listings, either as a new user or using a previously created account.  All is working fine except that the checkout fields are pre-filled in and the client is not happy.  

Here's what happens on the checkout page:

If user is logged in then the first name, last name and username are pre-filled with their information - makes life easier for them and the client is happy with this.

However, if that user then logs out and another user wants to place an ad by creating a new user account, then the previous users information is still pre-filled with their first name, last name and username, meaning new user has to delete this and enter their own.  Client is NOT happy with this at all! Despite the fact that this scenario would almost never happen.

I have tried the following filter, but this just causes ALL the fields to be not filled in, regardless of the above.  Again, client not happy :(

          add_filter('woocommerce_checkout_get_value','__return_empty_string',10);

Any advice would be much appreciated as this is driving me nuts!

Thanks

Sue 





Michael Cropper

unread,
May 1, 2017, 5:04:02 PM5/1/17
to Manchester WordPress User Group
Sounds like a caching issue to me with the page being cached when it shouldn't be. Try disabling any caching plugins and re-test the scenario to see if that solves the problem. 

suefernandes

unread,
May 2, 2017, 4:12:13 AM5/2/17
to Manchester WordPress User Group
Thanks Michael,

All caching is turned off on the site so don't think it's that. Was wondering if it was a session cookie set by WooCommerce?

Sue 

Mike Little

unread,
May 2, 2017, 6:47:35 AM5/2/17
to Manchester WordPress WordPress User Group (MWUG)
Usually form pre-fill is driven by cookies (it works that way for comments for sure), so even though you log out, your previous cookie still exists within the browser. 
It may be that there is a filter within woo to stop it using that cookie(s) or you my need to look at killing the cookies when a user logs out.

Alternatively, it could be the browser that is pre-filling (most browsers are set that way by default), again it doesn't know the difference between logged in and logged out.

Mike

--
See the group blog at https://mwug.uk
 
You received this message because you are subscribed to the Google
Group "Manchester WordPress User Group".
 
To post to this group, send email to
manchester-wordpress-user-gr...@googlegroups.com
 
For more options, visit this group at
http://groups.google.com/group/manchester-wordpress-user-group
---
You received this message because you are subscribed to the Google Groups "Manchester WordPress User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to manchester-wordpress-user-group+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Best regards,

Mike



--
Mike Little
WordPress Specialist

Skype: mike.little.zed1
Twitter: @mikelittlezed1

Founder and Director
Zed1.com Limited
https://zed1.com/
Registered in England & Wales, no. 6745562
Message has been deleted

suefernandes

unread,
May 2, 2017, 11:05:47 AM5/2/17
to Manchester WordPress User Group
Thanks to both Mike and Phil,

I am certain it is to do with Woo cookies in the browser as nothing is being carried over from device to device.  Have advised the client we may need to get a specialist WooCommerce developer involved and pay for it, if they want to start messing with cookies etc.  They also want to change the Paypal cancel_url parameter to go elsewhere from the standard return URL.

If anyone wants to volunteer their paid services please let me know.

Thanks

Sue 

Francis Dallorto de Oliveira

unread,
Jun 8, 2020, 7:07:28 AM6/8/20
to Manchester WordPress User Group
Hi Sue. I was searching for a solution right here and... I actually can't help you but seens you can help me lol.

I was looking for a solution, something to pre-fill the fields in checkout page and I think you reach this point. Could you help me solve that?

Best regards.
Reply all
Reply to author
Forward
0 new messages