• Hi there,

    I have Product Add-ons for my WooCommerce Product that are 5 text fields (I’m using the free version of this plugin). Those 5 text fields are labelled as follows:
    Email Address #1
    Email Address #2
    Email Address #3
    Email Address #4
    Email Address #5

    When the customer places the Order I want to be able to loop through those 5 email address and send a special notification email to that recipient. I know how to Hook the event of Order Processing, I just don’t know the PHP I need to extract those 5 fields in the Order Item Meta. Any example code would be most appreciated.

    Thanks
    Tania

Viewing 1 replies (of 1 total)
  • Plugin Support Giuseppe Madaudo

    (@askmagic)

    Hi there,

    the options are saved in the order details like this:
    wc_add_order_item_meta ($ item_id, $ name, $ display_value);
    so to read the value you should use:
    wc_get_order_item_meta ($ item_id, $ name);
    where:
    $ name
    is the label of the option

Viewing 1 replies (of 1 total)

The topic ‘PHP Coding example please’ is closed to new replies.