Cart item data from an external API?

I would like to save metadata in each item in the cart (collecting item data from an external API) and I would like this data to be maintained in the order.

I’m not interested in viewing it because it’s a metadata that serves me in the backend to process the order in the internal ERP.

Are there already any example snippets that can help me?

1 thought on “Cart item data from an external API?

  1. As long as you know how to get the data form the API, you can then attach “cart item data” to each product in the cart, and then carry that data over to the order.

    This should help (it’s a custom field that is entered on the single product page, so you only need PART 2 & 4):


Your email address will not be published. Required fields are marked *