Replies: 0
I have noticed similar threads are already opened in this forum, yet I haven’t managed to get it working yet.
I have a simple radio group on my product page with two options, something like this:
• Do this
• Do something else
Those are required fields, so the user have to select one of them. It works great on product page, in WC emails and everywhere, but I need to retrieve user’s selection for each order’s item in PHP.
The closest I got is this:
$skus = $item_quantities = $line_item_totals = $items_meta_data = array();
foreach( $order->get_items() as $item_id => $item){
$items_meta_data[] = $item->get_meta_data();
$value = $item->get_meta('My radio group');
echo $value;
}
However, this does not echo user’s selection. It echoes all two existing radio options for every product.
Could you please drop me some hints on how to achieve this?
Amazing plugin by the way.
Thank you