Display WooCommerce Order Customer Username on Edit Order Page

Remi | July 17, 2014 | in WooCommerce

When viewing or editing a WooCommerce order, it can be pretty handy to add custom data to the page to avoid having to switch between pages. Today, i’ll provide a quick snippet that will add to the edit/view order page the customer username and a link to its user profile.

The result in action:


Pretty handy right?

So, to add this feature to your site, simply place the following snippet in the functions.php file within your theme folder and you’re done!

The author

About the author Remi: Hey! My name is Rémi Corson, i'm a WordPress Expert Developer, i create high level themes and plugins, and i provide free stuff every week on this website!


  1. douglsmith

    Thanks, Remi.

    I’ve always thought that should be built into the order screen somewhere, e.g., as an icon near the existing customer drop down menu or something.

    This makes a great, simple solution that is very helpful. I added a condition to make sure $customer_user isn’t zero to skip the output for guest customers.

Leave a reply