Skip to content
Advertisement

WooCommerce orders page add customer role custom column

I want to add column to show the customer role on the WooCommerce orders, I search and everything I found is for one user. I also found this code on this link (WooCommerce show custom column) but I do not understand where I put what I need. I also found this code (https://gist.github.com/corsonr/5975207) but I do not managed to get the user role. I added $user_role = $user->roles; and

JavaScript

but it not worked, I know it is array but use of [0] or [1] did not work.

I missing something? It is possible to do what I what?

Advertisement

Answer

Add below code in your theme functions.php

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement