Allow other user role to access invoices

// Allow Agent to access invoices
add_filter( 'can_wpcinvoice_access', 'custom_can_wpcinvoice_access' , 10 ,1);
function custom_can_wpcinvoice_access( $roles ){
	$roles = (array)$roles;
    $roles[] = 'cargo_agent';
     
    return $roles;
}

// Allow Agent to access invoices multiple package
add_filter( 'can_wpcinvoice_access_package', 'custom_can_wpcinvoice_access_package' , 10 ,1);
function custom_can_wpcinvoice_access_package( $roles ){
	$roles = (array)$roles;
    $roles[] = 'cargo_agent';
      
    return $roles;
}

// Allow Agent to update invoice 
add_filter( 'can_wpcfe_update_shipment', 'custom_can_wpcfe_update_shipment' , 10 ,1);
function custom_can_wpcfe_update_shipment( $roles ){
	$roles = (array)$roles;
    $roles[] = 'cargo_agent';
      
    return $roles;
}
0
    0
    Your Cart
    Your cart is emptyReturn to Shop