Hello
do you want to sum Product meta or Order Item meta?
1. add new key using >Setup Fields>Add Field
2. add extra code to seciotn “Misc Settings”
Here is example,
You should call $product->get_meta() or $item->get_meta() to read necessary values.
// I added key "summary_qty_minus_refund" to export
add_action('woe_summary_products_add_item',function ($key, $item, $order) {
$product = $item->get_product();
$_SESSION['woe_summary_products'][$key]['summary_qty_minus_refund'] += ($item['qty'] + $order->get_qty_refunded_for_item( $item->get_id() ) );
},10,3);
I think it would be order item meta, we currently get the meta in our order summary sheets using the code
add_filter('woe_get_order_product_value_field_name', function ($value, $order, $item, $product,$item_meta) {
$value = $item_meta['_meta_name'];
return $value;
}, 10, 5);
So would I do $Value = $item->get_meta('_meta_name')?
yes, it should work.
but you must debug it , add some var_dumps() and press Preview