How can I set the item_meta for a new product?
-
When you get the items from an order with $items = $order->get_items(), what do those item objects look like? I see references to things like
$item['item_meta']['upc_codes'][0]
so apparently there’s an item_meta array, and one of the possible arrays in there is upc_codes. What else is in there?.
Specifically, my problem now is that I’ve created a new product and it’s being given an item_meta value of ‘upc_codes’. That causes the download manager to pull it out of the WooCommerce order and try to suck the barcodes out of it for downloading. But there are no barcodes in this new product, so the download array being built gets corrupted.
How can I set the item_meta for the new product to something other than upc_codes?
Thanks
- The topic ‘How can I set the item_meta for a new product?’ is closed to new replies.