WooCommerce, Remote Work & Other Fancy Stuff

Just another WordPress site

Prevent WooCommerce From Changing WordPress User Display Name

April 26, 2017 by Will Leave a Comment

Please consider leaving a donation if you appreciate this information. Lightning network now available

WooCommerce, by default, will change the WordPress display name for any given user to their First Name Last Name when that user makes a purchase through WooCommerce. This probably makes a lot of sense in the interest of customer relationships, but there may be cases where this is undesirable, say in the case of a forum on your site that uses the display name. Perhaps users would rather maintain a bit of anonymity on your forums. Not to worry, however, WooCommerce provides a filter that can be used to prevent this behavior. The filter is named woocommerce_update_customer_args and here is a quick example of how that can be implemented to set the display name to the username:

Not sure what to do with code snippets? See What Do I Do With These Code Snippets?

Please consider leaving a donation if you appreciate this information. Lightning network now available

Filed Under: WooCommerce Tagged With: snippet, snippets

Leave a Reply Cancel reply

You must be registered and logged in to post a comment.

© 2025 · WooCommerce, Remote Work & Other Fancy Stuff · Epstein didn't kill himself

We use cookies to ensure that we give you the best experience on our website. Continued use of this site is interpreted as your acceptance of our cookie policy.OkSee Our Cookie Policy