Add WooCommerce vendor slug to auto-generated SKU

There’s a class WC_Product_Vendors_Utils that you can use e.g.

$vendor = WC_Product_Vendors_Utils::is_vendor_product( $item["product_vendors_product_id"] ); //replace this with the product ID

    if ( ! empty( $vendor[0] ) ) {
        $vendor_data = WC_Product_Vendors_Utils::get_vendor_data_by_id( $vendor[0]->term_id ); 

        if ( ! empty( $vendor_data ) ) {
            $vendor_slug = $vendor_data['slug']; // I am not sure of the correct value here but you can var_dump() just to make sure
        }
    }

Hope that will help you start generating the SKU properly 🙂