Nicola Mustone

Happiness Lead @ Automattic



Display the customer’s username in the Bookings list

If you are using WooCommerce Bookings, sometimes it could be hard to understand what customer booked for a product on your site.
It could be the case when you have multiple customers with the same name.

An easy way to avoid confusion is to print the username of the customer. WordPress only allows for unique usernames, so there will be no mistakes using it instead of the real customer name.

Open the file functions.php located in wp-content/themes/your-theme-name/ and add this code at the end of the file:

This code will print the customer username after his real name, like in this screenshot:

bookings-username

Advertisements

Subscribe to This Blog

Receive new articles from this blog directly in your inbox! No spam guaranteed!

Join 651 other subscribers

Contribute to Improving This Blog

Did you enjoy this article? Was it helpful? Contribute to help me write more articles! The funds collected from this blog are reinvested directly into improving my skills or the blog so that I can provide more and better content!

One-Time
Monthly
Yearly

Make a one-time donation

Make a monthly donation

Make a yearly donation

Choose an amount

€5.00
€15.00
€100.00
€5.00
€15.00
€100.00
€5.00
€15.00
€100.00

Or enter a custom amount


Your contribution is appreciated.

Your contribution is appreciated.

Your contribution is appreciated.

DonateDonate monthlyDonate yearly
Advertisements

More Posts That You Might Like…


One response to “Display the customer’s username in the Bookings list”

  1. I’m using this on my site but I’m trying to add Person Types column. Could you point me toward how you found the
    $booking->get_customer(); functions. I cannot find them in the plugin

Leave a Reply

Advertisements

Categories

Newsletter

Receive new articles from this blog directly in your inbox!

No spam guaranteed!

Join 651 other subscribers

About The Author

Hi, I’m Nico! Support Lead at Automattic, championing WordPress.com & WooCommerce. Off-duty, I’m at Elemental Beacon, leading epic D&D adventures. Let’s connect, whether it’s about WordPress or a quest!

Advertisements

Don't Miss a Thing!

Receive new articles from this blog directly in your inbox!

No spam guaranteed!

Join 651 other subscribers

Continue Reading

%d bloggers like this: