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.

3 years, 3 months ago
Stefan van den Dungen Gronovius
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.

3 years, 3 months ago
Tobias Schutter
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.

3 years, 3 months ago
Tobias Schutter
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.

3 years, 3 months ago
val

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

https://prnt.sc/vz8iwx

3 years, 3 months ago

You must be logged in to reply to this topic.