• 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

Viewing 1 replies (of 1 total)
  • Thread Starter toonbon

    (@toonbon)

    This question should be deleted because when I asked it I didn’t realize that item_meta values are things added with wc_add_order_item_meta(). But I didn’t see a way to delete the question, or even to contact the forum moderators.

Viewing 1 replies (of 1 total)
  • The topic ‘How can I set the item_meta for a new product?’ is closed to new replies.