I'm building a site for a client, that has a feed-driven database table, updated daily with a massive new list of products (around 250,000). I'd like to use Woocommerce, as I'm familiar with it and the checkout/customer accounts features would be ideal. However, I'd need to pass products from the custom table to Woo's cart, as I can't create Woocommerce products from the custom table.
I was convinced I could form custom items and pass them to the cart (without a Woocommerce product ID), though I'm finding it difficult to find documentation on that now.
I can create items on-the-fly, at the order stage, using this code in a custom payment gateway:
$item_id = wc_add_order_item( $order_id, array( 'order_item_name' => $fee['name'], 'order_item_type' => 'fee' ) );
wc_add_order_item_meta( $item_id, '_line_total', wc_format_decimal( $fee_total ) );
Looking to do the same, at the cart stage. Any help would be appreciated.