Okay
  Public Ticket #3823082
Manage Order for Subagent
Closed

Comments

  •  6
    Spencer started the conversation

    Hi there,

    Normally, when an agent clicks 'Manage Order' on their dashboard for their customer orders, it goes to the backend of WP where they can see order information.

    However, when an agent does this for a subagents order, it is blank. How do I give the agent to only see orders for themselves and their subagents in the backend so they can properly see their subagents' order details? Thanks in advance.

  •  2,361
    WebWizards replied

    Hello Spencer,

    This is a bit of a tough one. Would it work for you to generally allow any agent to edit any order? If so, we could achieve it by adding this PHP snippet to the site:

    add_filter('salesking_agents_see_all_orders', function($val){
    	if (is_admin()){
    		return true;
    	}
    	return $val;
    }, 10, 1);
    

     

    Kind regards,

    Stefan

  •  6
    Spencer replied

    No I don't think I can allow any agent. Because then they'll also see the order amounts for other orders not in their hierarchy.


    Can we just restrict it to the main agent for their subagents orders?

  •   WebWizards replied privately
  •  6
    Spencer replied

    It works! Thank you very much.