WooCommerce – Split Multiple Items into Individual Line Items

So I ended up combining a few answer out there and split out orders when adding to the cart, and also when updating the cart. The below works, though it’s purely a front end customization. Hope this helps someone else!

function bbloomer_split_product_individual_cart_items( $cart_item_data, $product_id ){
  $unique_cart_item_key = uniqid();
  $cart_item_data['unique_key'] = $unique_cart_item_key;
  return $cart_item_data;
}

add_filter( 'woocommerce_add_cart_item_data', 'bbloomer_split_product_individual_cart_items', 10, 2 );  

add_action( 'woocommerce_after_cart_item_quantity_update', 'limit_cart_item_quantity', 20, 4 );
function limit_cart_item_quantity( $cart_item_key, $quantity, $old_quantity, $cart ){

    // Here the quantity limit
    $limit = 1;
    $orders_added = $quantity - $limit;

    if( $quantity > $limit ){
        //Set existing line item quantity to the limit of 1
        $cart->cart_contents[ $cart_item_key ]['quantity'] = $limit;
        //get product id of item that was updated
        $product_id = $cart->cart_contents[ $cart_item_key ][ 'product_id' ];

        for( $i = 0; $i< $orders_added; $i++ ){
            //iterate over the number of orders you must as with quantity one
            $unique_cart_item_key = uniqid();
            //create unique cart item ID, this is what breaks it out as a separate line item
            $cart_item_data = array();
            //initialize cart_item_data array where the unique_cart_item_key will be stored
            $cart_item_data['unique_key'] = $unique_cart_item_key;
            //set the cart_item_data at unique_key = to the newly created unique_key

            //add that shit! this does not take into account variable products

            $cart->add_to_cart( $product_id, 1, 0, 0, $cart_item_data );

        }

        // Add a custom notice
        wc_add_notice( __('We Split out quantities of more than one into invididual line items for tracking purposes, please update quantities as needed'), 'notice' );
    }
}