You can split and group cart items separately as different packages and can be shipped individually by using different shipping methods. These packages can be created by various logical groupings of cart items, as like product vendor, product category, cost etc.
For detailed information about it, See WooCommerce: Split cart items from the same order and ship via multiple shipping methods.
The Code is as given below:
I get this error when adding this code to the function.php file
Fatal error: Call to undefined function get_product_vendors
I am using the product vendor plugin and adding it below the theme function.php file guide me if i am doing it wrong.