Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
val

new column with links to user’s profile page

Hi- is there a way to add to the Orders page a column that lists a link to that user’s profile?

I played around with this for awhile and if you choose to add a new column called “customer” there is the option in the dropdown that says User Profile. However clicking on the links just goes to the order admin, not the user’s profile page.

9 months, 2 weeks ago
Stefan
Developer

There is no way to get his behavior out of the box.
But with the Custom column, you can use one of our hooks to alter the value and add the link to the profile page yourself.
https://github.com/codepress/admin-columns-hooks/blob/master/ac-column-value.php

For example, you can set the column to show the ID and no link, and completely format that value yourself to display a specific user property and link it to the profile page.

9 months, 2 weeks ago
Tobias
Developer

You are correct, the customer column doesn’t link to the correct user profile page. We will fix this in the next maintenance release.

Thanks for bringing it to our attention.

9 months, 2 weeks ago
Tobias
Developer

If you don’t mind making a change to a bit of PHP code, you can add the following to the file: ac-addon-woocommerce/classes/Column/ShopOrder/Customer.php


public function get_value( $id ) {
	$customer_id = $this->get_raw_value( $id );

	return $this->get_formatted_value( $customer_id, $customer_id );
}

This will solve your issue.

9 months, 2 weeks ago
val

Thanks! I added that snippet and got it working. It’s pretty cool. Here’s a screencap:

https://prnt.sc/vz8iwx

9 months, 2 weeks ago

You must be logged in to reply to this topic.