• Resolved Piani

    (@webbmasterpianise)


    Hi

    Im setting up woocommers for reselling items and found your plugin that seems lightweight and easy to use and looks great for my use.

    On the right side I can pick the ccustomer (select2-select-customer-container). If I search the company name (user_login) the correct contact comes up but is displayed by (contact name+ID+email).

    Is it possible to display the company name instad in this dropdown?

    I have the name in fields “user_login”, “nickname” and “display_name” so any of those would be great as an option to display.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author algol.plus

    (@algolplus)

    hi

    You should use this code , but it will affected to ALL customer searches
    thanks, Alex

    add_filter('woocommerce_json_search_found_customers', function($customers){
       foreach($customers as $userid=>$title) {
    		$user_info = get_userdata( $userid); 
    		if( $user_info )
    			$customers[$userid] = $user_info->display_name;
       }
       return $customers;
    });
    Thread Starter Piani

    (@webbmasterpianise)

    Thanks!

    Worked exactly as requested and ultra fast answer!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Customer dropdown name’ is closed to new replies.