How to Allow or Restrict WPCargo User Roles from Creating Shipment

Code goes to your active theme’s functions.php file:

// allow only admin, employee and client to create shipment
function wpccustom_wpcfe_add_shipment_role_cb($roles){
    $roles = array('wpcargo_employee', 'administrator', 'wpcargo_client');
    return $roles;
}
add_filter('wpcfe_add_shipment_role', 'wpccustom_wpcfe_add_shipment_role_cb', 15, 1);


0
    0
    Your Cart
    Your cart is emptyReturn to Shop