WooCommerce 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?

Related content

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

1 thought on “WooCommerce 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): https://www.businessbloomer.com/woocommerce-order-free-sample-single-product-page/

Reply

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