Product data on invoices
Background
Commerce stores a frozen snapshot of each order in the commerce_invoice table when an invoice is created. That data is used to render the PDF, and makes sure that even if a PDF for it is requested much further down the line, it can be re-generated with the correct information.
Prior to v1.11.0-rc3, each invoice item also included a full copy of the product linked to order items. For normal products this adds a moderate amount of data, but we saw this can in certain cases cause the data to grow unnecessarily big. For example long descriptions, lots of price types, and product bundles can make the snapshot very large.
The product data isn't used by default in the invoice generation, and not generally needed as your invoice would render the order items instead of products.
What we changed
Before, the raw_data column was a MySQL TEXT field (which saves up to about 64 KB of data), and in rare cases with large orders or lots of product information, that could be exceeded.
When the snapshot exceeded 64 KB, the data would get cut off (or fail to save) and invoices would not be showing any data.
As of v1.11.0-rc3, the column is now a MEDIUMTEXT field (allowing up to 16 MB of data) to effectively allow even the largest orders to process properly.
We now also no longer include product data in the snapshot to bring down the overall size of the snapshot.
When enabling product copy is worth it
As a fallback if you do use product data in your invoice template (typically invoice/web.twig ), we have added a commerce.invoice_copy_products system setting that allows you to revert back to copying product data into the invoice snapshot as well.
We don't generally recommend this due to the additional size, but if you really need that product information in your snapshots, you can do so.
This setting affects the snapshot when it is being created, i.e. when the Create Invoice status change action runs in your status workflow. It does not affect invoices that are already stored to the database.