Leave a Reply

1 comment

  1. Figured it out

    where I had

    if ( ! empty( $cart_item['presc_data'] ) )
            woocommerce_add_order_item_meta( $item_id, 'Olho Direito', $cart_item['presc_right_sphere'] );
    

    I had to change to

     $data = $cart_item['presc_data'];
        if ( ! empty( $cart_item['presc_data'] ) )
            woocommerce_add_order_item_meta( $item_id, 'Olho Direito', $data['presc_right_sphere'] );