How to filter roles in assigning of shipments

Note: please copy and paste this code in functions.php of your current theme.

By Default only the ff. roles can assign shipments.

  • administrator
  • wpcargo_employee
  • wpcargo_branch_manager
  function custom_wpcfe_assign_client_callback($roles_can_assign){
    /*
     * WPCargo Roles
     *
     * wpcargo_client
     * wpcargo_pending_client
     * wpcargo_employee
     * cargo_agent
     */

    // Allow agent can assign client
    $roles_can_assign[] = 'cargo_agent';
    return $roles_can_assign;
  }
  add_filter('wpcfe_assign_client', 'custom_wpcfe_assign_client_callback');
  
0
    0
    Your Cart
    Your cart is emptyReturn to Shop